{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stepper",
  "title": "Stepper",
  "author": "VenusUI",
  "description": "Progress through a multi-step flow, horizontal or vertical.",
  "dependencies": [
    "lucide-react"
  ],
  "files": [
    {
      "path": "registry/default/ui/stepper.tsx",
      "content": "import * as React from \"react\"\nimport { Check } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface StepperStep {\n  title: string\n  description?: string\n}\n\ninterface StepperProps extends Omit<React.ComponentProps<\"ol\">, \"children\"> {\n  steps: StepperStep[]\n  /** Index of the current step (0-based). Earlier steps show as complete. */\n  current: number\n  orientation?: \"horizontal\" | \"vertical\"\n}\n\n/**\n * Progress through a multi-step flow, e.g. checkout or onboarding. An ordered\n * list where the current step has `aria-current=\"step\"` and finished steps\n * say \"completed\" to screen readers. Works in Server Components.\n */\nfunction Stepper({ steps, current, orientation = \"horizontal\", className, ...props }: StepperProps) {\n  const vertical = orientation === \"vertical\"\n  return (\n    <ol\n      data-slot=\"stepper\"\n      className={cn(vertical ? \"space-y-6\" : \"flex w-full items-start\", className)}\n      {...props}\n    >\n      {steps.map((step, index) => {\n        const state = index < current ? \"complete\" : index === current ? \"current\" : \"upcoming\"\n        return (\n          <li\n            key={step.title}\n            aria-current={state === \"current\" ? \"step\" : undefined}\n            className={cn(\"relative flex gap-3\", vertical ? \"\" : \"flex-1 flex-col items-center text-center\")}\n          >\n            {index < steps.length - 1 ? (\n              <span\n                aria-hidden=\"true\"\n                className={cn(\n                  \"absolute bg-border\",\n                  vertical ? \"top-8 left-3.5 h-[calc(100%-1rem)] w-px\" : \"top-3.5 left-[calc(50%+1rem)] h-px w-[calc(100%-2rem)]\",\n                  index < current && \"bg-primary\"\n                )}\n              />\n            ) : null}\n            <span\n              aria-hidden=\"true\"\n              className={cn(\n                \"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full border text-xs font-medium\",\n                state === \"complete\" && \"border-primary bg-primary text-primary-foreground\",\n                state === \"current\" && \"border-primary bg-background ring-4 ring-primary/15\",\n                state === \"upcoming\" && \"bg-background text-muted-foreground\"\n              )}\n            >\n              {state === \"complete\" ? <Check className=\"size-3.5\" /> : index + 1}\n            </span>\n            <div className={vertical ? \"\" : \"mt-1\"}>\n              <p className={cn(\"text-sm font-medium\", state === \"upcoming\" && \"text-muted-foreground\")}>\n                {step.title}\n                {state === \"complete\" ? <span className=\"sr-only\"> (completed)</span> : null}\n              </p>\n              {step.description ? <p className=\"mt-0.5 text-xs text-muted-foreground\">{step.description}</p> : null}\n            </div>\n          </li>\n        )\n      })}\n    </ol>\n  )\n}\n\nexport { Stepper, type StepperProps, type StepperStep }\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "version": "0.1.1"
  },
  "categories": [
    "navigation",
    "data-display"
  ],
  "type": "registry:ui"
}