{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "steps",
  "type": "registry:component",
  "title": "Steps",
  "description": "Give setup flows and onboarding a sense of progress.",
  "categories": [
    "navigation"
  ],
  "dependencies": [
    "@tabler/icons-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "src/registry/overtrue/steps.tsx",
      "type": "registry:component",
      "target": "components/overtrue/steps.tsx",
      "content": "import { IconCheck as Check } from \"@tabler/icons-react\";\nimport { cn } from \"@/lib/utils\";\n\nconst ease = \"ease-[cubic-bezier(0.22,1,0.36,1)]\";\n\nexport function Steps({\n  steps,\n  current,\n  orientation = \"horizontal\",\n  className,\n}: {\n  steps: string[];\n  current: number;\n  /** Lay the steps out in a row, or down the side of a panel. */\n  orientation?: \"horizontal\" | \"vertical\";\n  className?: string;\n}) {\n  const vertical = orientation === \"vertical\";\n  return (\n    <ol\n      data-slot=\"steps\"\n      data-orientation={orientation}\n      className={cn(\"grid\", vertical ? \"grid-cols-1\" : \"w-full items-start\", className)}\n      // Equal tracks for every step but the last, which only needs room for its label.\n      style={\n        vertical\n          ? undefined\n          : {\n              gridTemplateColumns:\n                steps.length > 1\n                  ? `repeat(${steps.length - 1}, minmax(0, 1fr)) fit-content(40%)`\n                  : \"minmax(0, 1fr)\",\n            }\n      }\n    >\n      {steps.map((step, index) => {\n        const state =\n          index < current\n            ? \"complete\"\n            : index === current\n              ? \"current\"\n              : \"upcoming\";\n        const last = index === steps.length - 1;\n        return (\n          <li\n            key={`${index}-${step}`}\n            data-slot=\"steps-item\"\n            data-state={state}\n            aria-current={index === current ? \"step\" : undefined}\n            className={cn(\n              \"group/step relative flex min-w-0\",\n              vertical ? \"gap-3\" : \"flex-col gap-2.5\",\n            )}\n          >\n            <div\n              className={cn(\n                \"flex items-center\",\n                vertical ? \"flex-col self-stretch\" : \"w-full\",\n              )}\n            >\n              <span\n                data-slot=\"steps-marker\"\n                className={cn(\n                  \"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold tabular-nums transition-[background-color,color,box-shadow] duration-300 motion-reduce:transition-none\",\n                  ease,\n                  state === \"complete\" &&\n                    \"bg-primary text-primary-foreground shadow-[inset_0_1px_0_rgb(255_255_255/0.2),0_1px_2px_rgb(0_0_0/0.1)] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.2),0_0_14px_-3px_color-mix(in_oklab,var(--color-primary)_80%,transparent)]\",\n                  state === \"current\" &&\n                    \"bg-card text-primary shadow-[inset_0_0_0_1.5px_var(--color-primary),0_0_0_4px_color-mix(in_oklab,var(--color-primary)_16%,transparent)] dark:shadow-[inset_0_0_0_1.5px_var(--color-primary),0_0_0_4px_color-mix(in_oklab,var(--color-primary)_16%,transparent),0_0_18px_-2px_color-mix(in_oklab,var(--color-primary)_45%,transparent)]\",\n                  state === \"upcoming\" &&\n                    \"bg-muted/60 text-muted-foreground shadow-[inset_0_0_0_1px_var(--color-border)]\",\n                )}\n              >\n                {state === \"complete\" ? (\n                  <Check\n                    className={cn(\n                      \"size-3.5 transition-[scale,opacity] duration-500 motion-safe:starting:scale-50 motion-safe:starting:opacity-0 motion-reduce:transition-none\",\n                      ease,\n                    )}\n                    stroke={2.75}\n                    aria-label=\"Completed\"\n                  />\n                ) : (\n                  index + 1\n                )}\n              </span>\n              {!last && (\n                <span\n                  aria-hidden=\"true\"\n                  data-slot=\"steps-rail\"\n                  className={cn(\n                    \"relative flex-1 rounded-full bg-border/80\",\n                    vertical ? \"my-1.5 min-h-5 w-0.5\" : \"mx-2 h-0.5 min-w-2\",\n                  )}\n                >\n                  <span\n                    className={cn(\n                      \"absolute inset-0 rounded-full transition-[scale] duration-700 motion-reduce:transition-none\",\n                      ease,\n                      vertical\n                        ? \"origin-top bg-linear-to-b\"\n                        : \"origin-left bg-linear-to-r rtl:origin-right rtl:bg-linear-to-l\",\n                      state === \"complete\"\n                        ? \"from-primary/80 to-primary dark:shadow-[0_0_12px_color-mix(in_oklab,var(--color-primary)_75%,transparent)]\"\n                        : \"from-primary/70 to-transparent\",\n                      state === \"complete\"\n                        ? \"scale-100\"\n                        : state === \"current\"\n                          ? vertical\n                            ? \"scale-y-[0.45]\"\n                            : \"scale-x-[0.45]\"\n                          : vertical\n                            ? \"scale-y-0\"\n                            : \"scale-x-0\",\n                    )}\n                  />\n                </span>\n              )}\n            </div>\n            <span\n              data-slot=\"steps-label\"\n              className={cn(\n                \"min-w-0 text-[13px] leading-5 break-words text-pretty transition-colors duration-300 motion-reduce:transition-none\",\n                vertical ? cn(\"pt-1\", !last && \"pb-6\") : \"pe-3\",\n                state === \"current\"\n                  ? \"font-medium text-foreground\"\n                  : state === \"complete\"\n                    ? \"text-foreground/75\"\n                    : \"text-muted-foreground\",\n              )}\n            >\n              {step}\n            </span>\n          </li>\n        );\n      })}\n    </ol>\n  );\n}\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/components/steps. Requires an initialized shadcn/ui project with Tailwind CSS v4."
}
