One token source
tokens/lumen.tokens.json is the canonical platform-neutral source for every generated adapter.
Understand the semantic tokens and cross-platform contracts that keep every Lumen implementation recognizably part of one system.
@santi020k/lumen-tokensMost applications should consume tokens through their platform package. Use the platform-neutral token package for tooling and custom adapters.
See the contract
These swatches follow the current docs theme. Change the theme to see each role adapt.
canvasPage backgroundsurfaceCards and panelssurface-mutedSecondary surfacesinkPrimary textbrandBrand expressionbrand-solidPrimary actionssuccessSuccessful outcomeswarningNeeds attentiondangerErrors and destructive actionsUse roles for their purpose; status also needs a label or icon so color never carries the meaning alone.
From tokens to a screen
Card owns padding. Stack separates groups. Field keeps its label and input together.
---
import { Button, Card, Field, Input, Label, Stack } from '@santi020k/lumen-astro'
---
<Card>
<Stack gap="group">
<Field>
<Label for="workspace">Workspace name</Label>
<Input id="workspace" value="Lumen Labs" />
</Field>
<Stack direction="horizontal" gap="related" wrap>
<Button>Save changes</Button>
<Button variant="outline">Cancel</Button>
</Stack>
</Stack>
</Card>---
import { Button, Card, Field, Input, Label, Stack } from '@santi020k/lumen-astro'
---
<Card>
<Stack gap="group">
<Field>
<Label for="workspace">Workspace name</Label>
<Input id="workspace" value="Lumen Labs" />
</Field>
<Stack direction="horizontal" gap="related" wrap>
<Button>Save changes</Button>
<Button variant="outline">Cancel</Button>
</Stack>
</Stack>
</Card>Explore Stack spacing or build a theme in the interactive lab.
Compare the foundations
These examples use the live Lumen variables, so theme and preset changes carry through.
Bars magnify each spacing token four times so the differences are easy to compare.
xssmmdlgxl2xl3xlA clear heading introduces the idea. Body text gives it enough context to act.
Supporting text adds a detail without competing with the heading.
Use the shared radius scale to keep controls and surfaces related.
Shadows follow the current theme. Pair elevation with a clear border and hierarchy.
Motion with a purpose
Replay a single transition using the fast, default, and slow duration tokens. Reduced motion keeps the markers still.
fastdefaultslowEnable JavaScript to replay the timing comparison.
Get started
Most applications should consume tokens through their platform package. Use the platform-neutral token package for tooling and custom adapters.
pnpm add @santi020k/lumen-tokensSupported surface
Foundations define shared roles and expectations. Each adapter remains responsible for native rendering, interaction, focus, and navigation.
Platform contract
tokens/lumen.tokens.json is the canonical platform-neutral source for every generated adapter.
Semantic purpose, variants, states, content rules, and accessibility expectations form the shared contract.
Rendering, gestures, navigation, focus systems, and platform conventions stay inside each adapter.
Move between platform guidance without losing the shared Lumen design language.