Skip to content

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.
  • eyebrow, title, lead: text content; title is the page h1
  • layout: centered (default), split (text beside media), stacked (text above wide media), background (full-bleed media behind the text)
  • reverse: puts the media first in split
  • surface: light, alternate, brand, dark (ignored by background, which always uses white text on a scrim)
  • align: start, center; defaults to center for centered and stacked, start for background; split is always start
  • height: auto (default, content height), tall, screen (data-height)
  • image, imageAlt: an image as the media; ratio sets its shape (landscape in split, wide otherwise)
  • video: { src, poster, label }, played muted and looping with a pause button, held on the poster under reduced motion
  • trust: { 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>
layout="split", surface="alternate"
Components

One source of markup

Every piece owns its structure and scoped styles in one file.

Built on Astro, with Lucide icons.
Placeholder for a component screenshot
layout="split", reverse, surface="dark", ratio="square"

Readable on every surface

Surfaces remap colour tokens, so components stay legible on dark and brand bands.

Contrast checked against WCAG AA.
Placeholder for a dark surface example
layout="stacked"
Demo site

Built from its own sections

The demo site is a plain Astro site that uses the library as a consumer would.

Placeholder for the demo site
layout="background", height="tall"
Sections

Pages from reusable parts

Heroes, headers and statements composed from the same elements.

layout="background", align="center", video

Motion with a pause button

A background video that holds still under reduced motion.

surface="brand", trust slot

Ready when you are

Install the library and compose your first page.

Works in any Astro project.