shadcn.io is not affiliated with official shadcn/ui
Table examples · Advanced
Table with Vertical Lines for React
A table of projects with vertical lines between the columns.
Four projects with border-e on every column but the last, so each column has a line on its trailing side and the frame keeps a single edge. The rows keep their horizontal dividers, which gives the table a grid. Use it for wide tables and spreadsheet-like views where the column boundaries matter.
Preview
Installation
FAQ
Which cells get a vertical line?
Project, Status and Priority use border-e on both TableHead and TableCell. Assignee, the last column, has no border-e, so the line does not sit on the frame's edge.
What else is on the project name?
The project TableCell adds font-medium beside border-e. Status, priority and assignee stay at the regular weight.
What does a row contain?
projects has four records. Each TableRow is keyed by project.name and shows the name, status, priority and assignee.
Do the horizontal dividers stay?
Yes. border-e only paints the trailing edge. TableRow still has its bottom border and hover:bg-muted/50.
Related
- Dense TableA compact table of activity logs with
- Basic TableA bordered table of users with their
- Compatibility TableA browser support table with a check or a
- Vertical TableA two-column table listing a profile's
- Striped TableA table of transactions with every other
- Table with AvatarA table of team members with an avatar