{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "timeline",
  "title": "Timeline",
  "description": "A vertical chronology of events, each with a marker, connector, and free-form content. Use it for audit logs, activity feeds, and version history.",
  "files": [
    {
      "path": "registry/dashboardcn/ui/timeline.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport type TimelineStatus = \"default\" | \"current\" | \"done\"\n\n/**\n * Timeline owns only the chronology layout: an ordered list of items, each\n * with a rail (marker + connector) beside its content. Put your own semantic\n * content (headings, time, badges, avatars, cards) inside TimelineContent.\n */\nfunction Timeline({ className, ...props }: React.ComponentProps<\"ol\">) {\n  return (\n    <ol\n      data-slot=\"timeline\"\n      className={cn(\"flex flex-col\", className)}\n      {...props}\n    />\n  )\n}\n\nexport interface TimelineItemProps extends React.ComponentProps<\"li\"> {\n  /**\n   * \"current\" marks the item as the present step (sets aria-current) and\n   * highlights its marker. \"done\" fills the marker.\n   */\n  status?: TimelineStatus\n}\n\nfunction TimelineItem({\n  status = \"default\",\n  className,\n  ...props\n}: TimelineItemProps) {\n  return (\n    <li\n      data-slot=\"timeline-item\"\n      data-status={status}\n      aria-current={status === \"current\" ? \"true\" : undefined}\n      className={cn(\"group/timeline-item relative flex gap-3\", className)}\n      {...props}\n    />\n  )\n}\n\n/** The column beside the content that holds the marker and connector. */\nfunction TimelineRail({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"timeline-rail\"\n      className={cn(\"flex w-6 shrink-0 flex-col items-center\", className)}\n      {...props}\n    />\n  )\n}\n\n/**\n * The dot on the rail. Pass an icon, avatar, or image as children; with no\n * children it renders a plain ring and is hidden from assistive technology.\n */\nfunction TimelineMarker({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<\"span\">) {\n  const empty = React.Children.count(children) === 0\n  return (\n    <span\n      data-slot=\"timeline-marker\"\n      aria-hidden={empty ? \"true\" : undefined}\n      className={cn(\n        \"bg-background text-muted-foreground flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full border\",\n        \"[&>svg]:size-3 [&>img]:size-full [&>img]:object-cover\",\n        \"group-data-[status=current]/timeline-item:border-primary group-data-[status=current]/timeline-item:text-primary group-data-[status=current]/timeline-item:ring-primary/20 group-data-[status=current]/timeline-item:ring-2\",\n        \"group-data-[status=done]/timeline-item:bg-primary group-data-[status=done]/timeline-item:border-primary group-data-[status=done]/timeline-item:text-primary-foreground\",\n        className\n      )}\n      {...props}\n    >\n      {children}\n    </span>\n  )\n}\n\n/** The line between markers. Decorative; hidden on the last item. */\nfunction TimelineConnector({\n  className,\n  ...props\n}: React.ComponentProps<\"span\">) {\n  return (\n    <span\n      data-slot=\"timeline-connector\"\n      aria-hidden=\"true\"\n      className={cn(\n        \"bg-border my-1 w-px flex-1 group-last/timeline-item:hidden\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TimelineContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"timeline-content\"\n      className={cn(\n        \"flex min-w-0 flex-1 flex-col gap-1 pt-0.5 pb-6 group-last/timeline-item:pb-0\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\n/** A row for the title, badges, and time. Time floats right via TimelineTime. */\nfunction TimelineHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"timeline-header\"\n      className={cn(\"flex flex-wrap items-center gap-x-2 gap-y-1\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction TimelineTitle({ className, ...props }: React.ComponentProps<\"h3\">) {\n  return (\n    <h3\n      data-slot=\"timeline-title\"\n      className={cn(\"text-sm leading-5 font-medium\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction TimelineTime({ className, ...props }: React.ComponentProps<\"time\">) {\n  return (\n    <time\n      data-slot=\"timeline-time\"\n      className={cn(\n        \"text-muted-foreground ml-auto text-xs whitespace-nowrap tabular-nums\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TimelineDescription({\n  className,\n  ...props\n}: React.ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"timeline-description\"\n      className={cn(\"text-muted-foreground text-sm\", className)}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Timeline,\n  TimelineItem,\n  TimelineRail,\n  TimelineMarker,\n  TimelineConnector,\n  TimelineContent,\n  TimelineHeader,\n  TimelineTitle,\n  TimelineTime,\n  TimelineDescription,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}