#120
Variants and size
Chip color variants (default, brand, success, warning, error, info) plus a small size chip.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Variants and size" pattern (@codeatlasdev/ui demo #120, display/chip) in my app.
Call get_demo({ ids: ["#120"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Picking the chip tone for categories and semantic labels.
Keep these library parts, with the props and tokens the demo uses:
- Chip from "@codeatlasdev/ui"
Behaviour to keep:
- `<Chip label="Default" />` has no variant
- `variant="brand"`, `variant="success"`, `variant="warning"`, `variant="error"` and `variant="info"` each with a matching label
- `<Chip label="Small" size="sm" />` shows the small size
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
- Chip
@codeatlasdev/ui
How it is built
- `<Chip label="Default" />` has no variant
- `variant="brand"`, `variant="success"`, `variant="warning"`, `variant="error"` and `variant="info"` each with a matching label
- `<Chip label="Small" size="sm" />` shows the small size
Related
Loading source.