Skip to content
@teasim/astra documentation

@teasim/astra

Accessible elements that render the markup you would have written, and carry their behaviour with them.

@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

sh
bun add @teasim/astra

Keep 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-slot values.
  • 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.