shadcn.io is not affiliated with official shadcn/ui
Table examples · Advanced
Dense Table for React
A compact table of activity logs with short rows and small text.
Six log entries in rows of h-8, with py-1 text-sm on the cells and py-2 on the header. More records fit on screen while the dividers and the hover stay. Use it for audit trails, activity logs and admin lists where people scan many rows.
Preview
Installation
FAQ
What makes these rows shorter?
Every body TableRow has h-8, and its cells use py-1 text-sm instead of the default p-2. The header cells keep their h-10 height and use py-2.
How is the time column aligned?
The Time TableHead and each time TableCell use text-end. ID, event, user and IP stay at the start.
What does each row show?
logs has six records. A row shows id, event, user, ip and time, and log.id is the key.
Do the short rows still have a divider and a hover?
Yes. h-8 only sets the height. TableRow still has a bottom border and hover:bg-muted/50.
Related
- Basic TableA bordered table of users with their
- Table with Vertical LinesA table of projects with vertical lines
- Vertical TableA two-column table listing a profile's
- Compatibility TableA browser support table with a check or a
- Striped TableA table of transactions with every other
- Table with AvatarA table of team members with an avatar