# Callout (callout)

> Short sentence in a vermilion, ink, or outlined note pill.

- Entry: component
- Category: UI
- Preview capabilities: none (still preview)
- Runtime: React
- Needs Remotion: no
- QA page: https://jbm-ui.bns.studio/c/callout
- JSON: https://jbm-ui.bns.studio/catalog/callout.json
- Registry item: https://jbm-ui.bns.studio/r/callout.json (source code in files[].content)

## Install

```sh
npx shadcn@latest add @jbm/callout
```

Also installs @jbm/tokens (registry dependencies install automatically).

## Required setup

1. Add the `@jbm` registry to components.json (keep any entries already there):

   ```json
   {
     "registries": {
       "@jbm": "https://jbm-ui.bns.studio/r/{name}.json"
     }
   }
   ```

2. Map `@/*` to `./src/*` in tsconfig.json `compilerOptions.paths`, so `@/jbm/…` imports resolve to src/jbm/.

## Files

Each file's source code is in the registry item JSON (https://jbm-ui.bns.studio/r/callout.json, files[].content).

| Source path | Installs to | Import |
| --- | --- | --- |
| `registry/jbm/ui/callout.tsx` | `src/jbm/ui/callout.tsx` | `@/jbm/ui/callout` |

## API

### `Callout` (component)

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. |

## Stage

Declared in stage pixels at the documented defaults.

| Orientation | Width | Height |
| --- | --- | --- |
| Landscape (1920×1080) | auto | 71 |
| Vertical (1080×1920) | auto | 71 |

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.

## Examples

### Three variants

```tsx
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>
```

### Wrapped in a column

```tsx
import { Callout } from "@/jbm/ui/callout"

<Callout size={34} maxWidth={936}>Una idea clara vale más que diez diapositivas.</Callout>
```

## QA

- 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.

## Related

Installs:

- [Tokens (tokens)](https://jbm-ui.bns.studio/catalog/tokens.md)

Installed by:

- [SceneFromSpec (scene-spec)](https://jbm-ui.bns.studio/catalog/scene-spec.md)

## More

- [llms.txt](https://jbm-ui.bns.studio/llms.txt): index of every item
- [catalog.json](https://jbm-ui.bns.studio/catalog.json): every item as JSON
- [Agent contract](https://jbm-ui.bns.studio/docs/agent-contract.md): what each field means
