Skip to content

Browse components

← All components

Table

Data table primitives that match the rest of the surfaces.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/table.json

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/table.json

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/table.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/table.

Import
import {  Table,  TableBody,  TableCaption,  TableCell,  TableHead,  TableHeader,  TableRow} from "@/components/ui/table"
example.tsx
import {  Table,  TableBody,  TableCaption,  TableCell,  TableHead,  TableHeader,  TableRow,} from "@/components/ui/table"export function Example() {  return (    <Table>      <TableCaption>Recent invoices</TableCaption>      <TableHeader>        <TableRow>          <TableHead>Invoice</TableHead>          <TableHead>Status</TableHead>        </TableRow>      </TableHeader>      <TableBody>        <TableRow>          <TableCell>INV001</TableCell>          <TableCell>Paid</TableCell>        </TableRow>      </TableBody>    </Table>  )}

API Reference

Table

Styled `table`. Also exports `TableFooter`.

PropTypeDefault
classNamestring—