Browse documentation
npm prerelease1.0.0-alpha.16
Build with the browser.
Build apps with native Web Components. Pages arrive as ready-to-read HTML, and JavaScript loads where users interact.
Try the live counternpm create @openelement my-appRequires Node.js 24.2+. Setup guide
Alpha APIs can still change. See the release notes.
Interactive counterUse + to countRendered on the server
Count: 0
Select a layer to highlight it.Tap a layer to highlight it.
export default function OpenCounter(props: CounterProps) {
const count = signal(0);
return (
<div part='demo'>
<button
type='button'
part='button'
aria-label={props.increment + ' ' + count.value}
onClick={() => count.value++}
>
<span aria-live='polite'>{props.label + ' ' + count.value}</span>
</button>
<button
type='button'
part='reset'
disabled={count.value === 0}
onClick={({ currentTarget: reset }: Event) => {
count.value = 0;
(reset as HTMLElement).parentElement?.querySelector('button')?.focus();
}}
>
{props.reset}
</button>
</div>
);
}- Island
- one interactive component that hydrates on its own after the page is already readable.
- Declarative Shadow DOM
- ships a component’s shadow root as HTML, so it renders before any JavaScript arrives.
- Hydration
- when an island’s chunk — the one JavaScript file that island ships — upgrades the server HTML in place.
Evidence
0 Bframework JavaScript required for first paintThe HTML renders completely with JavaScript disabled.
8.3 kBdemo island hydration chunk2.2 kB gzip · loaded on visibility, not for first paint
Architecture comparisonQualitative fit, no speed ranking.From source to browser
Write components in JSX and control when they come to life.
Author
Native Web Components
Define components as Custom Elements. Compose them in JSX and use signals for local state.
Explore the architectureRender
HTML on first paint
Pre-render pages at build time or render on request. Shadow roots can arrive as Declarative Shadow DOM.
See how rendering worksActivate
JavaScript where it matters
Choose when each interactive island hydrates: on load, when the browser is idle, or when it scrolls into view.
Learn about islands