@xtyle/astro
v0.8.0
Published
Zero-JS Astro components that emit semantic HTML against the xtyle component classes; the SSR binding of the component contract.
Readme
@xtyle/astro
Zero-JS Astro 6 components that emit semantic HTML against the xtyle component classes,
the SSR binding of the @xtyle/core component
contract. Each component server-renders the matching markup and ships no client
JavaScript unless that component genuinely needs it.
Install
npm install @xtyle/astro @xtyle/coreastro@^6 is a peer dependency; @xtyle/core (pulled in automatically) provides the
markup contract and the derivation engine.
Usage
---
import Button from "@xtyle/astro/Button.astro";
import Card from "@xtyle/astro/Card.astro";
---
<Card>
<Button tone="accent">Save</Button>
</Card>Components are styled entirely by design tokens, the CSS custom properties a xtyle
algorithm derives. Emit a theme to CSS (via the xtyle CLI in @xtyle/core) and drop it
on :root; every component themes with it, with nothing running at runtime. See
@xtyle/core for deriving a theme, and
xtyle.dev for the full component reference.
License
MIT
