Hero
Buttons go in the default slot. Media can be an image, a background
video (muted and looping, with a pause button) or anything in the media
slot. The background layout lays a dark scrim over the media so white text
keeps its contrast.
Samla
A design system built for speed
Accessible, static-first components for Astro sites.
Plain HTML and CSS, with only the JavaScript a piece needs.
Options
Section titled “Options”eyebrow,title,lead: text content;titleis the pageh1layout:centered(default),split(text beside media),stacked(text above wide media),background(full-bleed media behind the text)reverse: puts the media first insplitsurface:light,alternate,brand,dark(ignored bybackground, which always uses white text on a scrim)align:start,center; defaults tocenterforcenteredandstacked,startforbackground;splitis alwaysstartheight:auto(default, content height),tall,screen(data-height)image,imageAlt: an image as the media;ratiosets its shape (landscapeinsplit,wideotherwise)video:{ src, poster, label }, played muted and looping with a pause button, held on the poster under reduced motiontrust:{ rating, reviewCount, text, logos }shown beneath the buttons- Slots: default (buttons),
media,trust
<Hero eyebrow="Samla" title="A design system built for speed" lead="Accessible, static-first components for Astro sites." trust={{ text: "Plain HTML and CSS, with only the JavaScript a piece needs." }}> <Button href="/start/">Get started</Button> <Button href="/docs/" variant="outline">Read the docs</Button></Hero>Components
One source of markup
Every piece owns its structure and scoped styles in one file.
Built on Astro, with Lucide icons.
Readable on every surface
Surfaces remap colour tokens, so components stay legible on dark and brand bands.
Contrast checked against WCAG AA.
Demo site
Built from its own sections
The demo site is a plain Astro site that uses the library as a consumer would.
Sections
Pages from reusable parts
Heroes, headers and statements composed from the same elements.
Ready when you are
Install the library and compose your first page.
Works in any Astro project.