{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "list-group",
  "title": "List group",
  "description": "the CONTAINER around rows: title, dividers, footnote, card/plain surface · sets `last` for you",
  "dependencies": [
    "cn@^0.4.0"
  ],
  "registryDependencies": [
    "card"
  ],
  "files": [
    {
      "path": "components/kit/list-group.tsx",
      "content": "import { cn } from 'cn';\nimport * as React from 'react';\nimport { Card } from '@/components/ui/card';\n\ntype Props = {\n  /** Optional title above the group. */\n  title?: string;\n  /** Small print under the group: what a setting affects, a legal note. */\n  footnote?: string;\n  /** `card` sits the rows on a surface; `plain` runs them straight on the background. */\n  variant?: 'card' | 'plain';\n  children: React.ReactNode;\n  className?: string;\n};\n\n/** A group of ListRows with the divider bookkeeping handled: it sets `last` on the final row. */\nexport function ListGroup({ title, footnote, variant = 'card', children, className }: Props) {\n  const items = React.Children.toArray(children).filter(React.isValidElement);\n  const rows = items.map((child, i) => (i === items.length - 1 ? React.cloneElement(child as React.ReactElement<{ last?: boolean }>, { last: true }) : child));\n  return (\n    <section className={cn('flex flex-col gap-3', className)}>\n      {title ? <h3 className=\"text-lg font-semibold\">{title}</h3> : null}\n      {variant === 'card' ? <Card className=\"w-full gap-0 px-4 py-0\">{rows}</Card> : <div className=\"w-full\">{rows}</div>}\n      {footnote ? <p className=\"text-muted-foreground text-xs leading-5\">{footnote}</p> : null}\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/kit/list-group.tsx"
    }
  ],
  "meta": {
    "exports": [
      "ListGroup"
    ],
    "api": "<ListGroup title? footnote? variant=\"card|plain\">{rows}</ListGroup>"
  },
  "docs": "Needs the kit theme (`@kit/theme`) and a next-themes ThemeProvider (attribute=\"class\") at the root.",
  "categories": [
    "data"
  ],
  "type": "registry:component"
}