# BulletList (bullet-list)

> Vertical list of short strings with a vermilion arrow or dot marker.

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

## Install

```sh
npx shadcn@latest add @jbm/bullet-list
```

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/bullet-list.json, files[].content).

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

## API

### `BulletList` (component)

Flex column of rows; each row is 600-weight sans ink text with line-height 1.25, preceded by an accent → or an 18px accent dot, 16px apart. Pure React; `renderItem` lets you wrap each row, for example in a motion Pop.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `string[]` | required | Row strings in order. Each string is also the React key, so items must be unique. |
| `marker` | `"arrow" \| "dot"` | `"arrow"` | "arrow" (vermilion →) or "dot" (18px vermilion circle). |
| `size` | `number` | `36` | Font size of each row in stage pixels. |
| `gap` | `number` | `16` | Vertical space between rows in stage pixels. |
| `renderItem` | `(node: React.ReactNode, i: number) => React.ReactNode` | none | Optional wrapper called with each finished row node and its index; return the node to render (for example inside a Pop with a staggered `at`). |
| `style` | `React.CSSProperties` | none | Inline styles on the column, merged last; set width here in a scene. |

## Stage

fluid: Fills its container's width; height is n rows × size × 1.25 plus (n − 1) × gap, so three default rows are 3 × 45 + 2 × 16 = 167 stage px. Long items wrap and add lines.

## Examples

### Arrow and dot lists

```tsx
import { BulletList } from "@/jbm/ui/bullet-list"

<BulletList size={28} items={["El contexto", "La pregunta", "La respuesta"]} />
<BulletList size={28} marker="dot" items={["Simple", "Reusable", "Consistente"]} />
```

### Staggered entry in a video

```tsx
import { BulletList } from "@/jbm/ui/bullet-list"
import { Pop } from "@/jbm/motion/pop" // install @jbm/pop separately

<BulletList
  items={["El contexto", "La pregunta"]}
  renderItem={(node, i) => <Pop at={0.4 + i * 0.6} from="left" dist={14}>{node}</Pop>}
/>
```

## QA

- Compare arrow and dot markers: the dot stays vertically centered on the first line and the arrow is vermilion.
- Duplicate strings share a React key and trigger a warning; keep items unique.
- Check the full list height fits the safe area in portrait, where the scene compiler uses a 22px gap.
- With renderItem and Pop, step through the stagger and confirm every row ends fully visible.

## 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)

Imported in examples:

- [Pop (pop)](https://jbm-ui.bns.studio/catalog/pop.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
