#222
Semantic
Four swatches for the semantic status color tokens: success, warning, error and info.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Semantic" pattern (@codeatlasdev/ui demo #222, foundation/colors) in my app.
Call get_demo({ ids: ["#222"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Choosing a status color for alerts, badges and validation states.
Keep these library parts, with the props and tokens the demo uses:
Behaviour to keep:
- Renders `<Swatches {tokens} bordered={false} />` with 4 tokens
- Tokens in order: `--ca-semantic-success`, `--ca-semantic-warning`, `--ca-semantic-error`, `--ca-semantic-info`
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={false} />` with 4 tokens
- Tokens in order: `--ca-semantic-success`, `--ca-semantic-warning`, `--ca-semantic-error`, `--ca-semantic-info`
Related
Loading source.