{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "list-group",
  "title": "List group",
  "description": "the CONTAINER around rows: owns the title, dividers, footnote and card/plain surface · wraps ListRows and sets `last` for you · `variant` card/plain (plain = settings look)",
  "dependencies": [],
  "registryDependencies": [
    "@kit-native/card",
    "@kit-native/lib-utils",
    "@kit-native/text"
  ],
  "files": [
    {
      "path": "components/kit/list-group.tsx",
      "content": "import { Card } from '@/components/ui/card';\nimport { Text } from '@/components/ui/text';\nimport { cn } from '@/lib/utils';\nimport * as React from 'react';\nimport { View } from 'react-native';\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/**\n * A group of `ListRow`s, with the divider bookkeeping handled.\n *\n * It sets `last` on the final row for you, so a mapped list needs no index maths.\n * `plain` is the settings look: hairline dividers on the background, no card.\n */\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) =>\n    i === items.length - 1\n      ? React.cloneElement(child as React.ReactElement<{ last?: boolean }>, { last: true })\n      : child\n  );\n\n  return (\n    <View className={cn('gap-3', className)}>\n      {title ? <Text variant=\"large\">{title}</Text> : null}\n      {variant === 'card' ? (\n        <Card className=\"w-full gap-0 px-4 py-0\">{rows}</Card>\n      ) : (\n        <View className=\"w-full\">{rows}</View>\n      )}\n      {footnote ? <Text className=\"text-muted-foreground text-xs leading-5\">{footnote}</Text> : null}\n    </View>\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": "Run `npx expo install --fix` afterwards so Expo SDK packages match your SDK. Needs the kit theme (`@kit-native/theme`) and `KitThemeProvider` from `@kit-native/lib-theme-context` at the root.",
  "categories": [
    "data"
  ],
  "type": "registry:component"
}