shadcn.io is not affiliated with official shadcn/ui
Table examples · Advanced
Compatibility Table for React
A browser support table with a check or a cross in each cell.
Five CSS features against six browsers. Each cell is a centered check in the success color or a cross in the destructive color, and each icon is labeled Supported or Not supported for screen readers. Icons scan faster than yes and no when the grid is wide; use the pattern for feature matrices, platform support and plan comparisons.
Preview
Installation
FAQ
How does a cell show supported or not?
SupportIcon takes a supported boolean. True renders CheckIcon in text-success. False renders XIcon in text-destructive. Both icons use size-4, so the colors follow your theme in light and dark mode.
How are the icons centered?
Each browser TableHead has text-center, and SupportIcon wraps the icon in flex justify-center. The feature name is a font-medium cell, and its header is w-[180px].
Where do the booleans come from?
Each object in features stores chrome, firefox, safari, edge, chromeAndroid and safariIos. The row passes those fields to SupportIcon, and feature.feature is the key.
Do the check and cross have a name?
Yes. Each icon has role="img" and an aria-label, Supported or Not supported, so a screen reader reads the status in each cell. The color is never the only signal: the check and the cross differ in shape too.
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
- 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