--- title: Table description: A responsive table component. component: true --- ## Installation ```bash npx shadcn-ui add table ``` Manual Installation 1. Copy and paste the following code into your project. This is the `` primitive. You can place it in a file at `components/ui/table.tsx`. ## Usage ```tsx import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table" ``` ```tsx
A list of your recent invoices. Invoice Status Method Amount INV001 Paid Credit Card $250.00
``` ## Data Table You can use the `` component to build more complex data tables. Combine it with [@tanstack/react-table](https://tanstack.com/table/v8) to create tables with sorting, filtering and pagination. See the [Data Table](/docs/components/data-table) documentation for more information. You can also see an example of a data table in the [Tasks](/examples/tasks) demo.