{"name":"clock","entry":"component","title":"Clock","description":"A deterministic analog clock and time label. Supply time explicitly for web or video.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/clock","installName":"clock","page":"https://jbm-ui.bns.studio/c/clock","registryItem":"https://jbm-ui.bns.studio/r/clock.json","sourcePath":"registry/jbm/ui/clock.tsx","files":[{"source":"registry/jbm/ui/clock.tsx","target":"src/jbm/ui/clock.tsx","import":"@/jbm/ui/clock","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/clock.md","json":"https://jbm-ui.bns.studio/catalog/clock.json"},"snippet":"import { Clock } from \"@/jbm/ui/clock\"\n\n<Clock hours={8} minutes={30} size={64} />\n// Explicit time keeps rendering deterministic. No autoplay.","api":[{"export":"Clock","kind":"component","summary":"Analog face (dim ring, four quarter ticks, ink hour hand, vermilion minute hand) beside a mono HH:MM label. No timers: the time is (hours × 60 + minutes) wrapped to 24 hours, the hour hand moves continuously with the minutes, and the face is aria-hidden so the label carries the time. Throws RangeError for non-finite values or size ≤ 0.","props":[{"name":"hours","type":"number","required":true,"default":null,"description":"Hours on a 24-hour day; fractions and values outside 0–23 wrap."},{"name":"minutes","type":"number","required":false,"default":"0","description":"Minutes added to hours; may exceed 59 (e.g. hours 0, minutes 510 is 08:30) and wraps across days."},{"name":"size","type":"number","required":false,"default":"64","description":"Width and height of the clock face in stage pixels."},{"name":"label","type":"string","required":false,"default":null,"description":"Text shown instead of the zero-padded 24-hour HH:MM derived from the time."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"declared","landscape":{"width":"auto","height":64},"vertical":{"width":"auto","height":64},"basis":"Inline-flex row: a size × size face (64 by default), a 16px gap, and the label in 22px mono. Height equals size while it exceeds the text line; width follows the label. The row wraps when its container is narrower, putting the label below the face."},"examples":[{"title":"Half past eight","code":"import { Clock } from \"@/jbm/ui/clock\"\n\n<Clock hours={8} minutes={30} size={64} />\n// Explicit time keeps rendering deterministic. No autoplay."},{"title":"Drive it from minutes of the day","code":"import { Clock } from \"@/jbm/ui/clock\"\n\nconst minutes = 510 // e.g. from a slider or a video frame\n<Clock hours={0} minutes={minutes} size={96} label=\"Mañana\" />"}],"qa":["Sweep the time control from 00:00 to 23:59: the minute hand completes each hour, the hour hand advances smoothly, and the label matches.","Check 12:00 and 00:00 both point straight up and 06:00 straight down.","At a narrow width the label wraps below the face without clipping."],"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"}}