--- title: Table description: A structured layout for rows and columns of data. --- ## Preview ## Installation CLI Manual ```bash npx @olyx/cli@latest add table ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "@/components/ui/table" ``` ```tsx Caption Header Header Cell Cell
``` ## API Reference ### Table The main table container, wrapped in a `ScrollArea` for horizontal overflow. ### TableHeader Header section of the table containing column headers. ### TableBody Body section of the table containing data rows. ### TableFooter Footer section of the table. ### TableRow A row in the table. ### TableHead A header cell in the table. ### TableCell A data cell in the table. ### TableCaption A caption for the table, rendered at the bottom. ## Examples ### Responsive Table