{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "section-header",
  "title": "Section header",
  "description": "title + action, outside the card",
  "dependencies": [
    "cn@^0.4.0"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/kit/section-header.tsx",
      "content": "import { cn } from 'cn';\nimport Link from 'next/link';\n\ntype Props = {\n  title: string;\n  /** Optional trailing text action (\"See all\"). */\n  action?: string;\n  onAction?: () => void;\n  /** Or make the action a link. */\n  actionHref?: string;\n  /** Heading level. Default 2. */\n  level?: 2 | 3;\n  className?: string;\n};\n\n/** Section title with optional action. Sits OUTSIDE the card it introduces. */\nexport function SectionHeader({ title, action, onAction, actionHref, level = 2, className }: Props) {\n  const Heading = level === 3 ? 'h3' : 'h2';\n  const actionClass = 'text-primary focus-visible:ring-ring/50 rounded-sm text-sm font-medium outline-none hover:underline focus-visible:ring-[3px]';\n  return (\n    <div className={cn('flex items-end justify-between gap-4', className)}>\n      <Heading className=\"text-lg font-semibold\">{title}</Heading>\n      {action ? (\n        actionHref ? (\n          <Link href={actionHref} className={actionClass}>\n            {action}\n          </Link>\n        ) : (\n          <button type=\"button\" onClick={onAction} className={actionClass}>\n            {action}\n          </button>\n        )\n      ) : null}\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/kit/section-header.tsx"
    }
  ],
  "meta": {
    "exports": [
      "SectionHeader"
    ],
    "api": "<SectionHeader title action? onAction? actionHref? level? />"
  },
  "docs": "Needs the kit theme (`@kit/theme`) and a next-themes ThemeProvider (attribute=\"class\") at the root.",
  "categories": [
    "navigation"
  ],
  "type": "registry:component"
}