# JbmIcon (icons)

> Twelve original geometric SVG icons with outline and paper treatments, inherited color, and optional accessible labels.

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

## Install

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

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

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

## API

### `JbmIcon` (component)

A static 24-unit icon. Uses a 2.5-unit stroke derived from the shared outline token, round caps and joins. No timer, client boundary, or Remotion dependency. Decorative unless label is supplied; label an icon-only parent button separately.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `IconName` | required | arrow-right, search, close, check, play, replay, folder, notebook, dataset, chart, code, or agent. |
| `size` | `number` | `24` | Square CSS-pixel size. Non-positive or non-finite values fall back to 24. Inspect 16, 20, 24 and 32px before use. |
| `color` | `string` | `"currentColor"` | Stroke color. Inherits text color by default. |
| `treatment` | `IconTreatment` | `"outline"` | outline has no fill; paper fills enclosed silhouettes. Open marks are identical in both treatments. |
| `paperColor` | `string` | `palette.bg` | Paper fill, cream by default. Set explicitly on dark surfaces. |
| `label` | `string` | none | Accessible name for standalone meaningful icons. Omit for decorative icons beside text. |
| `style` | `CSSProperties` | none | Inline style overrides; width and height overrides can supersede size. |

### `iconPaths` (constant)

Original body and interior-mark SVG paths on a 24×24 grid, keyed by IconName. Body paths are closed and may be filled; marks remain unfilled.

### `IconName` (type)

Union of the twelve keys in iconPaths.

### `IconTreatment` (type)

outline | paper.

## Stage

Declared in stage pixels at the documented defaults.

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

Square 24×24 viewBox; size sets width and height in pixels, default 24.

## Examples

### Beside a label

```tsx
import { JbmIcon } from "@/jbm/ui/icons"

<button><JbmIcon name="play" size={20} /> Start lesson</button>
```

### Standalone paper icon

```tsx
import { JbmIcon } from "@/jbm/ui/icons"

<JbmIcon name="folder" treatment="paper" paperColor="#C63D24" color="#20241F" size={32} label="Project folder" />
```

## QA

- Open /icons to inspect all twelve silhouettes at 16, 20, 24, 32 and 48px and enlarged. Compare outline and paper treatments on cream and ink.
- Check icon-only controls have an accessible name on the button; decorative SVGs must stay out of the accessibility tree.
- Download an SVG from /icons and compare its treatment, size and colors with the selected grid specimen.
- The notebook, folder and table are optically simplified icons, not scaled-down animated illustrations. No overlapping paper layers or animation are implied.

## Docs

- [Icon drawing and review guide](https://jbm-ui.bns.studio/docs/icons.md)

## Related

Installs:

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