Chip
Inline pill in outline, vermilion accent, or solid ink, with sans or mono type.
Default
Accent
Solid
Mono
Install
npx shadcn@latest add @jbm/chipNeeds the @jbm entry in components.json; see Install once.
Also installs @jbm/tokens.
Usage
import { Chip } from "@/jbm/ui/chip"<Chip>Default</Chip><Chip accent>Accent</Chip><Chip solid>Solid</Chip><Chip mono>Mono</Chip>import { Chip } from "@/jbm/ui/chip"import { Stagger } from "@/jbm/motion/pop" // install @jbm/pop separately<Stagger at={0.2} step={0.35}> {["Idea", "Datos"].map((text) => <Chip key={text}>{text}</Chip>)}</Stagger>Props
- Stage
fluidWidth follows the text. Height is 26px type at the font's normal line height (not set explicitly) plus 20px vertical padding and 4px of border;
sizescales the type only, not the padding.
Inline-block, non-wrapping pill with a 2px border, 10×20px padding, and the 14px chip radius. Outline (card fill, line border, ink text) by default; accent fills vermilion, solid fills ink, both with cream text.
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | required | Chip text; kept on one line (white-space: nowrap). |
accent | boolean | none | Fills and borders the chip with the vermilion accent. Takes precedence over solid when both are set. |
solid | boolean | none | Fills and borders the chip with ink. |
mono | boolean | none | Switches the face from Geist sans to Geist Mono. |
size | number | 26 | Font size in stage pixels. |
style | React.CSSProperties | none | Inline styles merged last. |
QA checks
- Compare default, accent, solid, and mono side by side: outline on card fill, cream text on vermilion and ink.
- Check that long chip text does not overflow the safe area, because chips never wrap; wrap the row container instead.
- Keep at most one accent chip per composition.