shadcn.io is not affiliated with official shadcn/ui
Credentials Table Team Block for React
Nine credentials held by the people of a compliance-software company in a ruled table, each with its holder, certification, fictional issuing body and the month it is valid until, under a category filter that moves the picked category to the front and dims the rest.
Installation
Overview
A credentials section for React with Base UI, for Aysgarth, a compliance suite that has to show its own house in order. A start-aligned header counts the list ("9 credentials, 2 due within a year"), a ruled band holds a category filter (All, Cloud, Security, Management, each with its count) and a table runs from rail to rail and ends the block. Each row names the holder (an initials avatar, a name and a specific role), the certification, the body that issued it and the month it is valid until, with the time remaining underneath ("Valid for 2 more years"); credentials that end within a year are set heavier. Pick a category and its credentials move to the front while the others stay in place, dimmed, so the table keeps its height. A phone shows two columns, six rows and a Show all button. It's built from Toggle Group, Avatar, Button and Guides, with CSS transitions and your theme's tokens. For security pages, trust centres and procurement answers. The people, the bodies and the credentials are made up.
FAQ
How do I change the credentials?
Edit CREDENTIALS at the top of the file. A credential is a name, a role, a certification, an issuing body, a category and an expires date as an ISO string; the headcounts on the filter and the "due within a year" figure in the header are counted from the same list, so adding a row needs no other change. The issuing bodies in the example are invented: use the real body's name for a real credential.
Where does the time remaining come from?
It is worked out from the expires date and a fixed AS_OF date in the file, never from the clock, so the page reads the same on the server, in the browser and in a screenshot. The header says "Dates as of October 2026" to match. To show the time remaining from today instead, replace AS_OF with the current date after the page loads (an effect that sets a state), and render dashes until then.
How does the filter work with a keyboard and a screen reader?
It is a group of toggle buttons named Category, with exactly one picked at all times. Tab moves into it and the arrow keys move between the options; each one is read with its count ("Security, 3 credentials"). A polite status line reads the result ("Security first: 3 of 9 credentials") without moving focus, and the picked category's rows also come first in the table itself. On Base UI the toggles are buttons with a pressed state.
Why are the other credentials dimmed instead of hidden?
Hiding rows would shrink the table and move everything under it. Instead the picked category's rows come first, in their usual order, and the others stay below them with a light tint and muted names; every word keeps AA contrast in light and dark themes. The block keeps one height whatever you pick.
How does the table fit on a phone?
Below sm the Issuing body and Valid until columns move under the certification, so two columns remain and nothing scrolls sideways. The table shows the first six rows and a Show all 9 button; the button says whether the table is expanded and keeps one label. The category filter scrolls sideways from rail to rail when its options don't fit.
Related
- Pro
Hexagon Badge Credential Showcase Team
Skills and expertiseOne person's six credentials as a framed shelf of hexagonal badges drawn in CSS, each picked to fill a panel with its issuer, credential ID, issue date, valid-until date and a Verify link.
- Pro
Awards Table Team
RecognitionA table of eight awards for a field-notes app: the winner, the category with a small drawn mark, the company year, and a button that opens the citation in place under the row.
- Pro
Expertise Matrix Team
Skills and expertiseEight CI-platform engineers down a table, four skills across with five-level dots, pill tabs to switch the skill group and a last row for the team average, running rail to rail and scrolling sideways on a phone.
- Pro
Coverage Heatmap Team
Skills and expertiseA heatmap of six skills by five field-survey people, every cell a button shaded in five foreground steps with its level written in it, a target column, a coverage count with a Thin marker and a polite line that names the picked cell.
- Pro
Sortable Directory Team
Lists and directoriesA document-signing company's ten people in a table whose cells share their hairlines, sorted by name, department or tenure from the header, with a tenure bar and a live sort announcement.
- Pro
Grid Cards Team
Grids and wallsTwelve people of a restaurant-software company in a hairline grid that runs from rail to rail, each an initials avatar with a name, a role, a department badge and a city, under a department picker that brings the picked team to the front and dims everyone else.