{
  "$schema": "https://ui.shadcn.com/schema/registry.json",
  "name": "rivier-ui",
  "homepage": "https://rivier.ai",
  "items": [
    {
      "name": "theme",
      "type": "registry:file",
      "title": "Theme",
      "description": "The tokens every Rivier UI component draws from: colours, the highlight colour, roundness, motion. Light and dark.",
      "dependencies": [
        "tw-animate-css"
      ],
      "registryDependencies": [],
      "files": [
        {
          "path": "registry/theme/rivier-ui.css",
          "type": "registry:file",
          "target": "styles/rivier-ui.css"
        }
      ],
      "meta": {
        "category": "theme",
        "when": "Always: install it first and import it after Tailwind in the global stylesheet."
      }
    },
    {
      "name": "announce",
      "type": "registry:lib",
      "title": "Announce",
      "description": "Says a message to screen-reader users through one shared live region, politely or at once, without moving focus.",
      "categories": [
        "lib"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/lib/announce.ts",
          "type": "registry:lib",
          "target": "lib/announce.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "Something changed that a sighted person can see but no focus change will read out: an item was moved, a filter applied, a total changed, a reply finished. Not for content the person is about to read anyway, and not for errors on a field (use the field's own message). A component that is already a live region (status-line, toaster) does not need it.",
        "example": "announce(\"Lunch moved to position 2 of 5\");\nannounce(\"The connection was lost\", \"assertive\");",
        "client": false
      }
    },
    {
      "name": "cn",
      "type": "registry:lib",
      "title": "Cn",
      "description": "Joins class names and resolves Tailwind conflicts, so a class passed in wins over a component's own.",
      "categories": [
        "lib"
      ],
      "dependencies": [
        "clsx",
        "tailwind-merge"
      ],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/lib/cn.ts",
          "type": "registry:lib",
          "target": "lib/cn.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "Every component uses it. Use it wherever classes are combined conditionally.",
        "example": "cn(\"px-4 py-2\", isActive && \"bg-primary\", className)",
        "client": false
      }
    },
    {
      "name": "direction",
      "type": "registry:lib",
      "title": "Direction",
      "description": "Tells whether an element reads right to left, and turns \"start\" and \"end\" arrow keys and offsets the right way round for it.",
      "categories": [
        "lib"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/lib/direction.ts",
          "type": "registry:lib",
          "target": "lib/direction.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "A component handles Left and Right arrow keys, or moves something sideways with a transform, and must work in right-to-left pages. Layout itself needs no code: use logical utilities (ps-, ms-, start-, text-start). To set a direction for part of a page use direction-provider.",
        "example": "function onKeyDown(event: KeyboardEvent<HTMLDivElement>) {\n  const step = inlineStep(event.key, event.currentTarget); // +1 towards the end, -1 towards the start, 0 otherwise\n  if (step !== 0) move(step);\n}",
        "client": false
      }
    },
    {
      "name": "motion",
      "type": "registry:lib",
      "title": "Motion",
      "description": "The motion tokens as numbers for the motion package (easing, durations, a pointer spring), the useMotionSafe gate, and the entrance engine the reveal components share.",
      "categories": [
        "lib"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/lib/motion.ts",
          "type": "registry:lib",
          "target": "lib/motion.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "Any component animated with the motion package: take timing from here so it matches the CSS tokens, and gate on useMotionSafe so server markup is the final state. For CSS transitions use the duration-* and ease-out utilities instead.",
        "example": "const safe = useMotionSafe();\nreturn (\n  <motion.div\n    initial={safe ? { opacity: 0 } : false}\n    animate={{ opacity: 1 }}\n    transition={{ duration: DURATION.slow, ease: EASE }}\n  />\n);",
        "client": true
      }
    },
    {
      "name": "theme-color",
      "type": "registry:lib",
      "title": "Theme Color",
      "description": "Resolves a theme CSS variable such as \"--highlight\" to an rgb() string that three.js and canvas code can parse, and re-reads it when the theme changes.",
      "categories": [
        "lib"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/lib/theme-color.ts",
          "type": "registry:lib",
          "target": "lib/theme-color.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "Anything that cannot use a Tailwind class or `var()`: three.js materials, canvas drawing. In markup use the token classes (`bg-primary`, `fill-chart-1`) instead.",
        "example": "const { \"--highlight\": highlight, \"--foreground\": ink } = useThemeColors([\"--highlight\", \"--foreground\"]);\nmaterial.color.set(highlight);\n\n// Outside React:\nconst border = readThemeColor(\"--border\");",
        "client": true
      }
    },
    {
      "name": "use-controllable-state",
      "type": "registry:lib",
      "title": "Use Controllable State",
      "description": "State that a parent may control: it follows `value` when one is given and keeps its own from `defaultValue` when not, calling `onChange` either way.",
      "categories": [
        "lib"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/lib/use-controllable-state.ts",
          "type": "registry:lib",
          "target": "lib/use-controllable-state.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "Writing a component that should work both controlled (`value` + `onValueChange`) and uncontrolled (`defaultValue`), which every input-like component in the library does. Radix primitives already do this for their own state; use this for state the library adds on top.",
        "example": "function Stepper({ value, defaultValue = 0, onValueChange }: { value?: number; defaultValue?: number; onValueChange?: (value: number) => void }) {\n  const [count, setCount] = useControllableState({ value, defaultValue, onChange: onValueChange });\n  return <button onClick={() => setCount(count + 1)}>{count}</button>;\n}",
        "client": true
      }
    },
    {
      "name": "use-media",
      "type": "registry:lib",
      "title": "Use Media",
      "description": "Follows an audio or video element (playing, time, duration, buffered, volume, rate, text tracks, waiting, error) as React state, with the actions to drive it, the context player parts share, and time formatting through Intl.",
      "categories": [
        "lib"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/lib/use-media.ts",
          "type": "registry:lib",
          "target": "lib/use-media.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "Building player parts around a `<video>` or `<audio>` element the project renders. video-player, audio-player, captions and scene-strip are built on it; use it directly for a control they do not have. The element stays the source of truth: sources, HLS and DRM are attached to it by the project, and nothing here loads or decodes media.",
        "example": "function Elapsed() {\n  const { state, locale } = useMediaContext(\"Elapsed\");\n  return <span>{formatMediaTime(state.time, locale)}</span>;\n}\n\n// Without a player around it\nconst [audio, setAudio] = useState<HTMLAudioElement | null>(null);\nconst state = useMediaState(audio);\n<audio ref={setAudio} src=\"/note.mp3\" />\n<Button onClick={() => mediaActions(audio).toggle()}>{state.playing ? \"Pause\" : \"Play\"}</Button>",
        "client": true
      }
    },
    {
      "name": "use-size",
      "type": "registry:lib",
      "title": "Use Size",
      "description": "Measures an element with ResizeObserver and returns its content width and height in whole pixels.",
      "categories": [
        "lib"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/lib/use-size.ts",
          "type": "registry:lib",
          "target": "lib/use-size.ts"
        }
      ],
      "meta": {
        "category": "lib",
        "when": "Drawing to the size of a container: charts, canvases. For layout that only needs to adapt, use container queries (`@container`, `@md:`) instead.",
        "example": "const { ref, width, height } = useSize<HTMLDivElement>();\nreturn <div ref={ref} className=\"aspect-video w-full\">{width > 0 && <svg width={width} height={height} />}</div>;",
        "client": true
      }
    },
    {
      "name": "accessible-icon",
      "type": "registry:ui",
      "title": "Accessible Icon",
      "description": "Gives an icon that stands alone a name for screen readers, and hides the drawing itself from them.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/ui/accessible-icon.tsx",
          "type": "registry:ui",
          "target": "components/ui/accessible-icon.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "An icon that carries meaning with no words beside it and is not itself a control: a status mark in a table cell, a warning beside a figure. An icon-only button or link takes `aria-label` on the control instead; an icon beside its own words is decoration and takes `aria-hidden`.",
        "example": "<AccessibleIcon label=\"Verified\"><BadgeCheck strokeWidth={1.5} className=\"size-4\" /></AccessibleIcon>",
        "client": false
      }
    },
    {
      "name": "accordion",
      "type": "registry:ui",
      "title": "Accordion",
      "description": "Stacked sections whose content opens and closes under its heading.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/accordion.tsx",
          "type": "registry:ui",
          "target": "components/ui/accordion.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Questions and answers, or long settings where people need a few sections out of many. `type=\"single\"` keeps one open (add `collapsible` so it can be closed again); `type=\"multiple\"` lets several be open. For views that replace each other in one place use tabs. Do not hide content everyone needs.",
        "example": "<Accordion type=\"single\" collapsible defaultValue=\"shipping\">\n  <AccordionItem value=\"shipping\">\n    <AccordionTrigger>How long does delivery take?</AccordionTrigger>\n    <AccordionContent>Two to four working days.</AccordionContent>\n  </AccordionItem>\n  <AccordionItem value=\"returns\">\n    <AccordionTrigger>Can I send it back?</AccordionTrigger>\n    <AccordionContent>Yes, within thirty days.</AccordionContent>\n  </AccordionItem>\n</Accordion>",
        "client": true
      }
    },
    {
      "name": "alert-dialog",
      "type": "registry:ui",
      "title": "Alert Dialog",
      "description": "A dialog that interrupts with a question and waits for an answer: it has no close button and does not close on a click outside.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/alert-dialog.tsx",
          "type": "registry:ui",
          "target": "components/ui/alert-dialog.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Confirming something that cannot be undone (deleting, sending, leaving with unsaved work). Focus starts on AlertDialogCancel, so Enter never destroys by accident. For a task with fields, or anything that may simply be dismissed, use dialog; where the action can be taken back, do it at once and offer undo-line.",
        "example": "<AlertDialog>\n  <AlertDialogTrigger asChild><Button variant=\"outline\">Delete project</Button></AlertDialogTrigger>\n  <AlertDialogContent>\n    <AlertDialogHeader>\n      <AlertDialogTitle>Delete this project?</AlertDialogTitle>\n      <AlertDialogDescription>Its files and history are removed for everyone. This cannot be undone.</AlertDialogDescription>\n    </AlertDialogHeader>\n    <AlertDialogFooter>\n      <AlertDialogCancel>Keep it</AlertDialogCancel>\n      <AlertDialogAction variant=\"destructive\" onClick={remove}>Delete</AlertDialogAction>\n    </AlertDialogFooter>\n  </AlertDialogContent>\n</AlertDialog>",
        "client": true
      }
    },
    {
      "name": "alert",
      "type": "registry:ui",
      "title": "Alert",
      "description": "A message in the page with an icon, a title, a description and an optional action. Four variants: info, success, warning, destructive.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/alert.tsx",
          "type": "registry:ui",
          "target": "components/ui/alert.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Telling the reader something about the page or the result of an action, in place. For a message that appears and leaves use a toast; for one that needs an answer use a dialog.",
        "example": "<Alert variant=\"success\">\n  <AlertTitle>Payment received</AlertTitle>\n  <AlertDescription>A receipt is on its way to your inbox.</AlertDescription>\n</Alert>\n<Alert variant=\"destructive\">\n  <AlertTitle>The card was declined</AlertTitle>\n  <AlertDescription>Check the number and the expiry date, then try again.</AlertDescription>\n  <AlertAction><Button size=\"sm\" variant=\"outline\">Try again</Button></AlertAction>\n</Alert>",
        "client": false
      }
    },
    {
      "name": "audio-player",
      "type": "registry:ui",
      "title": "Audio Player",
      "description": "The parts of a sound player around an `<audio>` element: play, a waveform that is also the time bar, time, speed and mute.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/use-media"
      ],
      "files": [
        {
          "path": "registry/ui/audio-player.tsx",
          "type": "registry:ui",
          "target": "components/ui/audio-player.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A voice note, a recording, a clip of music or narration a person plays and seeks in. The project gives the element its source and, for the waveform, the peaks (computed ahead of time, or with computePeaks for a short clip); without peaks the bar is a flat line of the same size. Offer a Transcript (from captions) for anything spoken. Nothing plays by itself. For video use video-player; for a plain time bar without a waveform use scrubber.",
        "example": "<AudioPlayer aria-label=\"Voice note from Ana\">\n  <AudioPlayerAudio src=\"/note.mp3\" />\n  <AudioPlayerPlay />\n  <AudioPlayerWaveform peaks={peaks} />\n  <AudioPlayerTime />\n  <AudioPlayerRate />\n  <AudioPlayerMute />\n</AudioPlayer>\n\n// Peaks for a short clip, in the browser\nconst peaks = await computePeaks(await (await fetch(\"/note.mp3\")).arrayBuffer(), 64);",
        "client": true
      }
    },
    {
      "name": "avatar",
      "type": "registry:ui",
      "title": "Avatar",
      "description": "A round picture of a person or a team, with initials shown until the image loads or when it fails, and a group that overlaps.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/avatar.tsx",
          "type": "registry:ui",
          "target": "components/ui/avatar.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Showing who something belongs to. Always give AvatarFallback initials; give AvatarImage an alt (the name), or alt=\"\" when the name is printed next to it.",
        "example": "<Avatar size=\"lg\">\n  <AvatarImage src=\"/people/hana.jpg\" alt=\"Hana Ito\" />\n  <AvatarFallback>HI</AvatarFallback>\n</Avatar>\n<AvatarGroup aria-label=\"Team\">\n  <Avatar><AvatarFallback>AK</AvatarFallback></Avatar>\n  <Avatar><AvatarFallback>BL</AvatarFallback></Avatar>\n  <Avatar><AvatarFallback>+3</AvatarFallback></Avatar>\n</AvatarGroup>",
        "client": true
      }
    },
    {
      "name": "badge",
      "type": "registry:ui",
      "title": "Badge",
      "description": "A small label for a status, a count or a category. Six variants and an optional leading dot.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/badge.tsx",
          "type": "registry:ui",
          "target": "components/ui/badge.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Marking a state or a tag next to other content. It is not clickable: for a removable or selectable chip use a button with size \"sm\".",
        "example": "<Badge>New</Badge>\n<Badge variant=\"soft\">Beta</Badge>\n<Badge variant=\"success\" dot>Live</Badge>\n<Badge variant=\"outline\">Draft</Badge>",
        "client": false
      }
    },
    {
      "name": "bottom-sheet",
      "type": "registry:ui",
      "title": "Bottom Sheet",
      "description": "A panel that rises from the bottom edge, rests at one of several heights (snap points), and can be dragged between them or down to dismiss, with a keyboard handle that does the same.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/bottom-sheet.tsx",
          "type": "registry:ui",
          "target": "components/ui/bottom-sheet.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Phones first: details, filters, a picker or a secondary task that should stay within reach of the thumb and may be peeked at before it is opened fully. With `modal={false}` it stays open while the page behind is used (a player, a route summary). For a panel from a side edge, or one with no snap points on a desktop, use sheet; for a short decision use dialog; beside the content on wide screens use dock. Always give it a BottomSheetTitle (add className=\"sr-only\" to hide it). Opened by state with no BottomSheetTrigger, focus does not return on close: refocus the opener in `onCloseAutoFocus` on BottomSheetContent.",
        "example": "<BottomSheet snapPoints={[0.4, 0.9]}>\n  <BottomSheetTrigger asChild><Button variant=\"outline\">Details</Button></BottomSheetTrigger>\n  <BottomSheetContent>\n    <BottomSheetHandle />\n    <BottomSheetHeader>\n      <BottomSheetTitle>Saturday</BottomSheetTitle>\n      <BottomSheetDescription>Three things planned.</BottomSheetDescription>\n    </BottomSheetHeader>\n    <BottomSheetBody>…</BottomSheetBody>\n    <BottomSheetFooter>\n      <BottomSheetClose asChild><Button>Done</Button></BottomSheetClose>\n    </BottomSheetFooter>\n  </BottomSheetContent>\n</BottomSheet>\n\n// Controlled, in pixels and rems, staying open while the page is used\n<BottomSheet open={open} onOpenChange={setOpen} snapPoints={[\"6rem\", \"320px\", 1]} snap={snap} onSnapChange={setSnap} modal={false} dismissible={false}>\n  …\n</BottomSheet>",
        "client": true
      }
    },
    {
      "name": "breadcrumb",
      "type": "registry:ui",
      "title": "Breadcrumb",
      "description": "The path from the top of the site to the current page, as links with separators.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/breadcrumb.tsx",
          "type": "registry:ui",
          "target": "components/ui/breadcrumb.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Pages nested three or more levels deep, above the page title. The last item is the current page: a BreadcrumbPage, not a link. For moving between sibling pages use tabs or the navbar. With a router link, pass it through `asChild`.",
        "example": "<Breadcrumb>\n  <BreadcrumbList>\n    <BreadcrumbItem><BreadcrumbLink href=\"/\">Home</BreadcrumbLink></BreadcrumbItem>\n    <BreadcrumbSeparator />\n    <BreadcrumbItem><BreadcrumbLink href=\"/projects\">Projects</BreadcrumbLink></BreadcrumbItem>\n    <BreadcrumbSeparator />\n    <BreadcrumbItem><BreadcrumbPage>Atlas</BreadcrumbPage></BreadcrumbItem>\n  </BreadcrumbList>\n</Breadcrumb>",
        "client": false
      }
    },
    {
      "name": "button",
      "type": "registry:ui",
      "title": "Button",
      "description": "A button, or a link that looks like one. Five variants, three sizes, a loading state.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/button.tsx",
          "type": "registry:ui",
          "target": "components/ui/button.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Any action. One \"solid\" per view for the main action; \"outline\" or \"ghost\" for the rest; \"destructive\" only for deleting.",
        "example": "<Button>Save</Button>\n<Button variant=\"outline\" size=\"sm\">Cancel</Button>\n<Button asChild><a href=\"/pricing\">See pricing</a></Button>\n<Button loading>Saving</Button>",
        "client": false
      }
    },
    {
      "name": "calendar",
      "type": "registry:ui",
      "title": "Calendar",
      "description": "A month grid for choosing a day, several days or a range of days, with days that can be unavailable for a stated reason and days that carry a mark. Days are plain \"YYYY-MM-DD\" strings, so no time zone can move them.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/direction",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/calendar.tsx",
          "type": "registry:ui",
          "target": "components/ui/calendar.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Choosing dates where seeing the month matters: a booking, a stay, a deadline. It stays on the page; to open it from a field use date-picker. Never use the browser's native date input beside it. For a date far in the past that the person knows by heart (a birthday) three plain fields are quicker. Pass `locale` (the page's language) so that names, numerals and the first day of the week are right; without it the calendar is in English.",
        "example": "// One day (uncontrolled), with days that cannot be chosen and days that carry a word\n<Calendar\n  locale=\"en-GB\"\n  defaultValue=\"2026-11-14\"\n  min=\"2026-11-01\"\n  disabled={(day) => (closed.has(day) ? \"nothing open\" : false)}\n  marks={(day) => (busy.has(day) ? \"busy\" : undefined)}\n/>\n\n// A range (controlled), two months where there is room\nconst [stay, setStay] = useState<CalendarRange>({ start: null, end: null });\n<Calendar mode=\"range\" value={stay} onValueChange={setStay} numberOfMonths={2} locale=\"en-GB\" />\n\n// Several days, and its own layout with a footer\n<Calendar mode=\"multiple\" defaultValue={[\"2026-11-03\", \"2026-11-05\"]}>\n  <CalendarPrevious />\n  <CalendarNext />\n  <CalendarMonths />\n  <p className=\"px-1 pt-2 text-sm text-muted-foreground\">A dot marks a busy day.</p>\n</Calendar>",
        "client": true
      }
    },
    {
      "name": "captions",
      "type": "registry:ui",
      "title": "Captions",
      "description": "Captions drawn by the page instead of the browser, on a solid ground that reads on any picture, and a transcript: every line of a clip as a list that can be pressed to go there.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/use-media"
      ],
      "files": [
        {
          "path": "registry/ui/captions.tsx",
          "type": "registry:ui",
          "target": "components/ui/captions.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Inside video-player (Captions sits above the controls and moves with them) or beside audio-player (Transcript, or Captions with `inline`). Captions are for people who cannot hear the sound; a Transcript is also the alternative for people who cannot see or play it, so offer one for anything spoken. The lines come from a caption track of the media element (`<track kind=\"captions\">`), or from `cues` the project passes. Not a live region: with the sound on, a screen reader would talk over it.",
        "example": "// In a video player: the lines of the element's caption track\n<VideoPlayer aria-label=\"Loading the kiln\" defaultCaptions>\n  <VideoPlayerVideo src=\"/kiln.mp4\"><track kind=\"captions\" src=\"/kiln.en.vtt\" srcLang=\"en\" label=\"English\" /></VideoPlayerVideo>\n  <Captions />\n  <VideoPlayerControls>…</VideoPlayerControls>\n</VideoPlayer>\n\n// Beside an audio player: cues from the project, as a transcript\nconst cues = [{ start: 0, end: 4, text: \"Welcome.\" }, { start: 4, end: 9, text: \"This is the yard.\" }];\n<AudioPlayer aria-label=\"A walk through the yard\">\n  <AudioPlayerAudio src=\"/yard.mp3\" />\n  <AudioPlayerPlay /> <AudioPlayerWaveform peaks={peaks} />\n  <Transcript cues={cues} aria-label=\"Transcript\" lang=\"en\" />\n</AudioPlayer>",
        "client": true
      }
    },
    {
      "name": "card",
      "type": "registry:ui",
      "title": "Card",
      "description": "A flat surface with a hairline edge, and parts for a header, title, description, content and footer.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/card.tsx",
          "type": "registry:ui",
          "target": "components/ui/card.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Grouping related content: a plan, a stat, a form section. For a grid of unequal cards use bento-grid.",
        "example": "<Card>\n  <CardHeader>\n    <CardTitle>Usage</CardTitle>\n    <CardDescription>This month</CardDescription>\n  </CardHeader>\n  <CardContent>1,204 requests</CardContent>\n  <CardFooter><Button size=\"sm\">Details</Button></CardFooter>\n</Card>",
        "client": false
      }
    },
    {
      "name": "carousel",
      "type": "registry:ui",
      "title": "Carousel",
      "description": "A row of slides that is scrolled sideways one at a time (or a few at a time), with previous and next buttons, dots or a count, keys, and an optional autoplay that always has a pause button.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/direction",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/carousel.tsx",
          "type": "registry:ui",
          "target": "components/ui/carousel.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A handful of pictures or cards of equal weight where one (or a few) is enough at a time: the photos of a place, featured items, quotes. It is the browser's own scrolling with CSS scroll snap, so a swipe, a trackpad and momentum work as they do everywhere, right-to-left pages mirror by themselves and nothing moves under reduced motion; no carousel package is used (Embla, MIT, moves slides with transforms on its own engine, which this does not need). Set how many slides show with a basis on the slides (`className=\"basis-1/2 md:basis-1/3\"`). Do not hide content a person must read in a carousel, and do not autoplay anything with text to read. For looking at pictures large use gallery with lightbox; for scenes of a clip use scene-strip; for thousands of items use virtual-list.",
        "example": "<Carousel aria-label=\"Rooms\">\n  <CarouselViewport>\n    {rooms.map((room) => (\n      <CarouselSlide key={room.id}>\n        <img src={room.picture} alt={room.name} className=\"aspect-video w-full object-cover\" />\n      </CarouselSlide>\n    ))}\n  </CarouselViewport>\n  <div className=\"flex items-center justify-between gap-2\">\n    <CarouselPrevious />\n    <CarouselDots />\n    <CarouselNext />\n  </div>\n</Carousel>\n\n// Controlled, three to a view on wide screens, with a count; and one that plays by itself\n<Carousel index={index} onIndexChange={setIndex} aria-label=\"Featured\">\n  <CarouselViewport>{cards.map((card) => <CarouselSlide key={card.id} className=\"basis-full md:basis-1/3\">…</CarouselSlide>)}</CarouselViewport>\n  <CarouselPrevious /> <CarouselCount /> <CarouselNext />\n</Carousel>\n<Carousel autoplay={5000} loop aria-label=\"Highlights\">\n  <CarouselViewport>…</CarouselViewport>\n  <CarouselPlayPause /> <CarouselPrevious /> <CarouselNext />\n</Carousel>",
        "client": true
      }
    },
    {
      "name": "certainty-legend",
      "type": "registry:ui",
      "title": "Certainty Legend",
      "description": "A small key of three or four named classes (how sure something is, or any other kind), each with its own pattern as well as its own colour, where each class can be switched off and on.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/certainty-legend.tsx",
          "type": "registry:ui",
          "target": "components/ui/certainty-legend.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A scene, a map, a drawing or a chart marks its parts by class and the reader needs the key and a way to hide a class: what is recorded, what is worked out, what is a guess. The project supplies the names; the legend reports which classes are shown (`onValueChange`) and the project applies that to its own scene. Use CertaintySwatch to draw the same pattern in the scene's own key or in a caption. The pattern is what tells classes apart for someone who cannot tell the colours apart, so use it in the scene too. For filters with no key use chip; for the series of a chart, the chart's own legend.",
        "example": "const classes = [\n  { id: \"recorded\", label: \"Recorded\", description: \"Measured on site\" },\n  { id: \"inferred\", label: \"Inferred\", description: \"Worked out from what remains\" },\n  { id: \"imagined\", label: \"Imagined\", description: \"A guess, drawn to complete the picture\" },\n];\n<CertaintyLegend aria-label=\"How sure each part is\" classes={classes} defaultValue={[\"recorded\", \"inferred\", \"imagined\"]} onValueChange={(shown) => scene.show(shown)} />\n\n// The same pattern elsewhere\n<CertaintySwatch pattern=\"hatch\" tone={2} />",
        "client": true
      }
    },
    {
      "name": "checkbox",
      "type": "registry:ui",
      "title": "Checkbox",
      "description": "A checkbox with checked, unchecked and indeterminate states.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/checkbox.tsx",
          "type": "registry:ui",
          "target": "components/ui/checkbox.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Choosing any number of options, or agreeing to something that is submitted with a form. For a setting that applies at once use switch; for exactly one of several use radio-group.",
        "example": "<Label><Checkbox defaultChecked /> Email me product news</Label>\n<Checkbox checked=\"indeterminate\" aria-label=\"Select all rows\" />",
        "client": true
      }
    },
    {
      "name": "chip",
      "type": "registry:ui",
      "title": "Chip",
      "description": "A small pill for one short value: a filter that is on and can be removed, a suggestion to press, or one of a set of choices that can be switched on and off.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/chip.tsx",
          "type": "registry:ui",
          "target": "components/ui/chip.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Filters in effect above a list (Chip with ChipRemove), suggested replies or refinements under a message or a search (ChipButton), and choosing one or several short options such as moods, tags or times of day (ChipGroup). For a status that cannot be pressed use badge; for two to five views of the same thing use segmented-control; for long labels use checkboxes or radio-group.",
        "example": "// Filters in effect\n<Chip>Under 50 <ChipRemove aria-label=\"Remove the filter: under 50\" onClick={clearPrice} /></Chip>\n\n// Suggestions\n<ChipButton onClick={() => ask(\"Only this weekend\")}>Only this weekend</ChipButton>\n\n// A set of choices: several can be on (type=\"multiple\") or one (type=\"single\")\n<ChipGroup type=\"multiple\" defaultValue={[\"calm\"]} aria-label=\"Mood\">\n  <ChipGroupItem value=\"calm\">Calm</ChipGroupItem>\n  <ChipGroupItem value=\"lively\">Lively</ChipGroupItem>\n</ChipGroup>",
        "client": true
      }
    },
    {
      "name": "collapsible",
      "type": "registry:ui",
      "title": "Collapsible",
      "description": "One section that a button opens and closes in place.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/collapsible.tsx",
          "type": "registry:ui",
          "target": "components/ui/collapsible.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A single part of a page that is hidden until asked for: more options under a form, the rest of a long list, details under a summary. The trigger is yours to style (a Button through asChild). For several sections under headings use accordion; for content that floats over the page use popover.",
        "example": "<Collapsible>\n  <CollapsibleTrigger asChild><Button variant=\"ghost\" size=\"sm\">More options</Button></CollapsibleTrigger>\n  <CollapsibleContent>\n    <p>Shown only while open.</p>\n  </CollapsibleContent>\n</Collapsible>",
        "client": true
      }
    },
    {
      "name": "combobox",
      "type": "registry:ui",
      "title": "Combobox",
      "description": "A select with a search field: a button that shows the choice and opens a list that narrows as one types.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/command",
        "@rivier-ui/popover",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/combobox.tsx",
          "type": "registry:ui",
          "target": "components/ui/combobox.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Choosing one value from a list too long to scan: a country, a city, a person, a product. Under about eight options use select (or radio-group, or segmented-control for two to five); for running actions rather than choosing a value use command; for several values use chip or checkboxes. Name the trigger with a Label (`htmlFor` its `id`) or `aria-label`. Each item's `value` is what is stored; what is typed is matched against the item's text.",
        "example": "const CITIES = [{ value: \"lis\", label: \"Lisbon\" }, { value: \"opo\", label: \"Porto\" }];\nconst [city, setCity] = useState(\"\");\n\n<Combobox value={city} onValueChange={setCity} name=\"city\">\n  <ComboboxTrigger aria-label=\"City\" className=\"w-56\">\n    <ComboboxValue placeholder=\"Choose a city\">{CITIES.find((item) => item.value === city)?.label}</ComboboxValue>\n  </ComboboxTrigger>\n  <ComboboxContent aria-label=\"Cities\">\n    <ComboboxInput placeholder=\"Search cities\" />\n    <ComboboxList>\n      <ComboboxEmpty>No city found.</ComboboxEmpty>\n      {CITIES.map((item) => (\n        <ComboboxItem key={item.value} value={item.value}>{item.label}</ComboboxItem>\n      ))}\n    </ComboboxList>\n  </ComboboxContent>\n</Combobox>",
        "client": true
      }
    },
    {
      "name": "command",
      "type": "registry:ui",
      "title": "Command",
      "description": "A command palette: a search field over a filtered, keyboard-driven list of actions, inline or in a dialog.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "cmdk",
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/dialog"
      ],
      "files": [
        {
          "path": "registry/ui/command.tsx",
          "type": "registry:ui",
          "target": "components/ui/command.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Fast access to many actions or pages by typing (the Ctrl/Cmd+K palette), or a searchable list inside a popover. For a handful of actions use dropdown-menu. CommandDialog is usually opened by a shortcut, with no trigger, so focus has nowhere to return: remember the opener (`opener.current = document.activeElement` before opening) and refocus it in `onCloseAutoFocus={(event) => { event.preventDefault(); opener.current?.focus(); }}`.",
        "example": "const [open, setOpen] = useState(false);\n\n<Button variant=\"outline\" onClick={() => setOpen(true)}>Search</Button>\n<CommandDialog open={open} onOpenChange={setOpen}>\n  <CommandInput placeholder=\"Type a command\" />\n  <CommandList>\n    <CommandEmpty>Nothing found.</CommandEmpty>\n    <CommandGroup heading=\"Pages\">\n      <CommandItem onSelect={() => setOpen(false)}>Dashboard</CommandItem>\n      <CommandItem onSelect={() => setOpen(false)}>Settings <CommandShortcut>Ctrl ,</CommandShortcut></CommandItem>\n    </CommandGroup>\n    <CommandSeparator />\n    <CommandGroup heading=\"Account\">\n      <CommandItem onSelect={() => setOpen(false)}>Sign out</CommandItem>\n    </CommandGroup>\n  </CommandList>\n</CommandDialog>",
        "client": true
      }
    },
    {
      "name": "compare-slider",
      "type": "registry:ui",
      "title": "Compare Slider",
      "description": "Two layers of the same size, one over the other, with a divider that is dragged or moved with the keyboard to show more of one and less of the other: then and now, before and after.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/compare-slider.tsx",
          "type": "registry:ui",
          "target": "components/ui/compare-slider.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Comparing two views of the same thing in the same frame: two pictures, two maps, two 3D viewers, any two children. Each side has a visible name. The divider is a slider, so it works without dragging. The frame is drawn left to right in every language (a picture is not mirrored in a right-to-left page), so the first layer is always on the left and the arrow keys move the divider the way they point. For two things that are not the same view use two cards side by side; for many pictures use gallery or carousel.",
        "example": "<CompareSlider aspect={16 / 9} labels={{ first: \"1930\", second: \"Today\" }} aria-label=\"The square in 1930 and today\">\n  <CompareSliderFirst><img src=\"/square-1930.jpg\" alt=\"The square in 1930: a tram stop and a kiosk\" /></CompareSliderFirst>\n  <CompareSliderSecond><img src=\"/square-today.jpg\" alt=\"The square today: trees and a fountain\" /></CompareSliderSecond>\n  <CompareSliderLabels />\n  <CompareSliderHandle />\n</CompareSlider>\n\n// Controlled, with any two children\n<CompareSlider value={split} onValueChange={setSplit} labels={{ first: \"Survey\", second: \"Reconstruction\" }} aria-label=\"Survey and reconstruction\">\n  <CompareSliderFirst><SurveyView /></CompareSliderFirst>\n  <CompareSliderSecond><ReconstructionView /></CompareSliderSecond>\n  <CompareSliderLabels />\n  <CompareSliderHandle />\n</CompareSlider>",
        "client": true
      }
    },
    {
      "name": "compare-table",
      "type": "registry:ui",
      "title": "Compare Table",
      "description": "Two to four things side by side, attribute by attribute: a table whose first column (the attribute names) stays in view while the things scroll sideways inside it on narrow screens.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/compare-table.tsx",
          "type": "registry:ui",
          "target": "components/ui/compare-table.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Helping someone choose between a few similar things: plans, products, places, quotes. Give every thing the same rows, in the same order. For plain rows of data use table; for more than four things let people pick which to compare first; for one thing's details use a description list or card.",
        "example": "<CompareTable label=\"Compare the two plans\" columns={2} onlyDifferences={onlyDifferences}>\n  <CompareHeader corner=\"Plan\">\n    <CompareColumn><CompareColumnTitle>Starter</CompareColumnTitle><Button size=\"sm\">Choose</Button></CompareColumn>\n    <CompareColumn><CompareColumnTitle>Team</CompareColumnTitle><Button size=\"sm\">Choose</Button></CompareColumn>\n  </CompareHeader>\n  <CompareGroup title=\"Basics\">\n    <CompareRow label=\"Price a month\">\n      <CompareCell value={12} best>€12</CompareCell>\n      <CompareCell value={29}>€29</CompareCell>\n    </CompareRow>\n    <CompareRow label=\"Support\">\n      <CompareCell value=\"email\">By email</CompareCell>\n      <CompareCell value=\"email\">By email</CompareCell>\n    </CompareRow>\n  </CompareGroup>\n</CompareTable>",
        "client": false
      }
    },
    {
      "name": "composer",
      "type": "registry:ui",
      "title": "Composer",
      "description": "The box a person writes a message in: a field that grows with the text, a list of attachments, and a toolbar with slots for an attach button, a voice button and send (which becomes stop while a reply is on its way).",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chip",
        "@rivier-ui/cn",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/composer.tsx",
          "type": "registry:ui",
          "target": "components/ui/composer.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Under a thread, or anywhere a person sends free text to an assistant or to other people. It owns the text and the keys (Enter sends, Shift+Enter makes a new line, nothing is sent while an input method is composing); the project owns the files, the microphone and the sending. For one line with no attachments (a search box) use input-group; for a long form field use textarea.",
        "example": "<Composer onSubmit={send} busy={replying} onStop={stop}>\n  <ComposerAttachments aria-label=\"Attachments\">\n    {files.map((file) => (\n      <ComposerAttachment key={file.name} onRemove={() => remove(file)} removeLabel={`Remove ${file.name}`}>{file.name}</ComposerAttachment>\n    ))}\n  </ComposerAttachments>\n  <ComposerInput aria-label=\"Message\" placeholder=\"Ask anything\" />\n  <ComposerToolbar>\n    <ComposerAttachButton aria-label=\"Attach a file\" onFiles={add} accept=\"image/*\" multiple />\n    <ComposerVoiceButton pressed={listening} onPressedChange={setListening} />\n    <ComposerSubmit />\n  </ComposerToolbar>\n</Composer>",
        "client": true
      }
    },
    {
      "name": "consent",
      "type": "registry:ui",
      "title": "Consent",
      "description": "Asks permission before something is switched on or shared: what is asked for, item by item, each optional one with its own switch that starts off, and two equal buttons to allow or decline. As a sheet (ConsentSheet) or in the page (ConsentPanel).",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/sheet",
        "@rivier-ui/switch",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/consent.tsx",
          "type": "registry:ui",
          "target": "components/ui/consent.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Before sharing a person's data with another party, connecting an account, turning on an assistant or a feature that reads their content, or using a device permission. One consent per purpose, in plain words, at the moment it is needed. Nothing is pre-ticked and declining is as easy as allowing. For a yes or no about an action the person just started (delete, leave) use dialog; for a cookie notice use the same parts in a ConsentPanel.",
        "example": "<ConsentSheet side=\"bottom\" defaultValue={[]} onAccept={(granted) => connect(granted)} onDecline={skip} onDismiss={skip}>\n  <ConsentTrigger asChild><Button>Connect calendar</Button></ConsentTrigger>\n  <ConsentContent>\n    <ConsentHeader>\n      <ConsentTitle>Let the planner see your calendar?</ConsentTitle>\n      <ConsentDescription>It is used to avoid times when you are busy. You can stop this in Settings at any time.</ConsentDescription>\n    </ConsentHeader>\n    <ConsentScopes>\n      <ConsentScope value=\"busy\" title=\"Busy times\" description=\"When you are busy, without what the events are.\" required requiredLabel=\"Always needed\" />\n      <ConsentScope value=\"titles\" title=\"Event names\" description=\"So that suggestions can mention what you have planned.\" />\n    </ConsentScopes>\n    <ConsentDetails summary=\"How this is stored\">Kept for 30 days, never sold, deleted when you disconnect.</ConsentDetails>\n    <ConsentFooter>\n      <ConsentDecline>Do not allow</ConsentDecline>\n      <ConsentAccept>Allow</ConsentAccept>\n    </ConsentFooter>\n  </ConsentContent>\n</ConsentSheet>",
        "client": true
      }
    },
    {
      "name": "context-menu",
      "type": "registry:ui",
      "title": "Context Menu",
      "description": "A menu of actions that opens at the pointer on right-click, and on a long press on touch screens: items, checkbox and radio items, labels, separators, sub-menus and a shortcut slot.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/context-menu.tsx",
          "type": "registry:ui",
          "target": "components/ui/context-menu.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Shortcuts to actions on a thing in a dense interface (a file, a row, a canvas object). Nothing shows that it exists, so every action in it must also be reachable another way; for a visible button use dropdown-menu.",
        "example": "<ContextMenu>\n  <ContextMenuTrigger className=\"flex h-32 items-center justify-center rounded-surface border border-dashed text-sm\">\n    Right-click, or press and hold\n  </ContextMenuTrigger>\n  <ContextMenuContent>\n    <ContextMenuItem>Open <ContextMenuShortcut>Enter</ContextMenuShortcut></ContextMenuItem>\n    <ContextMenuCheckboxItem checked>Pinned</ContextMenuCheckboxItem>\n    <ContextMenuSub>\n      <ContextMenuSubTrigger>Label</ContextMenuSubTrigger>\n      <ContextMenuSubContent>\n        <ContextMenuRadioGroup value=\"none\">\n          <ContextMenuRadioItem value=\"none\">None</ContextMenuRadioItem>\n          <ContextMenuRadioItem value=\"urgent\">Urgent</ContextMenuRadioItem>\n        </ContextMenuRadioGroup>\n      </ContextMenuSubContent>\n    </ContextMenuSub>\n    <ContextMenuSeparator />\n    <ContextMenuItem variant=\"destructive\">Delete</ContextMenuItem>\n  </ContextMenuContent>\n</ContextMenu>",
        "client": true
      }
    },
    {
      "name": "countdown",
      "type": "registry:ui",
      "title": "Countdown",
      "description": "The time left until a moment, as text that counts down (\"4 min 12 s\"), announced to screen-reader users only at the moments the project lists.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/countdown.tsx",
          "type": "registry:ui",
          "target": "components/ui/countdown.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Something the person holds for a limited time: a reserved seat, a price that is kept, a code that expires, a session about to end. Say what happens at the end and offer a way to get more time beside it. Not for decoration or pressure: a countdown that restarts or means nothing is a dark pattern. For progress through a known amount of work use progress.",
        "example": "<p>\n  Your seats are held for{\" \"}\n  <Countdown\n    to={hold.expiresAt}\n    locale=\"en\"\n    thresholds={[300, 60]}\n    announceAt={(_, left) => `${left} left to finish booking`}\n    onExpire={release}\n    expiredLabel=\"no longer: the hold has ended\"\n  />\n</p>",
        "client": true
      }
    },
    {
      "name": "date-picker",
      "type": "registry:ui",
      "title": "Date Picker",
      "description": "A button that shows a date, or a range of dates, and opens a calendar in a popover to choose it. Values are \"YYYY-MM-DD\" strings.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/calendar",
        "@rivier-ui/cn",
        "@rivier-ui/popover",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/date-picker.tsx",
          "type": "registry:ui",
          "target": "components/ui/date-picker.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A date or a stay inside a form or a toolbar, where a calendar that is always open would take too much room. When the calendar is the main thing on the screen use calendar itself. Never the browser's native date input. Name the button by passing `aria-labelledby` with the id of its visible label: the chosen date is added to the name.",
        "example": "// One day, uncontrolled, submitted with a form as \"date\"\n<p id=\"date-label\">Date</p>\n<DatePicker defaultValue=\"2026-11-14\" name=\"date\" locale=\"en-GB\">\n  <DatePickerTrigger aria-labelledby=\"date-label\" placeholder=\"Choose a date\" />\n  <DatePickerCalendar min=\"2026-11-01\" disabled={(day) => (closed.has(day) ? \"nothing open\" : false)} />\n</DatePicker>\n\n// A range, controlled, two months where there is room\nconst [stay, setStay] = useState<CalendarRange>({ start: null, end: null });\n<DateRangePicker value={stay} onValueChange={setStay} startName=\"from\" endName=\"to\" locale=\"en-GB\">\n  <DatePickerTrigger aria-label=\"Stay\" placeholder=\"Arrival – departure\" />\n  <DatePickerCalendar numberOfMonths={2} />\n</DateRangePicker>",
        "client": true
      }
    },
    {
      "name": "dialog",
      "type": "registry:ui",
      "title": "Dialog",
      "description": "A modal window over a dimmed page, with parts for a header, title, description and footer.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/dialog.tsx",
          "type": "registry:ui",
          "target": "components/ui/dialog.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A short task or a decision that must be finished or dismissed before going on. For a panel from an edge (menus, filters, details) use sheet; for something small attached to a control use popover. Always give it a DialogTitle (add className=\"sr-only\" to hide it). Opened by a DialogTrigger, focus returns to that trigger on close. Opened by state with no trigger (a shortcut, a menu item), Radix has nothing to return to: remember the opener (`opener.current = document.activeElement` before opening) and refocus it in `onCloseAutoFocus={(event) => { event.preventDefault(); opener.current?.focus(); }}` on DialogContent.",
        "example": "<Dialog>\n  <DialogTrigger asChild><Button variant=\"outline\">Rename</Button></DialogTrigger>\n  <DialogContent>\n    <DialogHeader>\n      <DialogTitle>Rename project</DialogTitle>\n      <DialogDescription>The address of the project does not change.</DialogDescription>\n    </DialogHeader>\n    <input aria-label=\"Name\" defaultValue=\"Atlas\" className=\"h-control rounded-control border border-input px-3 text-base\" />\n    <DialogFooter>\n      <DialogClose asChild><Button variant=\"outline\">Cancel</Button></DialogClose>\n      <Button>Save</Button>\n    </DialogFooter>\n  </DialogContent>\n</Dialog>",
        "client": true
      }
    },
    {
      "name": "direction-provider",
      "type": "registry:ui",
      "title": "Direction Provider",
      "description": "Sets the reading direction (left to right, or right to left) for everything inside it: the `dir` attribute for layout and text, and the context Radix-based components read for arrow keys and placement.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/direction-provider.tsx",
          "type": "registry:ui",
          "target": "components/ui/direction-provider.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Once around the app, with the direction of the current language, in any product that has or may get a right-to-left language (Arabic, Hebrew, Persian, Urdu, Dhivehi). Also around one part of a page in the other direction. A product in one left-to-right language does not need it. Put `dir` on <html> as well (the provider's own element covers only what is inside it; menus and dialogs are portalled to <body>). For people's own words in an unknown language use `dir=\"auto\"` on that element instead.",
        "example": "// app/layout.tsx\nconst dir = directionOf(locale); // \"rtl\" for \"ar\", \"he\", \"fa\", \"ur\", \"dv\" …\n<html lang={locale} dir={dir}>\n  <body>\n    <DirectionProvider dir={dir}>{children}</DirectionProvider>\n  </body>\n</html>\n\n// anywhere below\nconst dir = useDirection();",
        "client": true
      }
    },
    {
      "name": "dock",
      "type": "registry:ui",
      "title": "Dock",
      "description": "A layout of main content with a panel docked beside it that stays while the person works: the panel can be resized with a splitter, collapsed to a slim bar, and on narrow containers gives way to a bar at the bottom.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/direction",
        "@rivier-ui/use-controllable-state",
        "@rivier-ui/use-size"
      ],
      "files": [
        {
          "path": "registry/ui/dock.tsx",
          "type": "registry:ui",
          "target": "components/ui/dock.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A working surface that belongs beside the content and is not modal: a plan next to a conversation, an inspector next to a canvas, details next to a list. For a panel that covers the page for a moment use sheet; for two fixed columns with no resizing use split. Write the parts in reading order: DockMain, DockResizer, DockPanel for a panel at the end; DockPanel, DockResizer, DockMain with side=\"start\". Below 42rem of its own width (another width with `stackBelow`) the panel and splitter are hidden and DockBar shows at the bottom: open the panel's content in a bottom-sheet from `onOpenStacked`. Where the content ends in a region that must stay lowest (a composer), put a second DockBar inside DockMain above that region with `show=\"stacked\"`, and give the one after the panel `show=\"collapsed\"`. Give the Dock a height (it fills its parent).",
        "example": "<Dock defaultSize={32} minSize={24} maxSize={50} className=\"h-[32rem]\">\n  <DockMain>…the conversation…</DockMain>\n  <DockResizer aria-label=\"Resize the plan\" />\n  <DockPanel aria-label=\"Plan\">\n    <DockCollapse aria-label=\"Hide the plan\"><PanelRightClose /></DockCollapse>\n    …the plan…\n  </DockPanel>\n  <DockBar onOpenStacked={() => setSheetOpen(true)}>Plan · 3 stops</DockBar>\n</Dock>\n\n// Controlled, in pixels, at the start\n<Dock side=\"start\" unit=\"px\" size={width} onSizeChange={setWidth} minSize={240} maxSize={480} collapsed={hidden} onCollapsedChange={setHidden}>…</Dock>\n\n// Stacks below 56rem; on a narrow dock the bar sits above the composer, not under it\n<Dock stackBelow={56} className=\"h-[32rem]\">\n  <DockMain className=\"flex flex-col\">\n    <div className=\"min-h-0 flex-1 overflow-y-auto\">…the conversation…</div>\n    <DockBar show=\"stacked\" onOpenStacked={() => setSheetOpen(true)}>Plan · 3 stops</DockBar>\n    <footer>…the composer…</footer>\n  </DockMain>\n  <DockResizer aria-label=\"Resize the plan\" />\n  <DockPanel aria-label=\"Plan\">…</DockPanel>\n  <DockBar show=\"collapsed\">Plan · 3 stops</DockBar>\n</Dock>",
        "client": true
      }
    },
    {
      "name": "dropdown-menu",
      "type": "registry:ui",
      "title": "Dropdown Menu",
      "description": "A menu of actions that opens from a button: items, checkbox and radio items, labels, separators, sub-menus and a shortcut slot.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/dropdown-menu.tsx",
          "type": "registry:ui",
          "target": "components/ui/dropdown-menu.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A list of actions or options behind one button (an account menu, \"more\" on a row). For choosing one value in a form use select; for actions on right-click use context-menu; for free content use popover. An icon-only trigger needs an `aria-label`.",
        "example": "<DropdownMenu>\n  <DropdownMenuTrigger asChild><Button variant=\"outline\">Options</Button></DropdownMenuTrigger>\n  <DropdownMenuContent align=\"start\">\n    <DropdownMenuLabel>Project</DropdownMenuLabel>\n    <DropdownMenuItem>Rename <DropdownMenuShortcut>F2</DropdownMenuShortcut></DropdownMenuItem>\n    <DropdownMenuCheckboxItem checked>Show in sidebar</DropdownMenuCheckboxItem>\n    <DropdownMenuSub>\n      <DropdownMenuSubTrigger>Move to</DropdownMenuSubTrigger>\n      <DropdownMenuSubContent>\n        <DropdownMenuRadioGroup value=\"work\">\n          <DropdownMenuRadioItem value=\"work\">Work</DropdownMenuRadioItem>\n          <DropdownMenuRadioItem value=\"archive\">Archive</DropdownMenuRadioItem>\n        </DropdownMenuRadioGroup>\n      </DropdownMenuSubContent>\n    </DropdownMenuSub>\n    <DropdownMenuSeparator />\n    <DropdownMenuItem variant=\"destructive\">Delete</DropdownMenuItem>\n  </DropdownMenuContent>\n</DropdownMenu>",
        "client": true
      }
    },
    {
      "name": "dropzone",
      "type": "registry:ui",
      "title": "Dropzone",
      "description": "A place to choose files to upload, by dropping them, pasting them or pressing a button, and the rows that show each file's progress with slots for pause, resume, retry and remove.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/progress"
      ],
      "files": [
        {
          "path": "registry/ui/dropzone.tsx",
          "type": "registry:ui",
          "target": "components/ui/dropzone.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Adding pictures, documents or other files where progress matters: a listing's photos, attachments, an import. It contains no upload engine: the project uploads (plain, or resumable such as tus) and tells each row its state and progress. For one small file in a form, an input with type=\"file\" is enough. Name the dropzone with `aria-label` or `aria-labelledby`, and word rejected files yourself from the reason given to `onReject`.",
        "example": "<Dropzone accept=\"image/*\" maxSize={10_000_000} onFiles={start} onReject={explain} aria-label=\"Add pictures\">\n  <DropzoneHint>Drop pictures here, or</DropzoneHint>\n  <DropzoneButton>Choose pictures</DropzoneButton>\n</Dropzone>\n<UploadList aria-label=\"Pictures being added\">\n  {uploads.map((upload) => (\n    <UploadItem key={upload.id} name={upload.file.name} size={upload.file.size} state={upload.state}>\n      <UploadProgress value={upload.percent} />\n      <UploadActions>\n        {upload.state === \"uploading\" ? <UploadPause onClick={() => pause(upload.id)} /> : null}\n        {upload.state === \"paused\" ? <UploadResume onClick={() => resume(upload.id)} /> : null}\n        {upload.state === \"failed\" ? <UploadRetry onClick={() => retry(upload.id)} /> : null}\n        <UploadRemove onClick={() => remove(upload.id)} />\n      </UploadActions>\n    </UploadItem>\n  ))}\n</UploadList>\n\n// A state of the project's own, with its word and tone; and a row that is not a list item\n<UploadItem as=\"div\" name=\"walk.mp4\" state=\"checking\" stateLabel=\"Being checked\" stateTone=\"warning\" />",
        "client": true
      }
    },
    {
      "name": "empty-state",
      "type": "registry:ui",
      "title": "Empty State",
      "description": "What a list, a table or a search shows when there is nothing in it: an icon, a title, a description and an action.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/empty-state.tsx",
          "type": "registry:ui",
          "target": "components/ui/empty-state.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "An empty list, zero search results, a first run. Say what belongs here and offer the one action that fills it. For a failure use alert; while loading use skeleton.",
        "example": "<EmptyState\n  title=\"No projects yet\"\n  description=\"Projects you create will appear here.\"\n  action={<Button>New project</Button>}\n/>\n<EmptyState icon={<SearchX />} title=\"No results\" description=\"Try a shorter search.\" bordered={false} />",
        "client": false
      }
    },
    {
      "name": "fact-row",
      "type": "registry:ui",
      "title": "Fact Row",
      "description": "One thing the system knows or remembers about a person or a record, shown with where it came from and what the person can do about it: correct it in place, say it is no longer true, or have it removed.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/input",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/fact-row.tsx",
          "type": "registry:ui",
          "target": "components/ui/fact-row.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Showing people what is held about them and letting them control it: remembered preferences, profile details filled in by an assistant, imported data, settings inferred from use. Every fact gets a source and at least one action. The words of the actions are the project's (the component names none). For plain label and value pairs nobody can change use a description list; for a form use field.",
        "example": "<FactList aria-label=\"What we remember\">\n  <FactRow removed={forgotten} removedMessage=\"Diet was forgotten\" restoredMessage=\"Diet was restored\">\n    <FactLabel>Diet</FactLabel>\n    <FactValue>{diet}</FactValue>\n    <FactSource>\n      <SourceChip icon={<MessageSquare />}>You said this on 3 May</SourceChip>\n    </FactSource>\n    <FactActions aria-label=\"Diet\">\n      <FactEditTrigger>Edit</FactEditTrigger>\n      <FactAction onClick={endDiet}>Not true any more</FactAction>\n      <FactAction onClick={() => setForgotten(true)}>Forget this</FactAction>\n    </FactActions>\n    <FactEditor aria-label=\"Diet\" defaultValue={diet} onSave={setDiet} savedMessage=\"Diet was changed\" />\n    <FactRemoved>\n      Diet was forgotten. <FactUndo onClick={() => setForgotten(false)}>Undo</FactUndo>\n    </FactRemoved>\n  </FactRow>\n</FactList>",
        "client": true
      }
    },
    {
      "name": "field",
      "type": "registry:ui",
      "title": "Field",
      "description": "Lays out a label, a control, a description and an error message, and connects them (htmlFor, id, aria-describedby, aria-invalid) without hand-written ids.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/label"
      ],
      "files": [
        {
          "path": "registry/ui/field.tsx",
          "type": "registry:ui",
          "target": "components/ui/field.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Every control in a form. Put the control inside FieldControl; render FieldError only when there is a message and the field turns invalid by itself. Use orientation=\"horizontal\" for a checkbox or switch beside its label, and FieldControl group for a radio group, toggle group or slider.",
        "example": "<Field>\n  <FieldLabel>Email</FieldLabel>\n  <FieldControl><Input type=\"email\" /></FieldControl>\n  <FieldDescription>We only use it to reply.</FieldDescription>\n  <FieldError>{error}</FieldError>\n</Field>\n<Field orientation=\"horizontal\">\n  <FieldControl><Switch /></FieldControl>\n  <FieldLabel>Weekly summary</FieldLabel>\n</Field>\n<Field>\n  <FieldLabel>Plan</FieldLabel>\n  <FieldControl group>\n    <RadioGroup defaultValue=\"pro\">\n      <Label><RadioGroupItem value=\"free\" /> Free</Label>\n      <Label><RadioGroupItem value=\"pro\" /> Pro</Label>\n    </RadioGroup>\n  </FieldControl>\n</Field>",
        "client": true
      }
    },
    {
      "name": "gallery",
      "type": "registry:ui",
      "title": "Gallery",
      "description": "A set of picture tiles that open a full-screen viewer: a mosaic of one large and several small, an even grid, or a row that scrolls sideways.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/lightbox"
      ],
      "files": [
        {
          "path": "registry/ui/gallery.tsx",
          "type": "registry:ui",
          "target": "components/ui/gallery.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Showing several pictures of one thing where each can be looked at closely: a place, a product, a piece of work. GalleryLightbox takes a list of pictures and does everything; Gallery, GalleryItem and GalleryImage are the parts, to put inside your own Lightbox or to use with no viewer at all. Pictures are plain `<img>` elements unless the project gives its framework's image component: `as` on GalleryImage, `renderImage` on GalleryLightbox. For pictures that are decoration, use plain images in a grid; for one picture use aspect.",
        "example": "<GalleryLightbox\n  title=\"Photos of the studio\"\n  layout=\"mosaic\"\n  items={[\n    { src: \"/studio-1.jpg\", alt: \"The studio from the street\" },\n    { src: \"/studio-2.jpg\", alt: \"The workbench\", caption: \"The workbench, built in 1962\" },\n  ]}\n/>\n\n// The parts, in your own lightbox\n<Lightbox count={photos.length}>\n  <Gallery layout=\"grid\" aria-label=\"Photos\">\n    {photos.map((photo, index) => (\n      <LightboxTrigger key={photo.src} index={index} asChild>\n        <GalleryItem><GalleryImage src={photo.src} alt={photo.alt} /></GalleryItem>\n      </LightboxTrigger>\n    ))}\n  </Gallery>\n  <LightboxContent>…</LightboxContent>\n</Lightbox>\n\n// With the framework's image component (here next/image) in place of <img>\n<GalleryImage as={Image} fill sizes=\"(min-width: 48rem) 25vw, 50vw\" src={photo.src} alt={photo.alt} />\n<GalleryLightbox\n  title=\"Photos of the studio\"\n  items={photos}\n  renderImage={({ use, picture, props }) =>\n    use === \"tile\" ? <GalleryImage as={Image} fill sizes=\"25vw\" {...props} /> : <Image {...props} width={use === \"slide\" ? picture.width : 96} height={use === \"slide\" ? picture.height : 72} />\n  }\n/>",
        "client": true
      }
    },
    {
      "name": "hotspots",
      "type": "registry:ui",
      "title": "Hotspots",
      "description": "Named buttons placed over a picture or a video at a point, each present only between two moments of the clip, with the same choices as a plain list for people who cannot point at the picture.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/use-media"
      ],
      "files": [
        {
          "path": "registry/ui/hotspots.tsx",
          "type": "registry:ui",
          "target": "components/ui/hotspots.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Something in the frame can be asked about or chosen while it is on screen: an object in a scene, a place on a still, a choice in a story. Put Hotspots inside the frame (VideoPlayer, or any `relative` box over a picture) and HotspotList after it; both take the same `hotspots`. A hotspot that appears is announced, because nothing else would tell a screen-reader user it is there. For a point on a map use the map's own markers; for marks on the time bar use the scrubber's `marks`.",
        "example": "const spots = [\n  { id: \"kiln\", x: 32, y: 55, start: 4, end: 12, label: \"The kiln door\" },\n  { id: \"shelf\", x: 70, y: 30, start: 9, end: 20, label: \"Drying shelf\" },\n];\n<VideoPlayerProvider>\n  <VideoPlayer aria-label=\"Inside the workshop\">\n    <VideoPlayerVideo src=\"/workshop.mp4\" />\n    <Hotspots hotspots={spots} onSelect={(spot) => openCard(spot.id)} />\n    <VideoPlayerControls>…</VideoPlayerControls>\n  </VideoPlayer>\n  <HotspotList hotspots={spots} onSelect={(spot) => openCard(spot.id)} aria-label=\"In this scene\" />\n</VideoPlayerProvider>",
        "client": true
      }
    },
    {
      "name": "hover-card",
      "type": "registry:ui",
      "title": "Hover Card",
      "description": "A preview that appears beside a link while the pointer rests on it or the keyboard focuses it.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/hover-card.tsx",
          "type": "registry:ui",
          "target": "components/ui/hover-card.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A look ahead at where a link goes: a person, a page, a record. It does not open on touch and a screen reader does not announce it, so it only ever repeats what following the link shows. For a hint of a few words use tooltip; for anything a person must be able to reach or act on use popover.",
        "example": "<HoverCard>\n  <HoverCardTrigger asChild><a href=\"/people/ada\">Ada Lovelace</a></HoverCardTrigger>\n  <HoverCardContent>\n    <p className=\"font-medium\">Ada Lovelace</p>\n    <p className=\"text-muted-foreground\">Wrote the first published program.</p>\n  </HoverCardContent>\n</HoverCard>",
        "client": true
      }
    },
    {
      "name": "input-group",
      "type": "registry:ui",
      "title": "Input Group",
      "description": "An input with a leading or trailing icon, text or button inside one shared border.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/input-group.tsx",
          "type": "registry:ui",
          "target": "components/ui/input-group.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A search box with an icon, a URL with a fixed prefix, a field with a unit or an inline action. For a plain input use input. Inside a field, wrap InputGroupInput (not the group) in FieldControl.",
        "example": "<InputGroup>\n  <InputGroupAddon><Search strokeWidth={1.5} /></InputGroupAddon>\n  <InputGroupInput type=\"search\" placeholder=\"Search\" aria-label=\"Search\" />\n</InputGroup>\n<InputGroup size=\"sm\">\n  <InputGroupAddon>https://</InputGroupAddon>\n  <InputGroupInput placeholder=\"example.com\" aria-label=\"Website\" />\n  <InputGroupAddon><InputGroupButton>Check</InputGroupButton></InputGroupAddon>\n</InputGroup>",
        "client": true
      }
    },
    {
      "name": "input",
      "type": "registry:ui",
      "title": "Input",
      "description": "A single-line text input in three sizes, with an invalid state.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/input.tsx",
          "type": "registry:ui",
          "target": "components/ui/input.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Short free text: a name, an email, a number. Wrap it in field for a label and an error; use textarea for several lines, select for a fixed list, input-group to add an icon or a button inside the edge.",
        "example": "<Input type=\"email\" placeholder=\"you@example.com\" />\n<Input size=\"sm\" defaultValue=\"Rivier\" />\n<Input aria-invalid=\"true\" aria-label=\"Email\" defaultValue=\"not-an-email\" />",
        "client": false
      }
    },
    {
      "name": "kbd",
      "type": "registry:ui",
      "title": "Kbd",
      "description": "A key cap for showing a keyboard key or a shortcut.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/kbd.tsx",
          "type": "registry:ui",
          "target": "components/ui/kbd.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Naming a key the reader can press: in a menu item, a tooltip, a hint under a field. Wrap a combination in KbdGroup, one Kbd per key.",
        "example": "<Kbd>Esc</Kbd>\n<KbdGroup>\n  <Kbd>Ctrl</Kbd>\n  <Kbd>K</Kbd>\n</KbdGroup>",
        "client": false
      }
    },
    {
      "name": "label",
      "type": "registry:ui",
      "title": "Label",
      "description": "The text name of a control. Clicking it focuses or toggles the control it points to.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/label.tsx",
          "type": "registry:ui",
          "target": "components/ui/label.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Every control needs one. Point it at a control with htmlFor, or wrap a checkbox, radio or switch in it so the whole row is the hit area. Inside field, use FieldLabel, which wires htmlFor for you.",
        "example": "<Label htmlFor=\"email\">Email</Label>\n<Input id=\"email\" type=\"email\" />\n<Label><Checkbox /> Remember me</Label>",
        "client": true
      }
    },
    {
      "name": "language-switcher",
      "type": "registry:ui",
      "title": "Language Switcher",
      "description": "A menu for choosing the interface language: each language under its own name in its own script, the current one marked, no flags.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/direction-provider",
        "@rivier-ui/dropdown-menu",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/language-switcher.tsx",
          "type": "registry:ui",
          "target": "components/ui/language-switcher.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A product in more than one language: in the header or footer, and in settings. It only reports the choice (`onValueChange`): the project navigates to the translated page or stores the preference. A flag stands for a country, not a language, so none is shown. It is a menu of radio items and not a select, because choosing a language is an action that reloads or navigates: a select that changes the page as its value changes surprises keyboard and screen-reader users. For choosing a language as data in a form (a document's language) use select.",
        "example": "<LanguageSwitcher value={locale} onValueChange={(next) => router.replace(pathname, { locale: next })} label=\"Language\" languages={[\"en\", \"fr\", \"ar\", \"ja\"]} />\n\n// With its own parts: names in the current language as a second line, and a name the project supplies\n<LanguageSwitcher defaultValue=\"en\" label=\"Language\" displayLocale=\"en\">\n  <LanguageSwitcherTrigger />\n  <LanguageSwitcherContent align=\"end\">\n    <LanguageSwitcherItem value=\"en\" />\n    <LanguageSwitcherItem value=\"ar\" />\n    <LanguageSwitcherItem value=\"dv\" name=\"ދިވެހި\" />\n  </LanguageSwitcherContent>\n</LanguageSwitcher>",
        "client": true
      }
    },
    {
      "name": "lightbox",
      "type": "registry:ui",
      "title": "Lightbox",
      "description": "A full-screen viewer for a set of pictures (or any media the project renders): swipe or arrow between slides, zoom and pan, a counter, captions, thumbnails, and the picture growing out of the thumbnail that opened it.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/direction",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/lightbox.tsx",
          "type": "registry:ui",
          "target": "components/ui/lightbox.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Looking closely at pictures that are shown small on the page: a listing's photos, a portfolio, attachments. It is a modal dialog, so focus is held inside and returns to the thumbnail of the picture shown when it closes. For a grid of thumbnails that opens it use gallery (GalleryLightbox does both). For one picture with text beside it use dialog; for a row of cards that scroll in the page use a scroll-snap row, not a lightbox. Always give it a LightboxTitle (className=\"sr-only\" hides it) and say how many slides there are with `count`.",
        "example": "<Lightbox count={photos.length}>\n  {photos.map((photo, index) => (\n    <LightboxTrigger key={photo.src} index={index} aria-label={`Open picture: ${photo.alt}`}>\n      <img src={photo.thumb} alt=\"\" className=\"size-24 rounded-control object-cover\" />\n    </LightboxTrigger>\n  ))}\n  <LightboxContent>\n    <LightboxHeader>\n      <LightboxTitle className=\"sr-only\">Photos</LightboxTitle>\n      <LightboxCounter />\n      <LightboxZoom className=\"ms-auto\" />\n      <LightboxClose />\n    </LightboxHeader>\n    <LightboxStage>\n      <LightboxViewport>\n        {photos.map((photo, index) => (\n          <LightboxSlide key={photo.src} index={index}>\n            <img src={photo.src} alt={photo.alt} className=\"max-h-full max-w-full object-contain\" />\n          </LightboxSlide>\n        ))}\n      </LightboxViewport>\n      <LightboxPrevious />\n      <LightboxNext />\n    </LightboxStage>\n  </LightboxContent>\n</Lightbox>",
        "client": true
      }
    },
    {
      "name": "media-row-list",
      "type": "registry:ui",
      "title": "Media Row List",
      "description": "The pictures or clips a person has added, as rows they can put in order, describe and choose a cover from: each row shows its state in words (an upload's, or one the project names), its progress or its error with pause, resume and retry, a field for its text alternative that can be required, a \"cover\" choice, a remove button, and room for a status line and controls of the project's own.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/dropzone",
        "@rivier-ui/input",
        "@rivier-ui/sortable-list",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/media-row-list.tsx",
          "type": "registry:ui",
          "target": "components/ui/media-row-list.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "After a dropzone, when the order of the files matters and each needs a description: the photos of a listing, the slides of a story, the pages of a document. It is ready-made from sortable-list (drag by the handle, lift and move with the keyboard, or the move buttons; every move is read out) and the upload rows of dropzone, and contains no upload engine: the project uploads and passes each row its state. For files whose order does not matter use the dropzone's own UploadList; to reorder things that are not files use sortable-list.",
        "example": "const [rows, setRows] = useState<MediaRow[]>([\n  { id: \"a\", name: \"kitchen.jpg\", size: 1_200_000, state: \"done\", alt: \"The kitchen, from the door\" },\n  { id: \"b\", name: \"garden.jpg\", size: 2_400_000, state: \"uploading\", progress: 40 },\n  { id: \"c\", name: \"stairs.jpg\", state: \"failed\", error: \"The connection dropped.\" },\n]);\nconst [cover, setCover] = useState<string | null>(\"a\");\n<MediaRowList\n  aria-label=\"Pictures, in order\"\n  items={rows}\n  onItemsChange={setRows}\n  cover={cover}\n  onCoverChange={setCover}\n  onAltChange={(id, alt) => setRows((all) => all.map((row) => (row.id === id ? { ...row, alt } : row)))}\n  onRemove={(id) => setRows((all) => all.filter((row) => row.id !== id))}\n  onRetry={(id) => upload(id)}\n/>\n\n// A state of the project's own, a status line, a control of its own, no cover choice, and a description that is required\nconst row: MediaRow = {\n  id: \"d\", name: \"walk.mp4\", state: \"checking\", stateLabel: \"Being checked\", stateTone: \"warning\",\n  status: \"Usually takes a minute.\", controls: <Button size=\"sm\" variant=\"ghost\">Trim</Button>,\n  hideCover: true, altRequired: true, altError: \"Say what the clip shows.\",\n};\n<MediaRowList aria-label=\"Clips\" items={[row]} variant=\"lines\" onAltChange={describe} onPause={pause} onResume={resume} onDropped={({ values }) => save(values)} />",
        "client": true
      }
    },
    {
      "name": "menubar",
      "type": "registry:ui",
      "title": "Menubar",
      "description": "A row of menus that stays on screen, as along the top of a desktop application: File, Edit, View.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/menubar.tsx",
          "type": "registry:ui",
          "target": "components/ui/menubar.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A working tool (an editor, a canvas, a table) with many commands that belong in named groups. The arrow keys move between the menus and through each one. Give the bar an `aria-label`. For one menu behind one button use dropdown-menu; for links between the pages of a site use navigation-menu or navbar.",
        "example": "<Menubar aria-label=\"Document\">\n  <MenubarMenu>\n    <MenubarTrigger>File</MenubarTrigger>\n    <MenubarContent>\n      <MenubarItem onSelect={create}>New <MenubarShortcut>Ctrl N</MenubarShortcut></MenubarItem>\n      <MenubarSeparator />\n      <MenubarItem onSelect={print}>Print</MenubarItem>\n    </MenubarContent>\n  </MenubarMenu>\n  <MenubarMenu>\n    <MenubarTrigger>View</MenubarTrigger>\n    <MenubarContent>\n      <MenubarCheckboxItem checked={ruler} onCheckedChange={setRuler}>Ruler</MenubarCheckboxItem>\n    </MenubarContent>\n  </MenubarMenu>\n</Menubar>",
        "client": true
      }
    },
    {
      "name": "message",
      "type": "registry:ui",
      "title": "Message",
      "description": "One message in a conversation, from the person, the assistant or the system, with parts for an avatar, the words, the time and sending state, a toolbar of actions, and suggested replies.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chip",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/message.tsx",
          "type": "registry:ui",
          "target": "components/ui/message.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Inside a thread, one per message. The person's own messages sit at the end side in a bubble; the assistant's read as plain text at the start. For words that are still arriving put streaming-text inside MessageContent; for a structured piece of a reply (a plan, a form) use part-frame beside it. Not for comments under an article or a notification list: those are plain lists.",
        "example": "<Message from=\"user\">\n  <MessageBody>\n    <MessageContent>Somewhere quiet for lunch on Saturday?</MessageContent>\n    <MessageMeta time={sentAt} status=\"failed\" />\n  </MessageBody>\n</Message>\n\n<Message from=\"assistant\">\n  <MessageAvatar><Avatar size=\"sm\"><AvatarFallback>AI</AvatarFallback></Avatar></MessageAvatar>\n  <MessageBody>\n    <MessageContent>Three places are open then.</MessageContent>\n    <MessageActions aria-label=\"Actions for this reply\">\n      <MessageAction aria-label=\"Copy\" onClick={copy}><Copy /></MessageAction>\n      <MessageAction aria-label=\"Try again\" onClick={retry}><RotateCcw /></MessageAction>\n    </MessageActions>\n    <MessageSuggestions aria-label=\"Suggested replies\">\n      <MessageSuggestion onClick={() => send(\"Only outdoors\")}>Only outdoors</MessageSuggestion>\n    </MessageSuggestions>\n  </MessageBody>\n</Message>",
        "client": true
      }
    },
    {
      "name": "navbar",
      "type": "registry:ui",
      "title": "Navbar",
      "description": "A responsive site header: a brand, a row of links and a slot for actions. Below `md` the links move into a menu button that opens them in a sheet.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/sheet"
      ],
      "files": [
        {
          "path": "registry/ui/navbar.tsx",
          "type": "registry:ui",
          "target": "components/ui/navbar.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "The top of a site or app with up to about seven top-level links. The links are written once, as NavbarLink children, and shown in the bar or in the sheet. The sheet closes when a link in it is followed, and focus returns to the menu button. Mark the current page with `current`. With a router link, pass it through `asChild`. For navigation inside a page use tabs; for the path to a page use breadcrumb.",
        "example": "<Navbar\n  brand={<a href=\"/\" className=\"text-base font-medium\">Rivier</a>}\n  actions={<Button size=\"sm\" asChild><a href=\"/contact\">Contact</a></Button>}\n>\n  <NavbarLink href=\"/work\" current>Work</NavbarLink>\n  <NavbarLink href=\"/studio\">Studio</NavbarLink>\n  <NavbarLink href=\"/about\">About</NavbarLink>\n</Navbar>",
        "client": true
      }
    },
    {
      "name": "navigation-menu",
      "type": "registry:ui",
      "title": "Navigation Menu",
      "description": "A row of site links where some open a panel of further links beneath them.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/navigation-menu.tsx",
          "type": "registry:ui",
          "target": "components/ui/navigation-menu.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "The main navigation of a site whose sections each have pages worth showing: products, documentation, a catalogue. A plain link is a NavigationMenuLink in an item; a section is a NavigationMenuTrigger with a NavigationMenuContent. Mark the current page with `active`. For a header with a brand, links and a phone menu use navbar; for commands rather than places use menubar or dropdown-menu.",
        "example": "<NavigationMenu aria-label=\"Main\">\n  <NavigationMenuList>\n    <NavigationMenuItem>\n      <NavigationMenuTrigger>Guides</NavigationMenuTrigger>\n      <NavigationMenuContent>\n        <NavigationMenuLink href=\"/guides/start\">Getting started</NavigationMenuLink>\n        <NavigationMenuLink href=\"/guides/theming\">Theming</NavigationMenuLink>\n      </NavigationMenuContent>\n    </NavigationMenuItem>\n    <NavigationMenuItem>\n      <NavigationMenuLink href=\"/pricing\" active>Pricing</NavigationMenuLink>\n    </NavigationMenuItem>\n  </NavigationMenuList>\n</NavigationMenu>",
        "client": true
      }
    },
    {
      "name": "number-stepper",
      "type": "registry:ui",
      "title": "Number Stepper",
      "description": "A number with a button either side to take one away or add one, that can also be typed: a spin button.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/number-stepper.tsx",
          "type": "registry:ui",
          "target": "components/ui/number-stepper.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A small whole number that is usually changed by a step or two: people in a party, a quantity, nights. For a number where the rough position matters use slider; for a free number (a price, a year) use input with type=\"number\". Name it with a Label (pass the same `id`) or `aria-label`.",
        "example": "<Label htmlFor=\"adults\">Adults</Label>\n<NumberStepper id=\"adults\" defaultValue={2} min={1} max={12} />\n\n// Controlled, with its own parts and translated button names\n<NumberStepper value={nights} onValueChange={setNights} min={1} aria-label=\"Nights\">\n  <NumberStepperDecrement aria-label=\"One night fewer\" />\n  <NumberStepperInput />\n  <NumberStepperIncrement aria-label=\"One night more\" />\n</NumberStepper>",
        "client": true
      }
    },
    {
      "name": "otp-field",
      "type": "registry:ui",
      "title": "Otp Field",
      "description": "A one-time code typed into one box per character: typing moves on, Backspace moves back, and a pasted code fills every box.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/otp-field.tsx",
          "type": "registry:ui",
          "target": "components/ui/otp-field.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A short code sent by message or read from an authenticator. It posts as one value under `name`, and the browser can offer the code it has just received. Label it with `aria-label`, or put it in a field with FieldControl group. For a password use password-field; for any other short text use input.",
        "example": "<OtpField name=\"code\" aria-label=\"Verification code\" onAutoSubmit={verify} autoSubmit />\n<OtpField length={4} validationType=\"alphanumeric\" value={code} onValueChange={setCode} />",
        "client": true
      }
    },
    {
      "name": "pagination",
      "type": "registry:ui",
      "title": "Pagination",
      "description": "Links to the previous, next and numbered pages of a long list, with the look of buttons.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/pagination.tsx",
          "type": "registry:ui",
          "target": "components/ui/pagination.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A list or table split over pages that people may want to jump within or link to. Each page is a real link, so it works without JavaScript; with a router link, pass it through `asChild`. On the first or last page give PaginationPrevious or PaginationNext `aria-disabled=\"true\"` and no `href`. For a feed with no natural page numbers use a \"Load more\" button.",
        "example": "<Pagination>\n  <PaginationContent>\n    <PaginationItem><PaginationPrevious href=\"?page=1\" /></PaginationItem>\n    <PaginationItem><PaginationLink href=\"?page=1\">1</PaginationLink></PaginationItem>\n    <PaginationItem><PaginationLink href=\"?page=2\" isActive>2</PaginationLink></PaginationItem>\n    <PaginationItem><PaginationEllipsis /></PaginationItem>\n    <PaginationItem><PaginationLink href=\"?page=9\">9</PaginationLink></PaginationItem>\n    <PaginationItem><PaginationNext href=\"?page=3\" /></PaginationItem>\n  </PaginationContent>\n</Pagination>",
        "client": false
      }
    },
    {
      "name": "part-frame",
      "type": "registry:ui",
      "title": "Part Frame",
      "description": "A card for one structured piece of a conversation (a plan, a result, a form) that has a life: loading, live, saving a change, replaced by a newer one, or final.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/dialog",
        "@rivier-ui/skeleton"
      ],
      "files": [
        {
          "path": "registry/ui/part-frame.tsx",
          "type": "registry:ui",
          "target": "components/ui/part-frame.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "An assistant's reply contains something to look at or work in, not only words, and that thing changes over the conversation. The frame holds its size while it loads, says \"Saving\" in words while a change is on its way, shrinks to a one-line stub when a newer frame replaces it, and can open its content full screen. For a static card use card; for words use message; for a flow of steps put steps or a wizard inside it.",
        "example": "<PartFrame state={plan.state} replacementRef={newerPlan}>\n  <PartFrameHeader>\n    <PartFrameTitle>Plan for Saturday</PartFrameTitle>\n    <PartFrameExpand title=\"Plan for Saturday\"><PlanEditor plan={plan} roomy /></PartFrameExpand>\n  </PartFrameHeader>\n  <PartFrameContent className=\"min-h-40\"><PlanEditor plan={plan} /></PartFrameContent>\n  <PartFrameFooter><Button size=\"sm\">Confirm</Button></PartFrameFooter>\n</PartFrame>\n\n// Replaced by a newer one: a stub that says so and points to it\n<PartFrame state=\"superseded\" supersededBy={<a href=\"#plan-2\">See the new plan</a>}>\n  <PartFrameHeader><PartFrameTitle>Plan for Saturday</PartFrameTitle></PartFrameHeader>\n  <PartFrameContent>…</PartFrameContent>\n</PartFrame>",
        "client": true
      }
    },
    {
      "name": "password-field",
      "type": "registry:ui",
      "title": "Password Field",
      "description": "A password input with a button that shows or hides what was typed.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/input"
      ],
      "files": [
        {
          "path": "registry/ui/password-field.tsx",
          "type": "registry:ui",
          "target": "components/ui/password-field.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Every place a password is typed. The value is hidden again when the form is sent, and the button keeps the caret where it was. Set `autoComplete` to \"current-password\" (signing in) or \"new-password\" (choosing one) so a password manager knows which to offer. For a code sent by message use otp-field.",
        "example": "<Field>\n  <FieldLabel>Password</FieldLabel>\n  <PasswordField>\n    <FieldControl><PasswordFieldInput name=\"password\" autoComplete=\"current-password\" /></FieldControl>\n    <PasswordFieldToggle />\n  </PasswordField>\n</Field>",
        "client": true
      }
    },
    {
      "name": "popover",
      "type": "registry:ui",
      "title": "Popover",
      "description": "A small floating surface attached to the control that opens it.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/popover.tsx",
          "type": "registry:ui",
          "target": "components/ui/popover.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Extra controls or details that belong to one control: a date picker, a share box, quick settings. For a hint of a few words use tooltip; for a list of actions use dropdown-menu; for a task that must block the page use dialog.",
        "example": "<Popover>\n  <PopoverTrigger asChild><Button variant=\"outline\">Share</Button></PopoverTrigger>\n  <PopoverContent align=\"start\">\n    <p className=\"text-sm font-medium\">Share this page</p>\n    <p className=\"text-sm text-muted-foreground\">Anyone with the link can view it.</p>\n  </PopoverContent>\n</Popover>",
        "client": true
      }
    },
    {
      "name": "price-breakdown",
      "type": "registry:ui",
      "title": "Price Breakdown",
      "description": "What a price is made of, line by line, and the total: labels at the start, amounts in aligned figures at the end.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/price-breakdown.tsx",
          "type": "registry:ui",
          "target": "components/ui/price-breakdown.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A quote, a basket summary, a receipt, a booking's cost before paying. Every amount the total includes gets a line, discounts and fees too. For one figure with a label use stat; for many records in rows and columns use table.",
        "example": "<PriceBreakdown currency=\"EUR\" locale=\"en-IE\" announceTotal={(total) => `Total is now ${total}`}>\n  <PriceLine label=\"2 adults\" note=\"€46 each\" amount={92} />\n  <PriceLine label=\"Service fee\" amount={6} />\n  <PriceLine label=\"Early booking\" amount={-10} discount />\n  <PriceTotal label=\"Total\" note=\"Taxes included\" amount={88} />\n</PriceBreakdown>",
        "client": true
      }
    },
    {
      "name": "progress",
      "type": "registry:ui",
      "title": "Progress",
      "description": "A bar that fills as a task completes, or slides back and forth when the amount done is not known.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/progress.tsx",
          "type": "registry:ui",
          "target": "components/ui/progress.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A wait that can be measured: an upload, a multi-step job. Leave `value` out (or pass null) for the indeterminate state. For a short unknown wait use spinner. Always label it.",
        "example": "<Progress value={64} aria-label=\"Uploading\" />\n<Progress value={3} max={8} size=\"sm\" aria-label=\"Step 3 of 8\" />\n<Progress aria-label=\"Connecting\" />",
        "client": true
      }
    },
    {
      "name": "provenance-label",
      "type": "registry:ui",
      "title": "Provenance Label",
      "description": "A label that stays on a picture, a video or a 3D view and says what it is (a photograph, a reconstruction, made by a model), with a popover for its sources, placed so the media's own controls can never cover it.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/popover"
      ],
      "files": [
        {
          "path": "registry/ui/provenance-label.tsx",
          "type": "registry:ui",
          "target": "components/ui/provenance-label.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A reader must not mistake what they are looking at: a reconstruction beside a photograph, a generated picture, an artist's impression, archive footage. Two placements. ProvenanceFrame puts the label in its own strip above the media, outside the media's box, where nothing the media draws can reach it: use this by default. `position` puts it over a top corner inside the media's box, above its controls and on a solid ground: use this when the label must also stay in full screen, with the label inside the element that goes full screen. The bottom edge is left to controls and captions. For the source of one fact in text use fact-row's SourceChip; for a key of classes inside a scene use certainty-legend.",
        "example": "// In its own strip above the media\n<ProvenanceFrame>\n  <ProvenanceLabel details={<p>Drawn from the 1890 survey and two photographs. The roof is a guess.</p>}>Imagined reconstruction</ProvenanceLabel>\n  <img src=\"/mill.jpg\" alt=\"The mill as it may have looked\" />\n</ProvenanceFrame>\n\n// Over a corner of a player, so it stays in full screen\n<VideoPlayer aria-label=\"The mill, reconstructed\">\n  <VideoPlayerVideo src=\"/mill.mp4\" />\n  <ProvenanceLabel position=\"top-start\">Imagined reconstruction</ProvenanceLabel>\n  <VideoPlayerControls>…</VideoPlayerControls>\n</VideoPlayer>",
        "client": true
      }
    },
    {
      "name": "radio-group",
      "type": "registry:ui",
      "title": "Radio Group",
      "description": "A set of radio buttons where exactly one is chosen, with arrow-key movement between them.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/radio-group.tsx",
          "type": "registry:ui",
          "target": "components/ui/radio-group.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Picking one of two to five options that should all be visible. For a longer list use select; for a compact row of icons or short words use toggle-group; for on or off use switch.",
        "example": "<RadioGroup defaultValue=\"monthly\" aria-label=\"Billing period\">\n  <Label><RadioGroupItem value=\"monthly\" /> Monthly</Label>\n  <Label><RadioGroupItem value=\"yearly\" /> Yearly</Label>\n</RadioGroup>",
        "client": true
      }
    },
    {
      "name": "scene-strip",
      "type": "registry:ui",
      "title": "Scene Strip",
      "description": "A row of the scenes or chapters of a clip, each with a picture, a name and a length, that scrolls sideways, marks the one that is playing and goes to a scene when it is pressed.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/direction",
        "@rivier-ui/use-media"
      ],
      "files": [
        {
          "path": "registry/ui/scene-strip.tsx",
          "type": "registry:ui",
          "target": "components/ui/scene-strip.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Under or beside a player whose clip has named parts: chapters of a lesson, scenes of a film, steps of a recipe. It reads the time from the player it is inside (wrap the player and the strip in VideoPlayerProvider, or put it inside AudioPlayer), or from `time` and `onSeek`. For marks on the time bar itself use the scrubber's `marks`; for the spoken lines use Transcript.",
        "example": "<VideoPlayerProvider>\n  <VideoPlayer aria-label=\"A day at the pottery\">…</VideoPlayer>\n  <SceneStrip\n    aria-label=\"Scenes\"\n    scenes={[\n      { start: 0, label: \"Wedging the clay\", picture: <img src=\"/scene-1.jpg\" alt=\"\" /> },\n      { start: 42, label: \"On the wheel\", picture: <img src=\"/scene-2.jpg\" alt=\"\" /> },\n    ]}\n  />\n</VideoPlayerProvider>",
        "client": true
      }
    },
    {
      "name": "scroll-area",
      "type": "registry:ui",
      "title": "Scroll Area",
      "description": "A scrolling region with thin, themed scrollbars that look the same on every platform. Native scrolling underneath.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/scroll-area.tsx",
          "type": "registry:ui",
          "target": "components/ui/scroll-area.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A bounded list or panel inside a surface: a menu, a sidebar, a log. Give it a height (or a max height). The page itself, and anything that can simply grow, should scroll natively.",
        "example": "<ScrollArea className=\"h-64 rounded-surface border\" aria-label=\"Changelog\">\n  <div className=\"p-4 text-sm\">Long content…</div>\n</ScrollArea>\n<ScrollArea orientation=\"horizontal\" className=\"w-full\">\n  <div className=\"flex w-max gap-3 pb-3\">…</div>\n</ScrollArea>",
        "client": true
      }
    },
    {
      "name": "scrubber",
      "type": "registry:ui",
      "title": "Scrubber",
      "description": "The time bar of a player: a slider over the length of a clip that shows what has played and what has loaded, marks chapters, and can show the time and a picture for the moment under the pointer.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/use-controllable-state",
        "@rivier-ui/use-media"
      ],
      "files": [
        {
          "path": "registry/ui/scrubber.tsx",
          "type": "registry:ui",
          "target": "components/ui/scrubber.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Seeking in audio, video or any timeline measured in seconds. video-player and audio-player already contain one bound to their media; use this directly for a custom player or a timeline. For choosing a number that is not a time use slider. Time runs left to right in every language (as on players everywhere: the bar is a picture of time, like a clock face, not a line of text), so the bar and its arrow keys are not mirrored in right-to-left pages; pass `dir=\"rtl\"` if a product decides otherwise, and the keys follow what is drawn.",
        "example": "// Uncontrolled\n<Scrubber duration={200} defaultValue={65} aria-label=\"Seek\" onValueCommit={(time) => player.seek(time)} />\n\n// Controlled by the player's clock, with chapters and a preview picture from a sprite sheet\n<Scrubber\n  value={time}\n  duration={duration}\n  buffered={[[0, 90]]}\n  marks={[{ time: 0, label: \"Opening\" }, { time: 60, label: \"The climb\" }]}\n  onValueCommit={seek}\n  aria-label=\"Seek\"\n>\n  <ScrubberTrack />\n  <ScrubberThumb />\n  <ScrubberPreview thumbnail={{ url: \"/sprite.jpg\", columns: 10, rows: 10, interval: 2 }} />\n</Scrubber>",
        "client": true
      }
    },
    {
      "name": "segmented-control",
      "type": "registry:ui",
      "title": "Segmented Control",
      "description": "A row of two to five segments where exactly one is chosen, with a marker that slides to the choice.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/layout-transition",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/ui/segmented-control.tsx",
          "type": "registry:ui",
          "target": "components/ui/segmented-control.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Switching one setting between a few short, equal options that take effect at once: a view (list or map), a unit, a period (day, week, month). It is a radio group, so one option is always chosen. For switching panels of content use tabs; for options that can each be on or off use toggle-group or chip; for more than five options use select.",
        "example": "<SegmentedControl defaultValue=\"list\" aria-label=\"View\">\n  <SegmentedControlItem value=\"list\">List</SegmentedControlItem>\n  <SegmentedControlItem value=\"map\">Map</SegmentedControlItem>\n</SegmentedControl>\n\n// Controlled, full width, with icons\n<SegmentedControl value={period} onValueChange={setPeriod} aria-label=\"Period\" className=\"w-full\">\n  <SegmentedControlItem value=\"day\"><Sun /> Day</SegmentedControlItem>\n  <SegmentedControlItem value=\"week\"><Calendar /> Week</SegmentedControlItem>\n</SegmentedControl>",
        "client": true
      }
    },
    {
      "name": "select",
      "type": "registry:ui",
      "title": "Select",
      "description": "A themed dropdown for choosing one value from a list, with groups, labels and separators. Never a native select.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/select.tsx",
          "type": "registry:ui",
          "target": "components/ui/select.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Picking one of more than about five options, or when space is tight. For two to five visible options use radio-group; for a short row of icons use toggle-group.",
        "example": "<Select defaultValue=\"eur\">\n  <SelectTrigger aria-label=\"Currency\" className=\"w-48\">\n    <SelectValue placeholder=\"Currency\" />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectGroup>\n      <SelectLabel>Europe</SelectLabel>\n      <SelectItem value=\"eur\">Euro</SelectItem>\n      <SelectItem value=\"sek\">Swedish krona</SelectItem>\n    </SelectGroup>\n    <SelectSeparator />\n    <SelectGroup>\n      <SelectLabel>Americas</SelectLabel>\n      <SelectItem value=\"usd\">US dollar</SelectItem>\n      <SelectItem value=\"cad\" disabled>Canadian dollar</SelectItem>\n    </SelectGroup>\n  </SelectContent>\n</Select>",
        "client": true
      }
    },
    {
      "name": "separator",
      "type": "registry:ui",
      "title": "Separator",
      "description": "A hairline between two pieces of content, horizontal or vertical, with an optional label in the middle.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/separator.tsx",
          "type": "registry:ui",
          "target": "components/ui/separator.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Dividing groups inside a surface or a toolbar. Between page sections use section spacing instead, and inside a list prefer a border on the rows.",
        "example": "<Separator />\n<Separator>or continue with</Separator>\n<div className=\"flex h-5 items-center gap-3\">\n  <span>Docs</span>\n  <Separator orientation=\"vertical\" />\n  <span>Blog</span>\n</div>",
        "client": true
      }
    },
    {
      "name": "sheet",
      "type": "registry:ui",
      "title": "Sheet",
      "description": "A modal panel that slides in from an edge of the screen, with parts for a header, title, description and footer.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/sheet.tsx",
          "type": "registry:ui",
          "target": "components/ui/sheet.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Navigation, filters, details or a longer form beside the page. `side` is \"end\" by default (\"start\" and \"end\" follow the reading direction; \"left\" and \"right\" do not); on phones \"bottom\" is the natural choice, because it is within reach of the thumb. For a short decision in the middle of the screen use dialog. Always give it a SheetTitle (add className=\"sr-only\" to hide it). Opened by state with no SheetTrigger, focus does not return on close: remember the opener (`opener.current = document.activeElement`) and refocus it in `onCloseAutoFocus={(event) => { event.preventDefault(); opener.current?.focus(); }}` on SheetContent.",
        "example": "<Sheet>\n  <SheetTrigger asChild><Button variant=\"outline\">Filters</Button></SheetTrigger>\n  <SheetContent side=\"bottom\">\n    <SheetHeader>\n      <SheetTitle>Filters</SheetTitle>\n      <SheetDescription>Narrow the list of projects.</SheetDescription>\n    </SheetHeader>\n    <div className=\"px-5\">…</div>\n    <SheetFooter>\n      <SheetClose asChild><Button>Show results</Button></SheetClose>\n    </SheetFooter>\n  </SheetContent>\n</Sheet>",
        "client": true
      }
    },
    {
      "name": "skeleton",
      "type": "registry:ui",
      "title": "Skeleton",
      "description": "A pulsing block that stands in for content that is loading: a bare block sized by hand, lines of text, or a wrapper that takes the exact size of the real content. It is still under reduced motion.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/skeleton.tsx",
          "type": "registry:ui",
          "target": "components/ui/skeleton.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Content whose shape is known is on its way. Nothing may jump when it arrives: either size the block like the thing it replaces, or wrap the real component (rendered with placeholder data) in `<Skeleton loading>` so the box is exactly its final size. Mark the region that is loading with `aria-busy=\"true\"`: the placeholders themselves are hidden from assistive technology. For an unknown wait use spinner; for a measurable one use progress.",
        "example": "<div className=\"flex items-center gap-3\" aria-busy=\"true\">\n  <Skeleton className=\"size-10 rounded-full\" />\n  <SkeletonText lines={2} className=\"flex-1\" />\n</div>\n\n// Holds the final size: the card is laid out, invisible and inert, under the placeholder\n<section aria-busy={isLoading}>\n  <Skeleton loading={isLoading}>\n    <PriceCard price={price ?? PLACEHOLDER_PRICE} />\n  </Skeleton>\n</section>",
        "client": false
      }
    },
    {
      "name": "slider",
      "type": "registry:ui",
      "title": "Slider",
      "description": "A slider for one value, or a range with two thumbs.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/slider.tsx",
          "type": "registry:ui",
          "target": "components/ui/slider.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Choosing a number where the rough position matters more than the exact figure: volume, a price range. When the exact number matters use an input with type=\"number\".",
        "example": "<Slider defaultValue={[40]} max={100} step={5} aria-label=\"Volume\" />\n<Slider defaultValue={[200, 800]} min={0} max={1000} step={50} thumbLabels={[\"Lowest price\", \"Highest price\"]} />",
        "client": true
      }
    },
    {
      "name": "slot-picker",
      "type": "registry:ui",
      "title": "Slot Picker",
      "description": "Offered times as a set of pills to choose one from, optionally under named groups, each able to carry a note and to be unavailable for a stated reason.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/slot-picker.tsx",
          "type": "registry:ui",
          "target": "components/ui/slot-picker.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "The times are a short list that someone else decides: appointment slots, sittings, departures. One is chosen, so it is a radio group. For any time of the person's own choosing use time-picker; for more than about twenty slots, narrow them first (by day, by part of the day) or use select.",
        "example": "<SlotPicker defaultValue=\"10:00\" aria-label=\"Time\" locale=\"en-GB\">\n  <SlotPickerGroup label=\"Morning\">\n    <SlotPickerItem value=\"09:30\" />\n    <SlotPickerItem value=\"10:00\" note=\"2 places left\" />\n    <SlotPickerItem value=\"11:30\" unavailable=\"Full\" />\n  </SlotPickerGroup>\n  <SlotPickerGroup label=\"Afternoon\">\n    <SlotPickerItem value=\"14:00\" />\n  </SlotPickerGroup>\n</SlotPicker>\n\n// Controlled, with its own labels, and nothing on offer\n<SlotPicker value={slot} onValueChange={setSlot} aria-label=\"Sitting\">\n  {sittings.length === 0 ? <SlotPickerEmpty>Nothing is open on this day.</SlotPickerEmpty> : null}\n  {sittings.map((sitting) => <SlotPickerItem key={sitting.id} value={sitting.id}>{sitting.name}</SlotPickerItem>)}\n</SlotPicker>",
        "client": true
      }
    },
    {
      "name": "sortable-list",
      "type": "registry:ui",
      "title": "Sortable List",
      "description": "A list whose order the person sets, three ways: dragging a row by its handle (mouse, pen or touch), lifting it with the keyboard and moving it with the arrow keys, or pressing \"Move up\" and \"Move down\" buttons. Every move is read out.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/motion",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/sortable-list.tsx",
          "type": "registry:ui",
          "target": "components/ui/sortable-list.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "The order itself is the data: the stops of a plan, priorities, pictures in a gallery, columns to show. Always give the rows SortableMoveButtons or a SortableHandle (both is best): dragging alone leaves out people who cannot drag (WCAG 2.5.7). It is one vertical list; it does not move rows between lists or sort a grid. For a list sorted by a rule (newest first) use a select for the rule instead; for choosing rather than ordering use chip or checkboxes.",
        "example": "const [stops, setStops] = useState([\"market\", \"lunch\", \"museum\"]);\n<SortableList values={stops} onValuesChange={setStops} aria-label=\"Stops, in order\">\n  {stops.map((id) => (\n    <SortableItem key={id} value={id} label={NAMES[id]}>\n      <SortableHandle />\n      <span className=\"min-w-0 flex-1 truncate\">{NAMES[id]}</span>\n      <SortableMoveButtons />\n    </SortableItem>\n  ))}\n</SortableList>\n\n// Uncontrolled: the list keeps the order and gives it to its children\n<SortableList defaultValues={[\"a\", \"b\", \"c\"]} aria-label=\"Priorities\">\n  {(order) => order.map((id) => <SortableItem key={id} value={id} label={id}>…</SortableItem>)}\n</SortableList>\n\n// Save once, when a row has been let go, not at every step it passes\n<SortableList values={stops} onValuesChange={setStops} onDropped={({ from, to, values }) => (from === to ? undefined : save(values))} aria-label=\"Stops, in order\">…</SortableList>",
        "client": true
      }
    },
    {
      "name": "spinner",
      "type": "registry:ui",
      "title": "Spinner",
      "description": "A turning ring that says something is in progress, announced to assistive technology by its label.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/spinner.tsx",
          "type": "registry:ui",
          "target": "components/ui/spinner.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A short wait of unknown length. Inside a button use the button's `loading` prop; when the shape of the content is known use skeleton; when the amount done is known use progress.",
        "example": "<Spinner />\n<Spinner size=\"lg\" label=\"Loading projects\" />\n<p className=\"flex items-center gap-2\"><Spinner size=\"sm\" label=\"Saving\" /> Saving</p>",
        "client": false
      }
    },
    {
      "name": "stat",
      "type": "registry:ui",
      "title": "Stat",
      "description": "A number tile: a label, a value, an optional change with its direction, and a slot for a sparkline.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/stat.tsx",
          "type": "registry:ui",
          "target": "components/ui/stat.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A headline figure on a dashboard or in a bento cell. Pass `change` as a magnitude (\"12%\"): the sign and the arrow are added from `direction`. For several figures compared over time use a chart or a table.",
        "example": "<Stat label=\"Revenue\" value=\"€48,200\" change=\"12%\" direction=\"up\" changeLabel=\"vs last month\" />\n<Stat label=\"Churn\" value=\"2.1%\" change=\"0.4 pts\" direction=\"up\" tone=\"negative\" />\n<Stat\n  label=\"Uptime\"\n  value=\"99.98%\"\n  chart={\n    <svg viewBox=\"0 0 100 24\" preserveAspectRatio=\"none\" className=\"h-8 w-full\" aria-hidden=\"true\">\n      <polyline points=\"0,18 20,14 40,16 60,8 80,10 100,4\" fill=\"none\" strokeWidth=\"1.5\" className=\"stroke-chart-1\" />\n    </svg>\n  }\n/>",
        "client": false
      }
    },
    {
      "name": "status-line",
      "type": "registry:ui",
      "title": "Status Line",
      "description": "One line that says in words what is happening now (\"Searching\", \"Writing a reply\", \"Done\"), read out politely by screen readers, with an optional moving mark and a slot for a stop button.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/status-line.tsx",
          "type": "registry:ui",
          "target": "components/ui/status-line.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Beside a thread or any surface where work goes on that the person waits for: it is the one polite live region of that surface. Render it from the start, empty, and change its text: a region that appears together with its text is often not announced. It keeps its height when empty, so nothing jumps. For a wait with no words use spinner; for a measurable one use progress; for a result that must outlive the moment use alert or toaster.",
        "example": "<StatusLine working={busy} action={busy ? <StatusLineAction onClick={stop}>Stop</StatusLineAction> : null}>\n  {busy ? \"Searching three sources\" : \"\"}\n</StatusLine>",
        "client": false
      }
    },
    {
      "name": "steps",
      "type": "registry:ui",
      "title": "Steps",
      "description": "A rail that shows where one is in a sequence of steps: a row of thin segments, or numbered markers with titles, each step with a state (done, filled in for you, current, not started, skipped, blocked).",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/steps.tsx",
          "type": "registry:ui",
          "target": "components/ui/steps.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Showing progress through a known, ordered set of steps: a booking, a sign-up, an import, a checklist that runs in order. Use \"segments\" above a card where space is short and \"labelled\" where the step names help. Pair it with StepsCount (\"Step 2 of 5\"), which says the same in words. For a measured amount of one task use progress; for the whole guided task with its buttons use wizard, which draws this rail itself; for moving between unordered views use tabs.",
        "example": "<StepsCount current={2} total={4} />\n<Steps aria-label=\"Booking progress\">\n  <Step state=\"done\">Dates</Step>\n  <Step state=\"current\">People</Step>\n  <Step state=\"upcoming\">Extras</Step>\n  <Step state=\"upcoming\">Review</Step>\n</Steps>\n\n// Numbered markers with titles; a finished step can be a button that goes back to it\n<Steps variant=\"labelled\" aria-label=\"Import\">\n  <Step state=\"done\" onClick={() => goTo(\"file\")}>Choose a file</Step>\n  <Step state=\"assumed\" note=\"Taken from the file's first row\">Match the columns</Step>\n  <Step state=\"current\" description=\"About a minute\">Check the rows</Step>\n  <Step state=\"skipped\">Add notes</Step>\n</Steps>",
        "client": true
      }
    },
    {
      "name": "streaming-text",
      "type": "registry:ui",
      "title": "Streaming Text",
      "description": "Text that grows as it arrives, with a caret while it is arriving, that is never read out word by word: it is announced once, when it is finished.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/streaming-text.tsx",
          "type": "registry:ui",
          "target": "components/ui/streaming-text.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A reply from a model, a transcript or a log line that streams in. Pass the text so far and whether more is coming. It must not sit inside a live region (a thread is `aria-live=\"off\"`); say \"Writing a reply\" through a status-line while it streams. For text that is already complete use a plain element; for a headline that animates in use text-reveal.",
        "example": "<MessageContent>\n  <StreamingText text={reply} streaming={isStreaming} announceWhenDone onDone={saveReply} />\n</MessageContent>\n\n// A shorter spoken form, and words that fade in as they land\n<StreamingText text={reply} streaming={isStreaming} reveal=\"word\" announceWhenDone=\"Three places found. The nearest is ten minutes away.\" />\n\n// The project's own renderer (Markdown, for example)\n<StreamingText text={reply} streaming={isStreaming}>{(text) => <Markdown>{text}</Markdown>}</StreamingText>",
        "client": true
      }
    },
    {
      "name": "switch",
      "type": "registry:ui",
      "title": "Switch",
      "description": "An on/off switch.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/switch.tsx",
          "type": "registry:ui",
          "target": "components/ui/switch.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A setting that takes effect as soon as it is flipped. For a choice that is submitted with a form use checkbox; for a pressed/unpressed toolbar button use toggle.",
        "example": "<Label><Switch defaultChecked /> Weekly summary</Label>\n<Switch aria-label=\"Dark mode\" checked={dark} onCheckedChange={setDark} />",
        "client": true
      }
    },
    {
      "name": "table",
      "type": "registry:ui",
      "title": "Table",
      "description": "A semantic table with styled parts, inside a wrapper that scrolls sideways so it never overflows a narrow screen.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/table.tsx",
          "type": "registry:ui",
          "target": "components/ui/table.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Rows of the same kind of thing compared across columns. For sorting, filtering and paging build on these parts. For two or three facts per item use cards; for one number use stat.",
        "example": "<Table>\n  <TableCaption>Invoices this quarter</TableCaption>\n  <TableHeader>\n    <TableRow>\n      <TableHead>Invoice</TableHead>\n      <TableHead>Status</TableHead>\n      <TableHead numeric>Amount</TableHead>\n    </TableRow>\n  </TableHeader>\n  <TableBody>\n    <TableRow>\n      <TableCell>INV-001</TableCell>\n      <TableCell>Paid</TableCell>\n      <TableCell numeric>€250.00</TableCell>\n    </TableRow>\n  </TableBody>\n  <TableFooter>\n    <TableRow>\n      <TableCell colSpan={2}>Total</TableCell>\n      <TableCell numeric>€250.00</TableCell>\n    </TableRow>\n  </TableFooter>\n</Table>",
        "client": false
      }
    },
    {
      "name": "tabs",
      "type": "registry:ui",
      "title": "Tabs",
      "description": "Panels that share one place, switched by a row of tabs. Two looks: an underline, or a segmented pill.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/tabs.tsx",
          "type": "registry:ui",
          "target": "components/ui/tabs.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Views of the same thing that people switch between without leaving the page. `variant=\"underline\"` (the default) for sections of a page; `variant=\"pill\"` for a compact switch between two to four views. For moving between pages use links (navbar, breadcrumb); for stacked sections that can be open together use accordion.",
        "example": "<Tabs defaultValue=\"overview\">\n  <TabsList aria-label=\"Project\">\n    <TabsTrigger value=\"overview\">Overview</TabsTrigger>\n    <TabsTrigger value=\"activity\">Activity</TabsTrigger>\n  </TabsList>\n  <TabsContent value=\"overview\">The overview.</TabsContent>\n  <TabsContent value=\"activity\">The activity.</TabsContent>\n</Tabs>\n\n<Tabs defaultValue=\"month\">\n  <TabsList variant=\"pill\" aria-label=\"Billing period\">\n    <TabsTrigger value=\"month\">Monthly</TabsTrigger>\n    <TabsTrigger value=\"year\">Yearly</TabsTrigger>\n  </TabsList>\n  <TabsContent value=\"month\">Billed every month.</TabsContent>\n  <TabsContent value=\"year\">Billed once a year.</TabsContent>\n</Tabs>",
        "client": true
      }
    },
    {
      "name": "textarea",
      "type": "registry:ui",
      "title": "Textarea",
      "description": "A multi-line text input that grows with its content, with an invalid state.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/textarea.tsx",
          "type": "registry:ui",
          "target": "components/ui/textarea.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Free text of more than one line: a message, a note, a description. Wrap it in field for a label and an error; use input for a single line.",
        "example": "<Textarea placeholder=\"Tell us about the project\" rows={4} />\n<Textarea aria-invalid=\"true\" aria-label=\"Message\" defaultValue=\"Too short\" />",
        "client": false
      }
    },
    {
      "name": "theme-provider",
      "type": "registry:ui",
      "title": "Theme Provider",
      "description": "Holds the theme (light or dark, roundness, highlight colour), applies it to the page, remembers the visitor's choice, and avoids a flash of the wrong theme.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/ui/theme-provider.tsx",
          "type": "registry:ui",
          "target": "components/ui/theme-provider.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Once, around the app in the root layout, when visitors or the product can change the theme. For a fixed theme, skip it and set the attributes on <html> by hand.",
        "example": "// app/layout.tsx\n<html lang=\"en\" suppressHydrationWarning>\n  <head><ThemeScript defaults={{ mode: \"system\", radius: \"md\", accent: \"blue\" }} /></head>\n  <body>\n    <ThemeProvider defaults={{ mode: \"system\", radius: \"md\", accent: \"blue\" }}>{children}</ThemeProvider>\n  </body>\n</html>\n\n// anywhere below\nconst { theme, setTheme } = useTheme();\nsetTheme({ mode: \"dark\" });\nsetTheme({ accent: { hue: 262, chroma: 0.19 } });",
        "client": true
      }
    },
    {
      "name": "thread",
      "type": "registry:ui",
      "title": "Thread",
      "description": "The scrolling log of a conversation: it follows the newest content while the person is at the bottom, stops the moment they scroll up, and offers a way back down.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/thread.tsx",
          "type": "registry:ui",
          "target": "components/ui/thread.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A conversation with an assistant or between people, where messages arrive over time. It holds no messages and no transport: render them inside it (message, streaming-text, part-frame). The log is deliberately silent (`aria-live=\"off\"`): say what is happening through one status-line beside it, and the finished reply once through streaming-text's `announceWhenDone`. For a list that does not grow at the bottom use scroll-area.",
        "example": "<Thread aria-label=\"Conversation with the assistant\" className=\"h-[32rem]\">\n  <ThreadContent>\n    {messages.length === 0 ? <ThreadEmpty>Ask anything to begin.</ThreadEmpty> : null}\n    {messages.map((message) => (\n      <ThreadTurn key={message.id} label={message.from === \"user\" ? \"You\" : \"Assistant\"}>\n        <Message from={message.from}>\n          <MessageBody><MessageContent>{message.text}</MessageContent></MessageBody>\n        </Message>\n      </ThreadTurn>\n    ))}\n  </ThreadContent>\n  <ThreadJump>Jump to latest</ThreadJump>\n</Thread>\n\n// Always show what the person just sent, even if they had scrolled up\n<Thread aria-label=\"Conversation\" resumeKey={lastOwnMessageId}>…</Thread>",
        "client": true
      }
    },
    {
      "name": "tile-group",
      "type": "registry:ui",
      "title": "Tile Group",
      "description": "A grid of large tiles, each a picture or an icon with a word, where one or several are chosen.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/tile-group.tsx",
          "type": "registry:ui",
          "target": "components/ui/tile-group.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A choice that is easier to make by looking than by reading: moods, styles, room types, plans. Each tile must carry a visible word; the picture alone is never the label. For short text-only options use chip (ChipGroup); for a compact switch between a few views use segmented-control; for a long list use select or combobox.",
        "example": "<TileGroup type=\"multiple\" defaultValue={[\"quiet\"]} aria-label=\"What kind of day?\">\n  <Tile value=\"quiet\">\n    <TileMedia><img src=\"/quiet.jpg\" alt=\"\" /></TileMedia>\n    <TileLabel>Quiet</TileLabel>\n    <TileDescription>Gardens, reading rooms, slow walks</TileDescription>\n  </Tile>\n  <Tile value=\"lively\">\n    <TileMedia><img src=\"/lively.jpg\" alt=\"\" /></TileMedia>\n    <TileLabel>Lively</TileLabel>\n  </Tile>\n</TileGroup>",
        "client": true
      }
    },
    {
      "name": "time-picker",
      "type": "registry:ui",
      "title": "Time Picker",
      "description": "A time field made of an hour and a minute that are each stepped with the arrow keys or typed, with an AM/PM part where the locale uses a 12-hour clock. The value is a 24-hour \"HH:mm\" string.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/direction",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/time-picker.tsx",
          "type": "registry:ui",
          "target": "components/ui/time-picker.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Any time of the person's own choosing: an opening hour, a reminder, an arrival. When the times on offer are a fixed list use slot-picker. Never the browser's native time input. Name it with `aria-label` or `aria-labelledby`.",
        "example": "<p id=\"opens-label\">Opens at</p>\n<TimePicker aria-labelledby=\"opens-label\" defaultValue=\"09:30\" minuteStep={5} name=\"opens\" locale=\"en-GB\" />\n\n// Controlled, limited, 12-hour whatever the locale, with translated names\n<TimePicker\n  value={time}\n  onValueChange={setTime}\n  min=\"08:00\"\n  max=\"18:00\"\n  hourCycle={12}\n  aria-label=\"Pick-up time\"\n  labels={{ hour: \"Hour\", minute: \"Minute\", period: \"Morning or afternoon\", empty: \"Not set\" }}\n/>",
        "client": true
      }
    },
    {
      "name": "timeline",
      "type": "registry:ui",
      "title": "Timeline",
      "description": "An ordered list of numbered rows joined by a line: each with an optional time, a title and content, and a state (done, current, upcoming).",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/timeline.tsx",
          "type": "registry:ui",
          "target": "components/ui/timeline.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Things that happen in an order: the parts of a day, the stages of an order or a delivery, a history of changes, the steps of a plan. The number and the state are read out with each row. For the steps of a form the person is filling in use steps; for rows people reorder use sortable-list; for unordered items use a plain list.",
        "example": "<Timeline aria-label=\"Saturday\">\n  <TimelineItem state=\"done\">\n    <TimelineTime dateTime=\"2026-03-14T09:30\">09:30</TimelineTime>\n    <TimelineTitle>Market walk</TimelineTitle>\n    <TimelineContent>Meet at the north gate.</TimelineContent>\n  </TimelineItem>\n  <TimelineItem state=\"current\">\n    <TimelineTime dateTime=\"2026-03-14T12:30\">12:30</TimelineTime>\n    <TimelineTitle>Lunch</TimelineTitle>\n  </TimelineItem>\n  <TimelineItem>\n    <TimelineTitle>Free afternoon</TimelineTitle>\n  </TimelineItem>\n</Timeline>",
        "client": false
      }
    },
    {
      "name": "toaster",
      "type": "registry:ui",
      "title": "Toaster",
      "description": "The place where toasts appear: sonner's Toaster drawn with the theme's tokens, and its `toast` function.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "sonner"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/toaster.tsx",
          "type": "registry:ui",
          "target": "components/ui/toaster.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Short confirmations and errors that need no decision (\"Saved\", \"Could not connect\"). Render one Toaster in the root layout, then call `toast` from anywhere on the client. For something that must be answered use dialog; for a message that belongs to a field or a section, show it there.",
        "example": "// app/layout.tsx\n<body>\n  {children}\n  <Toaster />\n</body>\n\n// any client component\n<Button onClick={() => toast.success(\"Saved\", { description: \"Your changes are live.\" })}>Save</Button>",
        "client": true
      }
    },
    {
      "name": "toggle-group",
      "type": "registry:ui",
      "title": "Toggle Group",
      "description": "A joined row of toggles where one (type=\"single\") or several (type=\"multiple\") are on.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/toggle"
      ],
      "files": [
        {
          "path": "registry/ui/toggle-group.tsx",
          "type": "registry:ui",
          "target": "components/ui/toggle-group.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A compact choice between a few short options or icons: alignment, a view switcher, text styles. For options with longer labels use radio-group (one) or checkboxes (several); for switching panels use tabs.",
        "example": "<ToggleGroup type=\"single\" defaultValue=\"grid\" aria-label=\"View\" variant=\"outline\">\n  <ToggleGroupItem value=\"grid\">Grid</ToggleGroupItem>\n  <ToggleGroupItem value=\"list\">List</ToggleGroupItem>\n</ToggleGroup>\n<ToggleGroup type=\"multiple\" aria-label=\"Text style\" size=\"sm\">\n  <ToggleGroupItem value=\"italic\" aria-label=\"Italic\"><Italic strokeWidth={1.5} /></ToggleGroupItem>\n  <ToggleGroupItem value=\"underline\" aria-label=\"Underline\"><Underline strokeWidth={1.5} /></ToggleGroupItem>\n</ToggleGroup>",
        "client": true
      }
    },
    {
      "name": "toggle",
      "type": "registry:ui",
      "title": "Toggle",
      "description": "A button that stays pressed: on or off.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/toggle.tsx",
          "type": "registry:ui",
          "target": "components/ui/toggle.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A toolbar state such as bold, mute or pin. For a setting use switch; for several toggles that belong together, or a pick-one row, use toggle-group.",
        "example": "<Toggle aria-label=\"Italic\"><Italic strokeWidth={1.5} /></Toggle>\n<Toggle variant=\"outline\" size=\"sm\" defaultPressed>Pinned</Toggle>",
        "client": true
      }
    },
    {
      "name": "toolbar",
      "type": "registry:ui",
      "title": "Toolbar",
      "description": "A row of buttons, toggles and links that the keyboard enters once and then moves through with the arrow keys.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/toggle"
      ],
      "files": [
        {
          "path": "registry/ui/toolbar.tsx",
          "type": "registry:ui",
          "target": "components/ui/toolbar.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "The controls over an editor, a canvas, a table or a player: one Tab stop for the whole row, however many controls it holds. Give it an `aria-label`. For one group of toggles on its own use toggle-group; for commands in named menus use menubar.",
        "example": "<Toolbar aria-label=\"Formatting\">\n  <ToolbarToggleGroup type=\"multiple\" aria-label=\"Text style\">\n    <ToolbarToggleItem value=\"bold\" aria-label=\"Bold\"><Bold strokeWidth={1.5} /></ToolbarToggleItem>\n    <ToolbarToggleItem value=\"underline\" aria-label=\"Underline\"><Underline strokeWidth={1.5} /></ToolbarToggleItem>\n  </ToolbarToggleGroup>\n  <ToolbarSeparator />\n  <ToolbarLink href=\"/help/formatting\">Help</ToolbarLink>\n  <ToolbarButton className=\"ms-auto\" onClick={save}>Save</ToolbarButton>\n</Toolbar>",
        "client": true
      }
    },
    {
      "name": "tooltip",
      "type": "registry:ui",
      "title": "Tooltip",
      "description": "A few words that appear beside a control on hover or keyboard focus.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/tooltip.tsx",
          "type": "registry:ui",
          "target": "components/ui/tooltip.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Naming an icon-only button or adding a short hint. It does not open on touch, so never put anything needed there: the control keeps its own `aria-label`. For content people interact with use popover. Put one TooltipProvider around the app (root layout); every Tooltip must be inside one.",
        "example": "<TooltipProvider>\n  <Tooltip>\n    <TooltipTrigger asChild>\n      <Button variant=\"ghost\" size=\"icon\" aria-label=\"Copy link\"><Link2 /></Button>\n    </TooltipTrigger>\n    <TooltipContent>Copy link</TooltipContent>\n  </Tooltip>\n</TooltipProvider>",
        "client": true
      }
    },
    {
      "name": "undo-line",
      "type": "registry:ui",
      "title": "Undo Line",
      "description": "A line that stays where something was just done, says what it was, and offers to undo it.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/button",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/undo-line.tsx",
          "type": "registry:ui",
          "target": "components/ui/undo-line.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "After an action that can be taken back, inside the place it happened: a row removed from a plan, a message archived, a change applied by an assistant. It stays until it is dismissed or the next action replaces it, so it is not missed the way a toast is by someone using a screen reader, a magnifier or a slow hand. For news that needs no answer and is unrelated to one place use toaster; for a decision before the action use dialog.",
        "example": "{removed ? (\n  <UndoLine>\n    <UndoLineMessage>Lunch was removed from Saturday.</UndoLineMessage>\n    <UndoLineAction onClick={restore}>Undo</UndoLineAction>\n    <UndoLineDismiss aria-label=\"Dismiss\" onClick={() => setRemoved(null)} />\n  </UndoLine>\n) : null}",
        "client": true
      }
    },
    {
      "name": "video-player",
      "type": "registry:ui",
      "title": "Video Player",
      "description": "The parts of a video player around a `<video>` element the project renders: a frame that keeps its shape, controls that step back while it plays, play, mute, volume, time, a scrubber, captions, speed, full screen, and words for loading and failure.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "lucide-react",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/dropdown-menu",
        "@rivier-ui/scrubber",
        "@rivier-ui/spinner",
        "@rivier-ui/use-media"
      ],
      "files": [
        {
          "path": "registry/ui/video-player.tsx",
          "type": "registry:ui",
          "target": "components/ui/video-player.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Any video a person controls: a clip on a page, a lesson, a recording. The project gives the element its sources (a file, or HLS attached to the element); the parts only drive it, so compose the ones the clip needs. Nothing plays by itself: for a silent, looping decoration use a plain `<video muted loop>` with its own pause control. For sound alone use audio-player; for a picture viewer use lightbox.",
        "example": "<VideoPlayer aria-label=\"How the kiln is loaded\" defaultCaptions>\n  <VideoPlayerVideo src=\"/kiln.mp4\" poster=\"/kiln.jpg\">\n    <track kind=\"captions\" src=\"/kiln.en.vtt\" srcLang=\"en\" label=\"English\" />\n  </VideoPlayerVideo>\n  <VideoPlayerLoading />\n  <VideoPlayerError />\n  <Captions />\n  <VideoPlayerControls>\n    <VideoPlayerScrubber />\n    <VideoPlayerControlsRow>\n      <VideoPlayerPlay />\n      <VideoPlayerMute />\n      <VideoPlayerVolume />\n      <VideoPlayerTime />\n      <VideoPlayerCaptionsButton className=\"ms-auto\" />\n      <VideoPlayerRate />\n      <VideoPlayerFullscreen />\n    </VideoPlayerControlsRow>\n  </VideoPlayerControls>\n</VideoPlayer>",
        "client": true
      }
    },
    {
      "name": "virtual-list",
      "type": "registry:ui",
      "title": "Virtual List",
      "description": "A long list or grid that renders only the rows in view: thousands of items of any height in a box that scrolls, or down a page that scrolls with the window, each still announced with its position in the whole list, with a way to go to an item and to come back to where the person was.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/ui/virtual-list.tsx",
          "type": "registry:ui",
          "target": "components/ui/virtual-list.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "More items than the page should hold at once (a few hundred or more): a feed, a log, search results, a picture library. Rows may have any height: each is measured once it is drawn and the rest are estimated, and the view does not jump when a row above it turns out taller. Give the box a height and a name (`aria-label`); or, where the list is the page (a feed, results under a header), `scroll=\"window\"` and no height: it then grows to its full length and the window scrolls it. For a short list render the rows plainly; for a conversation that grows at the bottom use thread; for pages of results use pagination. Written here on ResizeObserver instead of adding a virtualisation package: a headless one would bring the offsets but not the roles, the positions for screen readers, the kept focus or the restoration, which are most of this file.",
        "example": "// Rows of any height\n<VirtualList count={messages.length} estimateSize={72} getKey={(index) => messages[index].id} aria-label=\"Messages\" className=\"h-96 rounded-surface border\">\n  {(index) => <article className=\"border-b p-3\">{messages[index].text}</article>}\n</VirtualList>\n\n// A grid, as many columns as fit; the place is remembered for this tab\n<VirtualGrid count={pictures.length} columns={{ minWidth: 160 }} gap={8} estimateSize={160} restoreKey=\"library\" aria-label=\"Pictures\" className=\"h-[32rem]\">\n  {(index) => <img src={pictures[index].src} alt={pictures[index].alt} className=\"aspect-square w-full rounded-control object-cover\" />}\n</VirtualGrid>\n\n// The page scrolls, not a box: no height, and rows above and below the window are not rendered\n<VirtualList scroll=\"window\" count={results.length} estimateSize={96} getKey={(index) => results[index].id} aria-label=\"Results\">\n  {(index) => <ResultCard result={results[index]} />}\n</VirtualList>\n\n// Going to an item\nconst list = useRef<VirtualListHandle>(null);\n<VirtualList handleRef={list} count={10000} aria-label=\"Lines\">{(index) => <p className=\"p-2\">Line {index + 1}</p>}</VirtualList>\n<Button onClick={() => list.current?.scrollToIndex(4999, { align: \"center\" })}>Go to line 5,000</Button>",
        "client": true
      }
    },
    {
      "name": "visually-hidden",
      "type": "registry:ui",
      "title": "Visually Hidden",
      "description": "Keeps its content out of sight and still read by screen readers.",
      "categories": [
        "ui"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/ui/visually-hidden.tsx",
          "type": "registry:ui",
          "target": "components/ui/visually-hidden.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "Words that sighted people get from the layout and others need said: a heading for a region, the unit after a figure, the table behind a chart. Use asChild to hide an element of your own. On a single element the `sr-only` utility does the same; never use it to hide content from everyone, which is `hidden`.",
        "example": "<VisuallyHidden>Opens in a new tab</VisuallyHidden>\n<VisuallyHidden asChild><h2>Search results</h2></VisuallyHidden>",
        "client": false
      }
    },
    {
      "name": "wizard",
      "type": "registry:ui",
      "title": "Wizard",
      "description": "The shell of a guided task done one step at a time inside a card: a title with \"Step 2 of 5\", a rail of the steps, the current step, and Back, Skip and a main button named after what the step does.",
      "categories": [
        "ui"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/button",
        "@rivier-ui/cn",
        "@rivier-ui/steps",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/ui/wizard.tsx",
          "type": "registry:ui",
          "target": "components/ui/wizard.tsx"
        }
      ],
      "meta": {
        "category": "ui",
        "when": "A task that is easier one question at a time and has a known order: a booking, a set-up, an application. It keeps where one is (controlled or not), moves focus to each new step's heading, and blocks the main button with a stated reason while a step is not answered. Where a server decides what comes next, control it: give `step`, and `onNext`, `onBack` and `onSkip` in place of the wizard's own moves, with `pending` while the answer is on its way; the step still slides in and its heading still takes focus when `step` changes. For a short form show all the fields at once (field); for the rail alone use steps; for unordered sections use tabs or accordion. What each step contains is yours: the wizard holds no answers.",
        "example": "const [people, setPeople] = useState(0);\n<Wizard\n  steps={[\n    { id: \"dates\", label: \"Dates\" },\n    { id: \"people\", label: \"People\", canContinue: people > 0, blockedReason: \"Say how many people are coming.\" },\n    { id: \"extras\", label: \"Extras\", optional: true },\n    { id: \"review\", label: \"Review\" },\n  ]}\n  defaultStep=\"dates\"\n  onComplete={book}\n>\n  <WizardHeader>Book a table</WizardHeader>\n  <WizardRail />\n  <WizardStep id=\"dates\" title=\"Which day?\">…</WizardStep>\n  <WizardStep id=\"people\" title=\"How many people?\">…</WizardStep>\n  <WizardStep id=\"extras\" title=\"Anything to add?\">…</WizardStep>\n  <WizardStep id=\"review\" title=\"Check and confirm\">…</WizardStep>\n  <WizardFooter>\n    <WizardBack>Back</WizardBack>\n    <WizardSkip>Skip</WizardSkip>\n    <WizardNext>{step === \"review\" ? \"Confirm\" : \"Continue\"}</WizardNext>\n  </WizardFooter>\n</Wizard>\n\n// Driven from outside: the server says which step is next, and the rail's states are the project's\n<Wizard\n  steps={flow.steps.map((item) => ({ id: item.id, label: item.label, optional: item.optional, state: item.skipped ? \"skipped\" : undefined }))}\n  step={flow.current}\n  pending={saving}\n  onNext={(current) => submit(current.id)}\n  onBack={(current) => goBackFrom(current.id)}\n  onSkip={(current) => skip(current.id)}\n>…</Wizard>",
        "client": true
      }
    },
    {
      "name": "aspect",
      "type": "registry:component",
      "title": "Aspect",
      "description": "Holds its content at a fixed width-to-height ratio, so space is reserved before an image, video or canvas loads.",
      "categories": [
        "layout"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/layout/aspect.tsx",
          "type": "registry:component",
          "target": "components/layout/aspect.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "Media whose size is not known until it loads, or a tile that must keep its shape at any width. Make the child fill it (`size-full object-cover`). For plain CSS needs the `aspect-video` utility is enough.",
        "example": "<Aspect ratio={16 / 9} className=\"rounded-surface border\">\n  <img src=\"/shots/hero.jpg\" alt=\"The studio\" className=\"size-full object-cover\" />\n</Aspect>\n<Aspect ratio={1}><div className=\"size-full bg-muted\" /></Aspect>",
        "client": true
      }
    },
    {
      "name": "bento-grid",
      "type": "registry:component",
      "title": "Bento Grid",
      "description": "A grid of flat cards of unequal sizes. One column on a phone, two on a tablet, then 2, 3, 4 or 6: decided by the grid's own width, so it works inside any container.",
      "categories": [
        "layout"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/layout/bento-grid.tsx",
          "type": "registry:component",
          "target": "components/layout/bento-grid.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "Showing several features, figures or pieces of media as one composed block. Cells take `span` and `rowSpan`; spans are clamped to the columns there are. For equal cards use grid; for a single surface use card.",
        "example": "// Feature block: one wide lead cell, two small ones, a full-width strip.\n<BentoGrid columns={3}>\n  <BentoCell span={2} rowSpan={2}>\n    <BentoCellHeader>\n      <BentoCellTitle>Themable from one place</BentoCellTitle>\n      <BentoCellDescription>Light or dark, square to round, any highlight colour.</BentoCellDescription>\n    </BentoCellHeader>\n    <BentoCellMedia><img src=\"/shots/theme.png\" alt=\"\" /></BentoCellMedia>\n  </BentoCell>\n  <BentoCell><BentoCellHeader><BentoCellTitle>Accessible</BentoCellTitle></BentoCellHeader></BentoCell>\n  <BentoCell><BentoCellHeader><BentoCellTitle>Fast</BentoCellTitle></BentoCellHeader></BentoCell>\n  <BentoCell span=\"full\"><BentoCellHeader><BentoCellTitle>Yours to edit</BentoCellTitle></BentoCellHeader></BentoCell>\n</BentoGrid>\n\n// Dashboard: four figures on top, a wide chart beside a tall list.\n<BentoGrid columns={4} rowHeight=\"8rem\">\n  <BentoCell><Stat label=\"Revenue\" value=\"€48k\" className=\"border-0\" /></BentoCell>\n  <BentoCell><Stat label=\"Orders\" value=\"1,204\" className=\"border-0\" /></BentoCell>\n  <BentoCell><Stat label=\"Visitors\" value=\"18.2k\" className=\"border-0\" /></BentoCell>\n  <BentoCell><Stat label=\"Refunds\" value=\"12\" className=\"border-0\" /></BentoCell>\n  <BentoCell span={3} rowSpan={3}>…chart…</BentoCell>\n  <BentoCell rowSpan={3}>…recent activity…</BentoCell>\n</BentoGrid>\n\n// Link mosaic: six columns, mixed sizes, gaps back-filled, every cell a link.\n<BentoGrid columns={6} dense>\n  <BentoCell span={4} rowSpan={2} interactive asChild><a href=\"/work/atlas\">…</a></BentoCell>\n  <BentoCell span={2} interactive asChild><a href=\"/work/north\">…</a></BentoCell>\n  <BentoCell span={2} interactive asChild><a href=\"/work/field\">…</a></BentoCell>\n  <BentoCell span={3} interactive asChild><a href=\"/work/tide\">…</a></BentoCell>\n  <BentoCell span={3} interactive asChild><a href=\"/work/loom\">…</a></BentoCell>\n</BentoGrid>",
        "client": false
      }
    },
    {
      "name": "container",
      "type": "registry:component",
      "title": "Container",
      "description": "Centres content at the page width with the page gutter on both sides. Four sizes: narrow, page, wide, full.",
      "categories": [
        "layout"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/layout/container.tsx",
          "type": "registry:component",
          "target": "components/layout/container.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "Around the content of every page band so edges line up down the page. \"narrow\" for reading text, \"wide\" for galleries and dashboards, \"full\" to keep only the gutter. Section already wraps its children in one.",
        "example": "<Container>\n  <h1>Pricing</h1>\n</Container>\n<Container size=\"narrow\" asChild>\n  <article>Long-form text…</article>\n</Container>",
        "client": false
      }
    },
    {
      "name": "grid",
      "type": "registry:component",
      "title": "Grid",
      "description": "A responsive grid of equal columns that fits as many as the width allows, from a minimum column width. No breakpoints.",
      "categories": [
        "layout"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/layout/grid.tsx",
          "type": "registry:component",
          "target": "components/layout/grid.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "A set of like items: cards, logos, stats, thumbnails. It reflows inside any width, including a sidebar. For tiles of different sizes use bento-grid; for two fixed columns use split.",
        "example": "<Grid min=\"16rem\" gap=\"md\">\n  <Card>…</Card>\n  <Card>…</Card>\n  <Card>…</Card>\n</Grid>\n<Grid min=\"9rem\" gap=\"sm\" fit=\"fill\">{logos}</Grid>",
        "client": false
      }
    },
    {
      "name": "map-frame",
      "type": "registry:component",
      "title": "Map Frame",
      "description": "The frame around a map, not a map: it holds the map's size, shows a still until the person asks for the map, keeps a text list beside it, and takes the map to full screen and back. The map engine is yours.",
      "categories": [
        "layout"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/layout/map-frame.tsx",
          "type": "registry:component",
          "target": "components/layout/map-frame.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "Any page that shows a map from any engine (MapLibre, Leaflet, a hosted maps script). It gives the map what an engine does not: no request to a third party before the person presses the button (put the line about that in MapFrameNotice), no layout shift, the same information as a list (MapFrameList) so that the map is never the only way to it, a way to skip past the map with the keyboard, and full screen that behaves as a modal. For a still picture of a place with no interaction use an image in aspect.",
        "example": "<MapFrame aria-label=\"Map of the three stops\">\n  <MapFrameStage className=\"aspect-video\">\n    <MapFramePlaceholder>\n      <MapFrameActivate>Show the map</MapFrameActivate>\n      <MapFrameNotice>The map is loaded from Example Maps, which will see your address.</MapFrameNotice>\n    </MapFramePlaceholder>\n    <MapFrameCanvas><MyMapEngine stops={stops} /></MapFrameCanvas>\n    <MapFrameToolbar>\n      <MapFrameFullscreen />\n    </MapFrameToolbar>\n  </MapFrameStage>\n  <MapFrameList>\n    <ol>{stops.map((stop) => <li key={stop.id}>{stop.name}, {stop.address}</li>)}</ol>\n  </MapFrameList>\n</MapFrame>",
        "client": true
      }
    },
    {
      "name": "marquee",
      "type": "registry:component",
      "title": "Marquee",
      "description": "A row that scrolls sideways without end. It pauses on hover and on keyboard focus, and under reduced motion it is an ordinary wrapped row.",
      "categories": [
        "layout"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/layout/marquee.tsx",
          "type": "registry:component",
          "target": "components/layout/marquee.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "A strip of logos, short quotes or tags where no single item must be read. Not for content the reader needs: everything is also in the markup once, but it moves. For a few items that fit, use stack or grid.",
        "example": "<Marquee aria-label=\"Clients\" speed=\"slow\">\n  <img src=\"/logos/atlas.svg\" alt=\"Atlas\" className=\"h-8 w-auto\" />\n  <img src=\"/logos/north.svg\" alt=\"North\" className=\"h-8 w-auto\" />\n  <img src=\"/logos/field.svg\" alt=\"Field\" className=\"h-8 w-auto\" />\n</Marquee>\n<Marquee direction=\"right\" speed={25} gap=\"1rem\" fade={false}>\n  <Badge variant=\"outline\">Design</Badge>\n  <Badge variant=\"outline\">Build</Badge>\n  <Badge variant=\"outline\">Launch</Badge>\n</Marquee>",
        "client": false
      }
    },
    {
      "name": "section",
      "type": "registry:component",
      "title": "Section",
      "description": "A band of a page with consistent vertical rhythm, an optional eyebrow, title and description, and three tones: default, muted, inverse.",
      "categories": [
        "layout"
      ],
      "dependencies": [
        "class-variance-authority"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/container"
      ],
      "files": [
        {
          "path": "registry/layout/section.tsx",
          "type": "registry:component",
          "target": "components/layout/section.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "Every top-level block of a marketing or content page. \"inverse\" makes a dark band on a light page and re-themes everything inside it. Inside an app screen use stack and card instead.",
        "example": "<Section eyebrow=\"Features\" title=\"Everything in one place\" description=\"Built on the same tokens.\">\n  <BentoGrid>…</BentoGrid>\n</Section>\n<Section tone=\"inverse\" align=\"center\" title=\"Ready to start?\">\n  <Button>Get in touch</Button>\n</Section>\n<Section tone=\"muted\" spacing=\"sm\" container=\"narrow\">Plain content, no header.</Section>",
        "client": false
      }
    },
    {
      "name": "split",
      "type": "registry:component",
      "title": "Split",
      "description": "Two columns, usually media beside text, that stack into one on a narrow width. A ratio between the columns and a reverse option.",
      "categories": [
        "layout"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/layout/split.tsx",
          "type": "registry:component",
          "target": "components/layout/split.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "A feature row, a hero with an image, a form beside its explanation. Give it exactly two children. Alternate `reverse` down a page for a zigzag. For more than two columns use grid.",
        "example": "<Split ratio=\"3:2\">\n  <SplitMedia><img src=\"/shots/dashboard.png\" alt=\"The dashboard\" /></SplitMedia>\n  <SplitContent>\n    <h2 className=\"text-3xl font-medium\">See everything at once</h2>\n    <p className=\"text-muted-foreground\">One screen for the whole week.</p>\n  </SplitContent>\n</Split>\n<Split reverse align=\"start\" gap=\"lg\">\n  <SplitMedia>…</SplitMedia>\n  <SplitContent>…</SplitContent>\n</Split>",
        "client": false
      }
    },
    {
      "name": "stack",
      "type": "registry:component",
      "title": "Stack",
      "description": "A flex row or column with a gap from a fixed scale, and props for alignment, distribution and wrapping.",
      "categories": [
        "layout"
      ],
      "dependencies": [
        "class-variance-authority",
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/layout/stack.tsx",
          "type": "registry:component",
          "target": "components/layout/stack.tsx"
        }
      ],
      "meta": {
        "category": "layout",
        "when": "Spacing a run of siblings evenly: form fields, a button row, a header with actions. For columns that reflow by width use grid; for unequal tiles use bento-grid.",
        "example": "<Stack gap=\"lg\">\n  <h2>Title</h2>\n  <p>Body</p>\n</Stack>\n<Stack direction=\"horizontal\" gap=\"sm\" align=\"center\" justify=\"between\" wrap>\n  <span>Plan</span>\n  <Button size=\"sm\">Change</Button>\n</Stack>\n<Stack asChild gap=\"xs\"><ul><li>One</li><li>Two</li></ul></Stack>",
        "client": false
      }
    },
    {
      "name": "film-stage",
      "type": "registry:component",
      "title": "Film Stage",
      "description": "A stage for a sequence of timed scenes with a transport: it owns the clock and the chrome (play, time bar, speed, sound), mounts the scene for the current moment, cuts or crossfades between scenes, and can draw any moment on request for export.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "lucide-react"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/scene-strip",
        "@rivier-ui/scrubber",
        "@rivier-ui/use-controllable-state",
        "@rivier-ui/use-media"
      ],
      "files": [
        {
          "path": "registry/motion/film-stage.tsx",
          "type": "registry:component",
          "target": "components/motion/film-stage.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "Content the project draws itself from a time: an animated explainer, a story in scenes, a slideshow with narration, a film assembled from markup, SVG or canvas. Each scene gets its own local time and draws from it, so any frame can be drawn again exactly. The stage is the clock other things follow: scrubber, scene-strip, captions and hotspots work inside it as they do inside video-player, and any number of sounds (a clip for each narrated line, a bed under them) are kept in step, each from its own start for its own length. For a video or sound file use video-player or audio-player; for motion tied to scrolling use scroll-scene; for a set of pictures a person pages through use carousel.",
        "example": "const scenes = [\n  { id: \"title\", duration: 4, label: \"Title\", children: <h2 className=\"p-8 text-3xl\">How a pot is thrown</h2> },\n  { id: \"wheel\", duration: 6, label: \"On the wheel\", transition: \"crossfade\" as const, render: ({ progress }) => <Wheel turn={progress} /> },\n];\n<FilmStage scenes={scenes} aria-label=\"How a pot is thrown\">\n  <FilmStageFrame aspect={16 / 9}>\n    <Captions cues={cues} lang=\"en\" />\n  </FilmStageFrame>\n  <FilmStageAudio src=\"/narration.mp3\" />\n  <FilmStageControls>\n    <FilmStageScrubber />\n    <FilmStageControlsRow>\n      <FilmStagePreviousScene />\n      <FilmStagePlay />\n      <FilmStageNextScene />\n      <FilmStageMute />\n      <FilmStageTime />\n      <FilmStageRate className=\"ms-auto\" />\n    </FilmStageControlsRow>\n  </FilmStageControls>\n  <FilmStageSceneStrip />\n</FilmStage>\n\n// One clip for each narrated line and a bed under them; each follows the clock, the speed, a seek and the mute\n<FilmStage scenes={scenes} loop onSceneChange={(scene) => track(scene.id)} aria-label=\"How a pot is thrown\">\n  <FilmStageFrame />\n  <FilmStageAudio src=\"/bed.mp3\" volume={0.3} />\n  {lines.map((line) => <FilmStageAudio key={line.id} src={line.src} start={line.start} duration={line.length} />)}\n</FilmStage>\n\n// Export: a headless browser draws each frame, with no timer running on the page\n<FilmStage scenes={scenes} deterministic exportName=\"main\" aria-label=\"How a pot is thrown\">…</FilmStage>\n// in the page, from the exporter: await window.__filmStage.main.renderAt(frame / 30), then take the picture",
        "client": true
      }
    },
    {
      "name": "layout-transition",
      "type": "registry:component",
      "title": "Layout Transition",
      "description": "A shared element that animates from one place to another: render Morph with the same layoutId in two places and it travels between them.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/layout-transition.tsx",
          "type": "registry:component",
          "target": "components/motion/layout-transition.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A tabs or navigation indicator that slides to the active item, a card that grows into its detail view, a selection highlight. Both places must be in the same React tree. Between pages use view-transition; for content that only appears and disappears use presence.",
        "example": "const [active, setActive] = useState(\"overview\");\n<MorphGroup id=\"section-tabs\">\n  <div className=\"flex gap-1\">\n    {[\"overview\", \"pricing\", \"docs\"].map((tab) => (\n      <button key={tab} onClick={() => setActive(tab)} className=\"relative h-control rounded-control px-4 text-sm\">\n        {active === tab ? <Morph layoutId=\"indicator\" className=\"absolute inset-0 rounded-control bg-accent\" /> : null}\n        <span className=\"relative capitalize\">{tab}</span>\n      </button>\n    ))}\n  </div>\n</MorphGroup>",
        "client": true
      }
    },
    {
      "name": "magnetic",
      "type": "registry:component",
      "title": "Magnetic",
      "description": "A wrapper whose child is gently pulled toward the pointer while it is hovered, and springs back when the pointer leaves.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/magnetic.tsx",
          "type": "registry:component",
          "target": "components/motion/magnetic.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "The one main call to action on a marketing page, or an icon button that should feel alive. Not for every button, not inside dense interfaces, and it does nothing on touch screens.",
        "example": "<Magnetic>\n  <Button size=\"lg\">Start a project</Button>\n</Magnetic>\n<Magnetic strength={0.5}>\n  <Button variant=\"outline\" size=\"icon\" aria-label=\"Play\"><Play /></Button>\n</Magnetic>",
        "client": true
      }
    },
    {
      "name": "number-ticker",
      "type": "registry:component",
      "title": "Number Ticker",
      "description": "A number that counts up to its value when it scrolls into view, formatted with Intl.NumberFormat.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/number-ticker.tsx",
          "type": "registry:component",
          "target": "components/motion/number-ticker.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A headline statistic: customers, revenue, a percentage. Not for values that update live (render those directly), and not for more than a few on one screen.",
        "example": "<NumberTicker value={12480} />\n<NumberTicker value={0.9997} options={{ style: \"percent\", maximumFractionDigits: 2 }} />\n<NumberTicker value={48000} locale=\"de-DE\" options={{ style: \"currency\", currency: \"EUR\", maximumFractionDigits: 0 }} />",
        "client": true
      }
    },
    {
      "name": "page-transition",
      "type": "registry:component",
      "title": "Page Transition",
      "description": "Wraps page content and plays a short enter (a fade and a small rise) each time the route changes.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/page-transition.tsx",
          "type": "registry:component",
          "target": "components/motion/page-transition.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "The content area of an app or site, once, in the layout. The first page load is not animated. Where the browser supports it and elements should morph between pages, use view-transition instead; do not use both.",
        "example": "// app/template.tsx (Next.js). A template is re-created on navigation; the pathname is the key.\n\"use client\";\nimport { usePathname } from \"next/navigation\";\nimport type { ReactNode } from \"react\";\nimport { PageTransition } from \"@/components/motion/page-transition\";\n\nexport default function Template({ children }: { children: ReactNode }) {\n  return <PageTransition routeKey={usePathname()}>{children}</PageTransition>;\n}",
        "client": true
      }
    },
    {
      "name": "parallax",
      "type": "registry:component",
      "title": "Parallax",
      "description": "A clipped frame whose layer moves at a different speed from the page as it scrolls past.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/parallax.tsx",
          "type": "registry:component",
          "target": "components/motion/parallax.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A background image or a decorative layer behind a section. The frame needs a height of its own (an aspect ratio or a fixed height). Not for text that must be read while it moves; for a pinned, scroll-told sequence use scroll-scene.",
        "example": "<Parallax speed={0.3} className=\"aspect-video rounded-surface\">\n  <img src=\"/landscape.jpg\" alt=\"\" className=\"size-full object-cover\" />\n</Parallax>",
        "client": true
      }
    },
    {
      "name": "presence",
      "type": "registry:component",
      "title": "Presence",
      "description": "Animates its children in when they are shown and out before they are removed.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/presence.tsx",
          "type": "registry:component",
          "target": "components/motion/presence.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "Conditional UI that is not a Radix primitive: an inline notice, a revealed panel, a step that swaps. Radix dialogs, popovers and menus already animate with their own classes; for content entering on scroll use reveal.",
        "example": "const [open, setOpen] = useState(false);\n<Button onClick={() => setOpen((value) => !value)}>Toggle</Button>\n<Presence show={open} preset=\"slide-up\" className=\"mt-4 rounded-surface border p-4\">\n  Saved. Your changes are live.\n</Presence>",
        "client": true
      }
    },
    {
      "name": "reveal",
      "type": "registry:component",
      "title": "Reveal",
      "description": "Fades and moves its content into place when it scrolls into view.",
      "categories": [
        "motion"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/reveal.tsx",
          "type": "registry:component",
          "target": "components/motion/reveal.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A section, card or image that should arrive as the page is read. For a list revealed one after another use stagger; for a heading use text-reveal; for conditional UI that mounts and unmounts use presence.",
        "example": "<Reveal>\n  <h2 className=\"text-2xl font-medium\">Built to be owned</h2>\n</Reveal>\n<Reveal direction=\"start\" distance={40} delay={0.1} once={false}>\n  <img src=\"/studio.jpg\" alt=\"The studio\" className=\"rounded-surface\" />\n</Reveal>",
        "client": true
      }
    },
    {
      "name": "scroll-progress",
      "type": "registry:component",
      "title": "Scroll Progress",
      "description": "A thin bar fixed to the top of the viewport that fills as the page, or one element, is scrolled through.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/scroll-progress.tsx",
          "type": "registry:component",
          "target": "components/motion/scroll-progress.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "Long reading pages: an article, documentation, a case study. Pass `target` to follow the article rather than the whole page. Not a loading indicator (use a progress control for that).",
        "example": "<ScrollProgress />\n\nconst article = useRef<HTMLElement>(null);\n<ScrollProgress target={article} className=\"h-1\" />\n<article ref={article}>…</article>",
        "client": true
      }
    },
    {
      "name": "scroll-scene",
      "type": "registry:component",
      "title": "Scroll Scene",
      "description": "A tall section with a pinned viewport whose children are driven by scroll progress from 0 to 1, for scroll-told sequences.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/scroll-scene.tsx",
          "type": "registry:component",
          "target": "components/motion/scroll-scene.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A product story told as the visitor scrolls: steps that replace each other, a device that turns, a diagram that builds. Use sparingly, one or two per page. For a simple entrance use reveal; for a drifting background use parallax.",
        "example": "<ScrollScene length={3}>\n  <ScrollSceneStep from={0} to={0.33} className=\"grid place-items-center p-6\">\n    <h2 className=\"text-3xl font-medium\">Design</h2>\n  </ScrollSceneStep>\n  <ScrollSceneStep from={0.33} to={0.66} className=\"grid place-items-center p-6\">\n    <h2 className=\"text-3xl font-medium\">Build</h2>\n  </ScrollSceneStep>\n  <ScrollSceneStep from={0.66} to={1} className=\"grid place-items-center p-6\">\n    <h2 className=\"text-3xl font-medium\">Launch</h2>\n  </ScrollSceneStep>\n</ScrollScene>\n\n<ScrollScene length={2}>\n  {(progress, active) => <Dial progress={progress} still={!active} />}\n</ScrollScene>\n\nfunction Dial({ progress, still }: { progress: MotionValue<number>; still: boolean }) {\n  const rotate = useTransform(progress, [0, 1], [0, 180]);\n  return <motion.div className=\"size-40 border\" style={{ rotate: still ? 0 : rotate }} />;\n}",
        "client": true
      }
    },
    {
      "name": "spotlight",
      "type": "registry:component",
      "title": "Spotlight",
      "description": "A surface on which a soft light in the highlight colour follows the pointer.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/spotlight.tsx",
          "type": "registry:component",
          "target": "components/motion/spotlight.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A hero panel, a feature card or a call-to-action band that should respond to the pointer. Give it a border and a background like any surface. Decoration only: it does nothing on touch screens, so never rely on it to show something.",
        "example": "<Spotlight className=\"rounded-surface border bg-card p-8\">\n  <h3 className=\"text-xl font-medium\">Made to be changed</h3>\n  <p className=\"text-muted-foreground\">Every component is yours to edit.</p>\n</Spotlight>\n<Spotlight size={640} className=\"rounded-surface border p-12\">…</Spotlight>",
        "client": true
      }
    },
    {
      "name": "stagger",
      "type": "registry:component",
      "title": "Stagger",
      "description": "A container whose items fade and move into place one after another when it scrolls into view.",
      "categories": [
        "motion"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/stagger.tsx",
          "type": "registry:component",
          "target": "components/motion/stagger.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A grid of cards, a feature list, a row of logos. For one block use reveal; for the words of a heading use text-reveal.",
        "example": "<Stagger className=\"grid gap-4 sm:grid-cols-3\" interval={0.08}>\n  <StaggerItem><Card>Design</Card></StaggerItem>\n  <StaggerItem><Card>Build</Card></StaggerItem>\n  <StaggerItem><Card>Launch</Card></StaggerItem>\n</Stagger>",
        "client": true
      }
    },
    {
      "name": "text-reveal",
      "type": "registry:component",
      "title": "Text Reveal",
      "description": "Reveals a heading word by word, or line by line, when it scrolls into view.",
      "categories": [
        "motion"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/text-reveal.tsx",
          "type": "registry:component",
          "target": "components/motion/text-reveal.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A headline or a short statement. Not for paragraphs of body text (use reveal on the block), and not for text that changes while it is shown.",
        "example": "<TextReveal as=\"h1\" className=\"text-4xl font-medium\" playOnLoad>\n  Websites, apps and systems that last\n</TextReveal>\n<TextReveal as=\"p\" by=\"line\" interval={0.12} className=\"max-w-prose text-xl\">\n  We design the brand, build the product and stay to run it.\n</TextReveal>",
        "client": true
      }
    },
    {
      "name": "tilt",
      "type": "registry:component",
      "title": "Tilt",
      "description": "A wrapper that tilts its content in 3D toward the pointer on hover and springs back, with an optional glare.",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "motion"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/motion"
      ],
      "files": [
        {
          "path": "registry/motion/tilt.tsx",
          "type": "registry:component",
          "target": "components/motion/tilt.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "A featured card, a product shot, a pricing plan worth lifting off the page. One or a few per view; not for forms or anything read at length, and it does nothing on touch screens.",
        "example": "<Tilt max={8} glare className=\"max-w-sm\">\n  <Card>\n    <CardHeader>\n      <CardTitle>Studio plan</CardTitle>\n      <CardDescription>Everything, for one team</CardDescription>\n    </CardHeader>\n  </Card>\n</Tilt>",
        "client": true
      }
    },
    {
      "name": "view-transition",
      "type": "registry:component",
      "title": "View Transition",
      "description": "View transitions two ways: wrappers over React's own <ViewTransition> (a shared element that morphs between two places, a boundary that cross-fades what changes inside it), and helpers for the browser's API (run an update as a transition, name an element, a link that navigates inside a transition).",
      "categories": [
        "motion"
      ],
      "dependencies": [
        "radix-ui"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/motion/view-transition.tsx",
          "type": "registry:component",
          "target": "components/motion/view-transition.tsx"
        }
      ],
      "meta": {
        "category": "motion",
        "when": "Moving between pages or between two states of a view, where an element in the old view should become one in the new. Use the React wrappers (SharedElement, TransitionBoundary) when the change is a React transition: a state update inside startTransition, a Suspense boundary revealing, a navigation by a router that uses transitions (Next.js). React then starts the browser's transition itself. Use the browser helpers (startViewTransition, ViewTransitionName, TransitionLink) when nothing in the tree uses React's component: a synchronous update, a router that does not use transitions, an element that stays mounted while the view around it changes. Do not mix the two for one update: React's documentation says not to call document.startViewTransition yourself around an update it is already animating. Both degrade to an instant change where the API is missing, and the theme switches them off under reduced motion. For a shared element that must be interrupted mid-way use layout-transition; for a simple enter on route change use page-transition.",
        "example": "// React's way: the same name in two places; the update runs in a transition.\nconst [open, setOpen] = useState(false);\n{open ? (\n  <SharedElement name=\"atlas-cover\"><img src=\"/atlas.jpg\" alt=\"Atlas\" className=\"w-full\" /></SharedElement>\n) : (\n  <button onClick={() => startTransition(() => setOpen(true))}>\n    <SharedElement name=\"atlas-cover\"><img src=\"/atlas.jpg\" alt=\"Atlas\" className=\"size-24\" /></SharedElement>\n  </button>\n)}\n\n// The browser's way. A link that navigates inside a view transition; in Next.js pass router.push:\n<TransitionLink href=\"/work/atlas\" navigate={router.push}>Atlas</TransitionLink>\n// The same name on the list page and on the detail page: the image morphs from one to the other.\n<ViewTransitionName name=\"work-atlas-cover\" asChild>\n  <img src=\"/atlas.jpg\" alt=\"Atlas\" />\n</ViewTransitionName>\n// A state change in place. flushSync (from react-dom) makes React apply it before the browser's snapshot.\n<Button onClick={() => startViewTransition(() => flushSync(() => setLayout(\"grid\")))}>Grid</Button>",
        "client": true
      }
    },
    {
      "name": "floating-shapes",
      "type": "registry:component",
      "title": "Floating Shapes",
      "description": "A few simple solids (icosahedron, torus, box, octahedron) floating and turning slowly, flat-shaded or wireframe, coloured from theme variables.",
      "categories": [
        "three"
      ],
      "dependencies": [
        "@react-three/fiber",
        "three"
      ],
      "devDependencies": [
        "@types/three"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/theme-color"
      ],
      "files": [
        {
          "path": "registry/three/floating-shapes.tsx",
          "type": "registry:component",
          "target": "components/three/floating-shapes.tsx"
        }
      ],
      "meta": {
        "category": "three",
        "when": "An abstract, geometric accent for a hero or a feature section. Use it inside scene. For a single soft object use orb; to show a real object use model-stage.",
        "example": "<Scene aspect={16 / 9}>\n  <FloatingShapes />\n</Scene>\n\n<Scene aspect={2}>\n  <FloatingShapes\n    shapes={[\n      { kind: \"torus\", position: [-1.5, 0, 0], color: \"--highlight\" },\n      { kind: \"box\", position: [1.5, 0.4, -1], size: 0.8, color: \"--foreground\", wireframe: true },\n    ]}\n  />\n</Scene>",
        "client": true
      }
    },
    {
      "name": "globe",
      "type": "registry:component",
      "title": "Globe",
      "description": "A dotted globe that turns slowly and can be dragged to spin, with optional highlighted markers by latitude and longitude.",
      "categories": [
        "three"
      ],
      "dependencies": [
        "@react-three/fiber",
        "three"
      ],
      "devDependencies": [
        "@types/three"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/theme-color"
      ],
      "files": [
        {
          "path": "registry/three/globe.tsx",
          "type": "registry:component",
          "target": "components/three/globe.tsx"
        }
      ],
      "meta": {
        "category": "three",
        "when": "Showing reach or places at a glance: offices, regions, where requests come from. Use it inside scene. For exact values per place use a table or bar-chart; the globe is not a chart.",
        "example": "<Scene aspect={1} className=\"max-w-lg\" label=\"A globe with markers on Amsterdam, Kochi and San Francisco\">\n  <Globe\n    markers={[\n      { lat: 52.37, lon: 4.9 },\n      { lat: 9.93, lon: 76.27 },\n      { lat: 37.77, lon: -122.42 },\n    ]}\n  />\n</Scene>",
        "client": true
      }
    },
    {
      "name": "model-stage",
      "type": "registry:component",
      "title": "Model Stage",
      "description": "A turntable for any mesh or group: centres and fits it, turns it slowly, and lets the pointer orbit it within limits.",
      "categories": [
        "three"
      ],
      "dependencies": [
        "@react-three/fiber",
        "three"
      ],
      "devDependencies": [
        "@types/three"
      ],
      "registryDependencies": [
        "@rivier-ui/theme"
      ],
      "files": [
        {
          "path": "registry/three/model-stage.tsx",
          "type": "registry:component",
          "target": "components/three/model-stage.tsx"
        }
      ],
      "meta": {
        "category": "three",
        "when": "Showing one object: a product, a loaded model, a shape of your own. Use it inside scene. For decoration without a subject use orb or floating-shapes.",
        "example": "<Scene aspect={4 / 3} label=\"A turning torus knot\">\n  <ModelStage>\n    <mesh>\n      <torusKnotGeometry args={[1, 0.32, 128, 16]} />\n      <meshStandardMaterial flatShading />\n    </mesh>\n  </ModelStage>\n</Scene>",
        "client": true
      }
    },
    {
      "name": "model-viewer",
      "type": "registry:component",
      "title": "Model Viewer",
      "description": "Shows one 3D model that a person can turn, zoom and reset: a glTF or GLB file, or Gaussian splats (.spz, .ply, .splat, .ksplat, .sog), with a poster and progress while it loads and a still fallback where 3D cannot run.",
      "categories": [
        "three"
      ],
      "dependencies": [
        "@sparkjsdev/spark",
        "lucide-react",
        "three"
      ],
      "devDependencies": [
        "@types/three"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/announce",
        "@rivier-ui/cn",
        "@rivier-ui/progress",
        "@rivier-ui/use-controllable-state"
      ],
      "files": [
        {
          "path": "registry/three/model-viewer.tsx",
          "type": "registry:component",
          "target": "components/three/model-viewer.tsx"
        }
      ],
      "meta": {
        "category": "three",
        "when": "A file to look at from every side: an object, a product, a scanned place. It is a whole viewer, not a part of scene: for your own meshes inside a react-three-fiber canvas use scene with model-stage. Nothing heavy is in this file: three.js is fetched when the viewer comes near the screen, its glTF loader only for glTF, and Spark (`@sparkjsdev/spark`, installed with this item) only when the file is splats. glTF that carries splats in an extension is not read (Spark has no glTF loader); Draco, Meshopt and KTX2 compression need their decoders set in `configureLoader`. Plain wheel and vertical swipes scroll the page: zoom is pinch, Ctrl with the wheel, the keys or the buttons. To compare two models, give two viewers the same `view` and `bounds` inside compare-slider, with `children={null}` and buttons of your own that change the shared view.",
        "example": "<ModelViewer src=\"/models/vase.glb\" alt=\"A clay vase with a painted belt\" poster=\"/models/vase.jpg\" />\n\n// Splats, turning by itself (never under reduced motion), with a hand-off to AR on phones\n<ModelViewer\n  src=\"/models/courtyard.spz\"\n  alt=\"The courtyard, scanned in 2026\"\n  autoRotate\n  rotation={[180, 0, 0]}\n  ar={{ usdz: \"/models/courtyard.usdz\", glb: \"https://example.com/models/courtyard.glb\" }}\n/>\n\n// Two viewers, one camera\nconst [view, setView] = useState<ModelView>({ azimuth: 0, polar: 15, zoom: 1 });\nconst frame = { center: [0, 4, 0], radius: 9 } as const; // one sphere for both, so they keep their sizes and line up\n<ModelViewer src=\"/models/then.glb\" alt=\"As built\" view={view} onViewChange={setView} bounds={frame} />\n<ModelViewer src=\"/models/now.glb\" alt=\"Today\" view={view} onViewChange={setView} bounds={frame} />",
        "client": true
      }
    },
    {
      "name": "orb",
      "type": "registry:component",
      "title": "Orb",
      "description": "A softly morphing sphere in the highlight colour, lit at its rim so it reads on light and dark grounds, leaning gently toward the pointer.",
      "categories": [
        "three"
      ],
      "dependencies": [
        "@react-three/fiber",
        "three"
      ],
      "devDependencies": [
        "@types/three"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/theme-color"
      ],
      "files": [
        {
          "path": "registry/three/orb.tsx",
          "type": "registry:component",
          "target": "components/three/orb.tsx"
        }
      ],
      "meta": {
        "category": "three",
        "when": "A calm focal object for a hero or an empty state. Use it inside scene. For many small elements use particle-field; for a product or object of your own use model-stage.",
        "example": "<Scene aspect={1} className=\"max-w-md\">\n  <Orb />\n</Scene>\n\n<Scene aspect={16 / 9}>\n  <Orb color=\"--chart-2\" speed={0.6} distortion={0.5} detail={32} />\n</Scene>",
        "client": true
      }
    },
    {
      "name": "particle-field",
      "type": "registry:component",
      "title": "Particle Field",
      "description": "A field of small round points drifting slowly, with depth that shifts as the pointer moves.",
      "categories": [
        "three"
      ],
      "dependencies": [
        "@react-three/fiber",
        "three"
      ],
      "devDependencies": [
        "@types/three"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/theme-color"
      ],
      "files": [
        {
          "path": "registry/three/particle-field.tsx",
          "type": "registry:component",
          "target": "components/three/particle-field.tsx"
        }
      ],
      "meta": {
        "category": "three",
        "when": "A quiet moving ground behind a hero or a section. Use it inside scene and keep text on top readable. For one focal object use orb; for data use the viz components, never particles.",
        "example": "<Scene className=\"absolute inset-0\">\n  <ParticleField />\n</Scene>\n\n<Scene aspect={2}>\n  <ParticleField count={400} color=\"--foreground\" size={0.03} spread={10} />\n</Scene>",
        "client": true
      }
    },
    {
      "name": "scene",
      "type": "registry:component",
      "title": "Scene",
      "description": "The wrapper every 3D component is used inside: a transparent WebGL canvas that mounts late, pauses off screen and falls back to a static block.",
      "categories": [
        "three"
      ],
      "dependencies": [
        "@react-three/fiber"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/three/scene.tsx",
          "type": "registry:component",
          "target": "components/three/scene.tsx"
        }
      ],
      "meta": {
        "category": "three",
        "when": "Around orb, particle-field, floating-shapes, globe, model-stage or your own react-three-fiber content. Give it a size through the parent or `aspect`. For a decorative background that needs no 3D, use a plain token-coloured block.",
        "example": "<Scene aspect={16 / 9} label=\"A slowly morphing sphere\">\n  <Orb />\n</Scene>\n\n<div className=\"h-80\">\n  <Scene fallback={<img src=\"/globe.png\" alt=\"\" className=\"size-full object-contain\" />}>\n    <Globe markers={[{ lat: 52.37, lon: 4.9 }]} />\n  </Scene>\n</div>",
        "client": true
      }
    },
    {
      "name": "area-chart",
      "type": "registry:component",
      "title": "Area Chart",
      "description": "A line chart with the space under each line filled flat at low opacity, optionally stacked so the series add up to a total.",
      "categories": [
        "viz"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/line-chart"
      ],
      "files": [
        {
          "path": "registry/viz/area-chart.tsx",
          "type": "registry:component",
          "target": "components/viz/area-chart.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "One series over time whose volume matters, or a few series that add up to a whole (`stacked`). To compare series that cross each other use line-chart: overlapping fills hide one another.",
        "example": "<AreaChart\n  label=\"Storage used per month, by kind\"\n  data={[\n    { month: new Date(\"2026-01-01\"), images: 12, video: 30 },\n    { month: new Date(\"2026-02-01\"), images: 18, video: 42 },\n    { month: new Date(\"2026-03-01\"), images: 22, video: 61 },\n  ]}\n  x=\"month\"\n  series={[\n    { key: \"images\", label: \"Images\" },\n    { key: \"video\", label: \"Video\" },\n  ]}\n  stacked\n/>",
        "client": false
      }
    },
    {
      "name": "bar-chart",
      "type": "registry:component",
      "title": "Bar Chart",
      "description": "A bar chart, vertical or horizontal, grouped or stacked, always measured from zero, with a tooltip on hover and arrow-key reading.",
      "categories": [
        "viz"
      ],
      "dependencies": [
        "d3-scale"
      ],
      "devDependencies": [
        "@types/d3-scale"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chart",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/viz/bar-chart.tsx",
          "type": "registry:component",
          "target": "components/viz/bar-chart.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "Comparing amounts across categories. Use `orientation=\"horizontal\"` for long names or a ranking, `stacked` when the series add up to a total. For change over many points in time use line-chart; for a single number use a stat, not one bar.",
        "example": "<BarChart\n  label=\"Orders by channel per quarter\"\n  data={[\n    { quarter: \"Q1\", web: 320, app: 210 },\n    { quarter: \"Q2\", web: 410, app: 290 },\n    { quarter: \"Q3\", web: 380, app: 350 },\n  ]}\n  x=\"quarter\"\n  series={[\n    { key: \"web\", label: \"Web\" },\n    { key: \"app\", label: \"App\" },\n  ]}\n  showValues\n/>",
        "client": true
      }
    },
    {
      "name": "chart",
      "type": "registry:component",
      "title": "Chart",
      "description": "The shared parts every chart is built from: a container that measures itself and carries the text alternative, an SVG root, a tooltip, a legend, series styles, and axis and format helpers.",
      "categories": [
        "viz"
      ],
      "dependencies": [
        "d3-shape"
      ],
      "devDependencies": [
        "@types/d3-shape"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/cn",
        "@rivier-ui/use-size"
      ],
      "files": [
        {
          "path": "registry/viz/chart.tsx",
          "type": "registry:component",
          "target": "components/viz/chart.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "Building a chart of your own that should match the others. For the common forms use line-chart, area-chart, bar-chart, donut-chart, sparkline, heatmap or radial-progress directly.",
        "example": "<ChartContainer aspect={2} table={{ caption: \"Signups\", columns: [\"Day\", \"Signups\"], rows: [[\"Mon\", 4], [\"Tue\", 9]] }}>\n  {({ width, height }) => (\n    <ChartSvg label=\"Signups by day\" width={width} height={height}>\n      <rect x={0} y={height - 40} width={width / 3} height={40} className={chartSeries(0).fill} />\n      <rect x={width / 2} y={height - 90} width={width / 3} height={90} className={chartSeries(0).fill} />\n    </ChartSvg>\n  )}\n</ChartContainer>\n<ChartLegend items={[{ label: \"Signups\", index: 0 }]} mark=\"rect\" />",
        "client": true
      }
    },
    {
      "name": "donut-chart",
      "type": "registry:component",
      "title": "Donut Chart",
      "description": "A ring showing how one whole splits into at most five parts, with a label in the centre and each part's value and share in the legend.",
      "categories": [
        "viz"
      ],
      "dependencies": [
        "d3-shape"
      ],
      "devDependencies": [
        "@types/d3-shape"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chart",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/viz/donut-chart.tsx",
          "type": "registry:component",
          "target": "components/viz/donut-chart.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "Parts of a whole at a glance, when there are few parts and they differ clearly. To compare parts that are close in size, or more than five, use bar-chart with `orientation=\"horizontal\"`; for one ratio against a limit use radial-progress.",
        "example": "<DonutChart\n  label=\"Traffic by source\"\n  data={[\n    { source: \"Search\", visits: 5200 },\n    { source: \"Direct\", visits: 3100 },\n    { source: \"Referral\", visits: 1400 },\n  ]}\n  name=\"source\"\n  value=\"visits\"\n  centerLabel=\"Visits\"\n/>",
        "client": true
      }
    },
    {
      "name": "heatmap",
      "type": "registry:component",
      "title": "Heatmap",
      "description": "A matrix of cells (day by hour, for example) coloured on one-hue scale from faint to the highlight colour, with a tooltip, arrow-key reading and a scale legend.",
      "categories": [
        "viz"
      ],
      "dependencies": [
        "d3-scale"
      ],
      "devDependencies": [
        "@types/d3-scale"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chart",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/viz/heatmap.tsx",
          "type": "registry:component",
          "target": "components/viz/heatmap.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "Spotting patterns across two categories at once: when it is busy, which pairs stand out. To compare exact amounts use bar-chart; for one row of values over time use line-chart.",
        "example": "<Heatmap\n  label=\"Sessions by day and hour\"\n  data={[\n    { day: \"Mon\", hour: \"09\", sessions: 12 },\n    { day: \"Mon\", hour: \"10\", sessions: 30 },\n    { day: \"Tue\", hour: \"09\", sessions: 8 },\n    { day: \"Tue\", hour: \"10\", sessions: 21 },\n  ]}\n  x=\"hour\"\n  y=\"day\"\n  value=\"sessions\"\n/>",
        "client": true
      }
    },
    {
      "name": "line-chart",
      "type": "registry:component",
      "title": "Line Chart",
      "description": "A line chart of one or more series over a numeric or time x, with a crosshair tooltip, arrow-key reading and labels at the line ends.",
      "categories": [
        "viz"
      ],
      "dependencies": [
        "d3-scale",
        "d3-shape"
      ],
      "devDependencies": [
        "@types/d3-scale",
        "@types/d3-shape"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chart",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/viz/line-chart.tsx",
          "type": "registry:component",
          "target": "components/viz/line-chart.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "Change over time or along a number, for up to about five series on one shared scale. For a single series whose volume matters use area-chart; for separate categories use bar-chart; never plot two different units against two y axes, use two charts.",
        "example": "<LineChart\n  label=\"Requests and errors per day\"\n  data={[\n    { day: new Date(\"2026-03-01\"), requests: 120, errors: 4 },\n    { day: new Date(\"2026-03-02\"), requests: 180, errors: 9 },\n    { day: new Date(\"2026-03-03\"), requests: 150, errors: 3 },\n  ]}\n  x=\"day\"\n  series={[\n    { key: \"requests\", label: \"Requests\" },\n    { key: \"errors\", label: \"Errors\" },\n  ]}\n/>",
        "client": true
      }
    },
    {
      "name": "radial-progress",
      "type": "registry:component",
      "title": "Radial Progress",
      "description": "A ring gauge for one value against a limit, with the value and a label in the centre.",
      "categories": [
        "viz"
      ],
      "dependencies": [],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chart",
        "@rivier-ui/cn"
      ],
      "files": [
        {
          "path": "registry/viz/radial-progress.tsx",
          "type": "registry:component",
          "target": "components/viz/radial-progress.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "One ratio: a quota used, a score, a goal reached. Size it with a width class (`w-32` by default). For several ratios side by side use a list of bars (bar-chart horizontal), not a ring each; for parts of a whole use donut-chart.",
        "example": "<RadialProgress value={72} label=\"Storage used\" />\n<RadialProgress value={3} max={5} label=\"Steps done\" formatValue={(value) => `${value} of 5`} className=\"w-40\" />",
        "client": true
      }
    },
    {
      "name": "sparkline",
      "type": "registry:component",
      "title": "Sparkline",
      "description": "A tiny line, area or bar chart with no axes, for a stat tile or a table cell, described in words for assistive technology.",
      "categories": [
        "viz"
      ],
      "dependencies": [
        "d3-scale",
        "d3-shape"
      ],
      "devDependencies": [
        "@types/d3-scale",
        "@types/d3-shape"
      ],
      "registryDependencies": [
        "@rivier-ui/theme",
        "@rivier-ui/chart",
        "@rivier-ui/cn",
        "@rivier-ui/use-size"
      ],
      "files": [
        {
          "path": "registry/viz/sparkline.tsx",
          "type": "registry:component",
          "target": "components/viz/sparkline.tsx"
        }
      ],
      "meta": {
        "category": "viz",
        "when": "The shape of a trend beside a number that carries the value. Size it with classes (`h-8 w-24` by default). When the reader needs to read values off it, use line-chart or bar-chart.",
        "example": "<Sparkline data={[4, 6, 5, 9, 12, 10, 14]} label=\"Signups, last 7 days\" />\n<Sparkline data={[3, 8, 2, 7, 5]} type=\"bar\" className=\"h-6 w-16\" />",
        "client": true
      }
    }
  ]
}
