{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "table",
  "title": "Table",
  "description": "Displays data in rows and columns.",
  "files": [
    {
      "path": "registry/new-york/ui/table.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Table = React.forwardRef<HTMLTableElement, React.ComponentProps<\"table\">>(\n  function Table({ className, ...props }, ref) {\n    return (\n      <div\n        className=\"relative w-full touch-manipulation overflow-auto\"\n        data-slot=\"table-wrapper\"\n      >\n        <table\n          className={cn(\"w-full caption-bottom text-sm\", className)}\n          data-slot=\"table\"\n          ref={ref}\n          {...props}\n        />\n      </div>\n    );\n  }\n);\n\nconst TableHeader = React.forwardRef<\n  HTMLTableSectionElement,\n  React.ComponentProps<\"thead\">\n>(function TableHeader({ className, ...props }, ref) {\n  return (\n    <thead\n      className={cn(\"tabular-nums [&_tr]:border-b\", className)}\n      data-slot=\"table-header\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nconst TableBody = React.forwardRef<\n  HTMLTableSectionElement,\n  React.ComponentProps<\"tbody\">\n>(function TableBody({ className, ...props }, ref) {\n  return (\n    <tbody\n      className={cn(\"[&_tr:last-child]:border-0\", className)}\n      data-slot=\"table-body\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nconst TableFooter = React.forwardRef<\n  HTMLTableSectionElement,\n  React.ComponentProps<\"tfoot\">\n>(function TableFooter({ className, ...props }, ref) {\n  return (\n    <tfoot\n      className={cn(\n        \"bg-muted/50 font-medium text-foreground tabular-nums\",\n        className\n      )}\n      data-slot=\"table-footer\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nconst TableRow = React.forwardRef<\n  HTMLTableRowElement,\n  React.ComponentProps<\"tr\">\n>(function TableRow({ className, ...props }, ref) {\n  return (\n    <tr\n      className={cn(\n        \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted motion-safe:duration-200\",\n        className\n      )}\n      data-slot=\"table-row\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nconst TableHead = React.forwardRef<\n  HTMLTableCellElement,\n  React.ComponentProps<\"th\">\n>(function TableHead({ className, ...props }, ref) {\n  return (\n    <th\n      className={cn(\n        \"h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0\",\n        className\n      )}\n      data-slot=\"table-head\"\n      ref={ref}\n      scope={(props as any).scope ?? \"col\"}\n      {...props}\n    />\n  );\n});\n\nconst TableCell = React.forwardRef<\n  HTMLTableCellElement,\n  React.ComponentProps<\"td\">\n>(function TableCell({ className, ...props }, ref) {\n  return (\n    <td\n      className={cn(\"p-4 align-middle tabular-nums\", className)}\n      data-slot=\"table-cell\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nconst TableCaption = React.forwardRef<\n  HTMLTableCaptionElement,\n  React.ComponentProps<\"caption\">\n>(function TableCaption({ className, ...props }, ref) {\n  return (\n    <caption\n      aria-atomic=\"true\"\n      aria-live=\"polite\"\n      className={cn(\"mt-4 text-muted-foreground text-sm\", className)}\n      data-slot=\"table-caption\"\n      ref={ref}\n      {...props}\n    />\n  );\n});\n\nexport {\n  Table,\n  TableHeader,\n  TableBody,\n  TableFooter,\n  TableHead,\n  TableRow,\n  TableCell,\n  TableCaption,\n};\n",
      "type": "registry:ui"
    }
  ],
  "docs": "https://ui.shadcn.com/docs/components/table?utm_source=hextaui&utm_medium=referral&utm_campaign=component-docs&ref=hextaui.com",
  "categories": [
    "component"
  ],
  "type": "registry:ui"
}