English | 简体中文
OpenElement is a framework for server-rendered HTML and interactive Custom Elements. Compiler turns JSX and TSX function components into Custom Elements and server renderers. Element provides the runtime. Router handles routes, navigation, loaders and actions.
Use Node.js 24.2 or newer. The default command uses the npm latest tag, which currently serves an alpha release.
npm create @openelement my-app
cd my-app
npm run devOpen the URL printed by the dev server. Edit app/routes/index.tsx to change the home page. Stop the server before running npm run build.
To follow the alpha channel, use npm create @openelement@alpha my-app. Check both tags with npm view @openelement/create dist-tags. Changelog
Follow the first app tutorial to add a page, an interactive island, and a form action. See the deployment guide for static hosting, Node, and Cloudflare Workers.
This checkout previews 1.0.0-alpha.16 from source. To test local source changes, build the packages from this checkout and install them into a temporary starter app. Release state
pnpm install --frozen-lockfile
export STARTER_SMOKE_WORK_DIR="$(mktemp -d)"
pnpm exec vp run --no-cache --fail-if-no-match --filter @openelement/e2e-starter-smoke setup
cd "$STARTER_SMOKE_WORK_DIR/my-blog"
pnpm run devEdit app/routes/index.tsx to try the starter's file routing. Run pnpm test and pnpm run build after stopping the dev server. Starter package
| Directory | What lives here |
|---|---|
| packages | Element runtime, compiler, protocol contracts, Router, starter CLI, and experimental UI |
| tests | Cross-package tests, starter smoke and deployment fixtures |
| tools | Repository checks, release packaging and packed consumer tests |
| docs | Current architecture and decisions |
| www | Official documentation site and its browser tests |
| apps/saas | Separately governed first-party consumer app |
Read the website or contributor guide. For security reports, follow the security policy. MIT license