{"name":"score-scale","entry":"component","title":"ScoreScale","description":"A read-only score meter with endpoint labels and a controlled marker.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/score-scale","installName":"score-scale","page":"https://jbm-ui.bns.studio/c/score-scale","registryItem":"https://jbm-ui.bns.studio/r/score-scale.json","sourcePath":"registry/jbm/ui/score-scale.tsx","files":[{"source":"registry/jbm/ui/score-scale.tsx","target":"src/jbm/ui/score-scale.tsx","import":"@/jbm/ui/score-scale","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/score-scale.md","json":"https://jbm-ui.bns.studio/catalog/score-scale.json"},"snippet":"import { ScoreScale } from \"@/jbm/ui/score-scale\"\n\n<ScoreScale label=\"Claridad\" value={6} min={0} max={10}\n  labels={[\"Por explorar\", \"Lista para compartir\"]}\n  formatValue={(v) => `${v} / 10`} />\n// Read-only meter; clamps values to the range.","api":[{"export":"ScoreScale","kind":"component","summary":"Read-only meter (role meter, not an input): a label and formatted value above a track with five evenly spaced ticks and a vermilion marker, with endpoint captions below. The marker position is (value − min) / (max − min); the caller controls value. Throws RangeError for non-finite numbers or max ≤ min.","props":[{"name":"value","type":"number","required":true,"default":null,"description":"Score to display. Finite values are clamped to min…max before positioning and formatting."},{"name":"min","type":"number","required":false,"default":"0","description":"Low end of the scale; the left endpoint caption when labels is omitted."},{"name":"max","type":"number","required":false,"default":"10","description":"High end of the scale; must be greater than min. The right endpoint caption when labels is omitted."},{"name":"label","type":"string","required":true,"default":null,"description":"Visible heading and the meter's accessible name."},{"name":"labels","type":"[string, string]","required":false,"default":null,"description":"Endpoint captions [low, high] shown under the track instead of min and max."},{"name":"formatValue","type":"(value: number) => string","required":false,"default":"String","description":"Formats the clamped value for the accent readout and aria-valuetext, e.g. (v) => `${v} / 10`."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"fluid","reason":"Width fills its container (minWidth 0); the track spans it less 12px padding per side. Height is about 95 stage pixels at one line each: heading row, 22px gap, 24px track, 10px gap, 12px mono captions. Long label, value, or endpoint captions wrap and add lines."},"examples":[{"title":"Score out of ten with named endpoints","code":"import { ScoreScale } from \"@/jbm/ui/score-scale\"\n\n<ScoreScale label=\"Claridad\" value={6} min={0} max={10}\n  labels={[\"Por explorar\", \"Lista para compartir\"]}\n  formatValue={(v) => `${v} / 10`} />\n// Read-only meter; clamps values to the range."}],"qa":["Drag the score control through min, the middle, and max: the marker sits on the first, center, and last ticks and never leaves the track.","Pass a value outside the range: the marker and readout show the clamped value.","Check long labels and endpoint captions wrap without overlapping at narrow widths.","Screen readers announce a meter with aria-valuetext from formatValue; it is not focusable or draggable itself."],"related":[{"name":"tokens","relation":"installs"}],"docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}],"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"}}