{"name":"token-glyph","entry":"component","title":"TokenGlyph","description":"Square glyphs for design tokens: overlapping colour swatches, an Aa type sample, or a spacing dimension line.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/token-glyph","installName":"token-glyph","page":"https://jbm-ui.bns.studio/c/token-glyph","registryItem":"https://jbm-ui.bns.studio/r/token-glyph.json","sourcePath":"registry/jbm/ui/token-glyph.tsx","files":[{"source":"registry/jbm/ui/token-glyph.tsx","target":"src/jbm/ui/token-glyph.tsx","import":"@/jbm/ui/token-glyph","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/token-glyph.md","json":"https://jbm-ui.bns.studio/catalog/token-glyph.json"},"snippet":"import { TokenGlyph, type TokenKind } from \"@/jbm/ui/token-glyph\"\n\nconst kinds: TokenKind[] = [\"color\", \"type\", \"space\"]\n<div style={{ display: \"flex\", gap: 30 }}>\n  {kinds.map((kind) => <TokenGlyph key={kind} kind={kind} size={150} />)}\n</div>","api":[{"export":"TokenGlyph","kind":"component","summary":"One of three static illustrations in a size × size square: `color` draws an ink and a vermilion circle overlapping with the paper shadow; `type` draws a heavy Geist \"Aa\" with a vermilion a; `space` draws two ink blocks with a vermilion double-headed dimension arrow between them.","props":[{"name":"kind","type":"TokenKind","required":true,"default":null,"description":"Which token to illustrate: color, type, or space."},{"name":"size","type":"number","required":false,"default":"150","description":"Side of the square in stage pixels; every shape and the type size (70% of it) scale with it."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles on the outer element (a div for color and type, an svg for space)."}],"passthrough":[]},{"export":"TokenKind","kind":"type","summary":"The glyph names: \"color\" | \"type\" | \"space\"."}],"stage":{"mode":"declared","landscape":{"width":150,"height":150},"vertical":{"width":150,"height":150},"basis":"Square size × size box at the default size 150; the colour swatch shadows extend past it."},"examples":[{"title":"All three tokens","code":"import { TokenGlyph, type TokenKind } from \"@/jbm/ui/token-glyph\"\n\nconst kinds: TokenKind[] = [\"color\", \"type\", \"space\"]\n<div style={{ display: \"flex\", gap: 30 }}>\n  {kinds.map((kind) => <TokenGlyph key={kind} kind={kind} size={150} />)}\n</div>"}],"qa":["Render the three kinds side by side at one size: they share the square footprint and read at similar visual weight.","Check the type glyph renders in Geist (font.sans) and does not overflow the square when fonts load late.","Scale size down to about 60px: the spacing arrowheads and dimension line stay distinct."],"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"}}