Callout
Short sentence in a vermilion, ink, or outlined note pill.
Primero, el problema.
Luego, la idea.
Al final, cómo se usa.
Install
npx shadcn@latest add @jbm/calloutNeeds the @jbm entry in components.json; see Install once.
Also installs @jbm/tokens.
Usage
import { Callout } from "@/jbm/ui/callout"<Callout>Primero, el problema.</Callout><Callout variant="ink">Luego, la idea.</Callout><Callout variant="note">Al final, cómo se usa.</Callout>import { Callout } from "@/jbm/ui/callout"<Callout size={34} maxWidth={936}>Una idea clara vale más que diez diapositivas.</Callout>Props
- Stage px
- Declared at the documented defaults
- Landscape
auto by 71- Vertical
auto by 71- Basis
One line of the default accent variant: 30 × 1.3 = 39 plus 28px vertical padding and 4px border = 71 stage px. Ink is 59 and note is 63 at the same size; each wrapped line adds size × 1.3. Width follows the text.
Inline-block pill with line-height 1.3 and a 2px border. accent: vermilion fill, cream sans, 14×22px padding, 16px radius. ink: ink fill, cream mono, 8×14px padding, 10px radius. note: transparent with an accent2 border and mono text, 10×18px padding, 12px radius, for footnotes.
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | required | The sentence; wraps at maxWidth when set. |
variant | "accent" | "ink" | "note" | "accent" | "accent", "ink", or "note". Changes fill, face, padding, and radius together. |
size | number | 30 | Font size in stage pixels. |
maxWidth | number | none | Maximum width in stage pixels; unset lets the pill grow with its text up to the container width. |
style | React.CSSProperties | none | Inline styles merged after the variant. |
QA checks
- Compare accent, ink, and note on cream; note text uses accent2 and must stay legible at small sizes.
- Wrap a long sentence with maxWidth and check line spacing and padding stay even.
- Only one accent-filled callout per composition, and it should not compete with another accent element.