jbmui

JbmIcon

  • UI

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

Install

npx shadcn@latest add @jbm/icons

Needs the @jbm entry in components.json; see Install once.

Also installs @jbm/tokens.

Docs

Usage

Beside a label
import { JbmIcon } from "@/jbm/ui/icons"<button><JbmIcon name="play" size={20} /> Start lesson</button>
Standalone paper icon
import { JbmIcon } from "@/jbm/ui/icons"<JbmIcon name="folder" treatment="paper" paperColor="#C63D24" color="#20241F" size={32} label="Project folder" />

API

Stage px
Declared at the documented defaults
Landscape
24 by 24
Vertical
24 by 24
Basis

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

JbmIconcomponent

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.

PropTypeDefaultDescription
nameIconNamerequiredarrow-right, search, close, check, play, replay, folder, notebook, dataset, chart, code, or agent.
sizenumber24Square CSS-pixel size. Non-positive or non-finite values fall back to 24. Inspect 16, 20, 24 and 32px before use.
colorstring"currentColor"Stroke color. Inherits text color by default.
treatmentIconTreatment"outline"outline has no fill; paper fills enclosed silhouettes. Open marks are identical in both treatments.
paperColorstringpalette.bgPaper fill, cream by default. Set explicitly on dark surfaces.
labelstringnoneAccessible name for standalone meaningful icons. Omit for decorative icons beside text.
styleCSSPropertiesnoneInline style overrides; width and height overrides can supersede size.

iconPathsconstant

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.

IconNametype

Union of the twelve keys in iconPaths.

IconTreatmenttype

outline | paper.

QA checks

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