shadcn.io is not affiliated with official shadcn/ui
Table examples · Advanced
Vertical Table for React
A two-column table listing a profile's fields and their values.
One record shown as rows of label and value: name, email, phone, location, join date and role. The label column takes a third of the width and is set in medium weight. Use it for detail views, profile pages and order summaries, where a single record reads better down than across.
Preview
Installation
FAQ
How is this table organized?
Two columns, Field and Value. userInfo has six pairs, and each pair is a TableRow keyed by info.label. The label cell is font-medium. The value cell is plain text.
How wide is the field column?
The Field TableHead has w-1/3, so the labels take a third of the table and the values take the rest. The frame is max-w-md.
Which fields are shown?
Full Name, Email, Phone, Location, Joined and Role, in that order, from the userInfo array.
Do the rows still have dividers?
Yes. This file does not set border-b-0. TableRow keeps its bottom border and hover:bg-muted/50, and TableHeader separates the Field and Value labels.
Related
- Basic TableA bordered table of users with their
- Table with Vertical LinesA table of projects with vertical lines
- Dense TableA compact table of activity logs with
- 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