@teasim/astra provides the element layer for Astro. Each family renders the
semantic HTML a site would otherwise write by hand and adds browser behaviour
only where the platform does not already provide it.
An accordion is a details element and a dialog is a dialog element. The
browser owns the open state; a small runtime binds on top only where the platform
does not already provide the behaviour.
Install
bun add @teasim/astraKeep the package in the SSR build and include its distributed source in the TeaCSS scan. Astra ships no compiled stylesheet.
Family conventions
- Components are imported from the public package entry points.
- Stable parts are identified with namespaced
data-slotvalues. - Recipes expose named parts and accept caller overrides last.
- Focus, keyboard behaviour, accessible names, and forced-colour fallbacks are part of the component contract.
What it refuses to do
Astra ships no stylesheet and takes no external runtime dependencies. Recipes
such as accordionRecipe and buttonRecipe expose named parts, and caller
classes merge last, so the application keeps control of its visual system.
Continue reading
Start with the Accordion reference, then see the Code reference for code presentation and copy behaviour.