#223
Surfaces
Four swatches for the surface tokens from sunken to overlay, drawn with a border.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Surfaces" pattern (@codeatlasdev/ui demo #223, foundation/colors) in my app.
Call get_demo({ ids: ["#223"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Choosing the background layer for a page, card, raised panel or popover.
Keep these library parts, with the props and tokens the demo uses:
Behaviour to keep:
- Renders `<Swatches {tokens} bordered={true} />` with 4 tokens
- Tokens in order: `--ca-surface-sunken`, `--ca-surface-base`, `--ca-surface-raised`, `--ca-surface-overlay`
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
How it is built
- Renders `<Swatches {tokens} bordered={true} />` with 4 tokens
- Tokens in order: `--ca-surface-sunken`, `--ca-surface-base`, `--ca-surface-raised`, `--ca-surface-overlay`
Related
Loading source.