Plain
A border and nothing else.
Every example below is the real component, rendered live. Props tables list what you can change; the snippet shows the usual call.
The handwritten wordmark in Damion. Always lowercase, always a link home when used in a header.
| Prop | Type | Default | What it does |
|---|---|---|---|
text | string | "gesso" | The word to set. Keep it short and lowercase. |
size | "sm" | "md" | "lg" | "xl" | "md" | sm for headers, xl for heroes. |
href | string | — | Makes it a link, with an aria-label of the word plus home. |
<Logo text="milano" size="sm" href="/" /> Loading screen: a haze picture with the logo word written as if by hand, then the layer fades away (about 2.5 s). Pure CSS, skipped on later views in the same tab, plays to the end even when tapped, and left out entirely for reduced motion.
| Prop | Type | Default | What it does |
|---|---|---|---|
word | Handwriting | — | Data from src/data/handwriting/<word>.ts (letter shape plus pen strokes). |
picture | string | — | Background picture, shown with object cover and grain. |
duration | number | 1.6 | Seconds for the pen to write the word. |
inline | boolean | false | Render in a 16:9 box instead of over the page (for previews like this one). |
---
import WritingIntro from "../components/WritingIntro.astro";
import milano from "../data/handwriting/milano";
---
<WritingIntro word={milano} picture="/pictures/haze.webp" />
# new word: generate its data once
python scripts/handwriting.py fayrouz src/fonts/damion-latin-400-normal.woff2 \
> src/data/handwriting/fayrouz.ts Picture card that grows to full width as you scroll, after the anthropic.com hero. One variable drives the side inset, bottom inset and corner radius.
Scroll the page and watch the edges open.
| Prop | Type | Default | What it does |
|---|---|---|---|
src | string | — | Picture, cover-fitted behind the content. |
width / height | number | — | Intrinsic size, to reserve space. |
alt | string | "" | Leave empty when the picture is decoration. |
tone | "dark" | "light" | "dark" | Text colour on the picture. |
<ExpandingMedia src="/pictures/haze.webp" width={1600} height={686}>
<Logo text="milano" size="xl" />
<p>Terrasse mit 80 Plätzen.</p>
<Button href="#karte">Speisekarte</Button>
</ExpandingMedia> Photos with captions and 4px corners. A swipe strip with scroll snap on phones, a grid from 768px. No JS, no lightbox.
| Prop | Type | Default | What it does |
|---|---|---|---|
items | { src, srcset?, width, height, alt, caption? }[] | — | Photos in order. Give srcset with 800w and 1600w copies. |
layout | "grid" | "feature" | "grid" | feature makes the first photo wide on top, the rest a row of three. |
label | string | — | Accessible name of the list. |
<Gallery layout="feature" label="Photos of the restaurant" items={[
{ src: "/photos/aussen-1600.webp",
srcset: "/photos/aussen-800.webp 800w, /photos/aussen-1600.webp 1600w",
width: 1600, height: 1064, alt: "…", caption: "Entrance and terrace" },
]} /> The grainy gradient surface from pure CSS, under 1 KB. For bands, cards and empty states where a picture would be too heavy.
dawn dusk mist paper | Prop | Type | Default | What it does |
|---|---|---|---|
variant | "dawn" | "dusk" | "mist" | "paper" | "dawn" | Colour mix. |
drift | boolean | false | Slow 28 s drift; stops for reduced motion. |
grain | boolean | true | SVG noise on top. |
as | string | "div" | Element to render. |
<Haze variant="dusk" as="section" drift>…</Haze> A quiet container with an optional media slot. 8px corners, so pictures inside keep their 4px.
A border and nothing else.
Soft shadow for things that float.
For one warm highlight.
| Prop | Type | Default | What it does |
|---|---|---|---|
variant | "plain" | "raised" | "haze" | "plain" | Border only, soft shadow, or haze fill. |
href | string | — | Makes the whole card a link. |
<Card variant="raised" href="/journal/first">
<img slot="media" src="/pictures/collage-compass.webp" width="900" height="1125" alt="…" />
<h3>Title</h3>
<p>One or two sentences.</p>
</Card> A small status or tag label. One word, sentence case.
| Prop | Type | Default | What it does |
|---|---|---|---|
tone | "neutral" | "clay" | "ok" | "warn" | "error" | "neutral" | Colour. |
dot | boolean | false | Leading status dot. |
<Badge tone="ok" dot>Open now</Badge> A short boxed message. Warn and error tones are announced as alerts.
Note
Closed on 24 December
| Prop | Type | Default | What it does |
|---|---|---|---|
tone | "note" | "clay" | "ok" | "warn" | "error" | "note" | Colour and role. |
title | string | — | Bold first line. |
<Callout tone="warn" title="Closed on 24 December">We open again on the 27th.</Callout> Label, control, hint and error in one, with the aria wiring done for you.
Please check the address.
| Prop | Type | Default | What it does |
|---|---|---|---|
label | string | — | Visible label. |
name | string | — | Form name; also builds the id. |
as | "input" | "textarea" | "select" | "input" | Control type. |
type / placeholder / value | string | — | Passed to the control. |
hint | string | — | Help text under the control. |
error | string | — | Error text; marks the field invalid. |
required | boolean | false | Native required. |
<Field label="Email" name="email" type="email" hint="We only use it to confirm." required /> Opening hours as a table. A three-line script marks today in Zurich time, so the highlight never goes stale.
| Mondaytoday | 11:30–14:00, 18:00–23:00 |
|---|---|
| Tuesdaytoday | 11:30–14:00, 18:00–23:00 |
| Wednesdaytoday | 11:30–14:00, 18:00–23:00 |
| Thursdaytoday | 11:30–14:00, 18:00–23:00 |
| Fridaytoday | 11:30–14:00, 18:00–24:00 |
| Saturdaytoday | 18:00–24:00 |
| Sundaytoday | closed |
Sample data.
| Prop | Type | Default | What it does |
|---|---|---|---|
hours | { day, open: string | null }[] | — | Seven rows, Monday first; null means closed. |
note | string | — | One line under the table, such as kitchen hours. |
labels | { caption, today, closed } | German | Words for the caption, today marker and closed days. |
<HoursTable hours={hours} note="Kitchen until 22:00" labels={{ today: "today", closed: "closed" }} />