{"name":"badge","entry":"component","title":"Badge","description":"Round check or cross badge in accent, ink, or paper tones for fixed and broken states.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/badge","installName":"badge","page":"https://jbm-ui.bns.studio/c/badge","registryItem":"https://jbm-ui.bns.studio/r/badge.json","sourcePath":"registry/jbm/ui/badge.tsx","files":[{"source":"registry/jbm/ui/badge.tsx","target":"src/jbm/ui/badge.tsx","import":"@/jbm/ui/badge","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/badge.md","json":"https://jbm-ui.bns.studio/catalog/badge.json"},"snippet":"import { Badge } from \"@/jbm/ui/badge\"\n\n<div style={{ display: \"flex\", gap: 40 }}>\n  <Badge kind=\"check\" size={100} />\n  <Badge kind=\"x\" size={100} tone=\"ink\" />\n</div>","api":[{"export":"Badge","kind":"component","summary":"Circle with the paper shadow and a stroked check or cross (55% of the size). Accent and ink fills draw a cream mark; paper draws an ink mark with a 2px ink outline. Static; animate it by wrapping or via style.","props":[{"name":"kind","type":"\"check\" | \"x\"","required":true,"default":null,"description":"Mark to draw: check (fixed) or x (broken)."},{"name":"size","type":"number","required":false,"default":"44","description":"Diameter in stage pixels."},{"name":"tone","type":"PaperTone","required":false,"default":"\"accent\"","description":"Fill: accent (vermilion, default), ink, or paper (cream with an ink outline)."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last; use for absolute placement, opacity, or transforms."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":44,"height":44},"vertical":{"width":44,"height":44},"basis":"Square size × size box at the default size 44; the shadow extends below it."},"examples":[{"title":"Fixed and broken","code":"import { Badge } from \"@/jbm/ui/badge\"\n\n<div style={{ display: \"flex\", gap: 40 }}>\n  <Badge kind=\"check\" size={100} />\n  <Badge kind=\"x\" size={100} tone=\"ink\" />\n</div>"}],"qa":["Compare all three tones with both marks: the mark stays legible (cream on accent and ink, ink on paper).","At small sizes the 4-unit stroke of the 24-unit icon scales down; check the check and cross remain readable around 24px."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"}],"family":"Interface bits","setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}