AsterDocsv1.2.3

Docs / Architecture

Native web components

Aster can render the same component inside an Aster tree and inside a browser custom element. Register a tag with defineElement(), declare the attributes it accepts and choose whether it uses a shadow root. An HTML page can then use the registered tag.

Attributes, properties and shared state

An HTML attribute starts as a string. A declaration such as { start: 'number' } converts the attribute before the component receives it. The element also exposes declared props as JavaScript properties. Each instance has its own component state. A signal imported by multiple instances can carry a value, such as a step size, that should change across all of them. Change a shared step and click the shadow-root counter.

Choosing a style boundary

Use a light-DOM component when a host page should style its descendants. Use a shadow root when selectors from the host page should stop at the element. CSS custom properties can carry theme values across that boundary. The registration options let you supply styles to the shadow root. Read the custom element and CSS API.

An anchor still points to a document URL. A mounted Aster router can handle eligible same-origin navigation on the client. Serving a direct request to that path remains the application's responsibility. You can supply a URL explicitly to match a server request, or omit it so a client router follows browser navigation. Try route parameters and a missing route.

Summary of the architecture decision accepted on 2026-11-24.