shadcn.io is not affiliated with official shadcn/ui
Hexagon Badge Credential Showcase Team Block for React
One 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.
Installation
Overview
A credential showcase for React with Base UI, for one person: Ingrid Solheim, safety lead at Chillingham, a safety-training app. A header names her, counts her credentials and says which renews next (found from the dates). Under it a framed shelf holds six hexagonal badges, each drawn in CSS with its issuer's monogram and named by the credential under it. Pick a badge and its band thickens, the label turns bold and a panel under the shelf shows the issuer, the credential ID, the issue date and the date it is valid until, with a Verify link to the issuer's check page. Three badges to a row on a phone, six from sm. It's built from Toggle Group, Avatar, Shine Button and Guides, with a clip-path hexagon and your theme's tokens. For profile pages and trust pages. The person, the issuers and the credentials are made up, and Verify goes to # until you give each credential its real href.
FAQ
How do I change the credentials?
Edit CREDENTIALS at the top of the file. A credential has a title, an issuer, a two-letter monogram, a number, issued and until dates as ISO strings and an href for Verify. The "next to renew" line in the header is found by sorting the until dates, so nothing else needs editing. Keep six for a full shelf; fewer leave empty cells at the end of the row, more wrap onto a second shelf.
How is the hexagon drawn?
Two stacked spans share a clip-path polygon. The outer one is a solid mix of the foreground colour; the inner one is the page surface, inset by 2 px, or by 5 px when the badge is picked, so a picked badge has a thick band and the others a thin one. The monogram is text on top. The whole drawing is hidden from assistive technology: the credential's name under it is what a screen reader reads.
How does the shelf work with a keyboard and a screen reader?
It is a group of toggle buttons named Credential, with exactly one picked at all times. Tab moves into it and the arrow keys move between the badges, picking as they go; a polite status line says which credential is shown. The panels of the other credentials are invisible, inert and hidden from assistive technology.
What does Verify do?
It is a link, drawn as the page's one Shine Button, to wherever you point href for that credential: the issuer's own public page for the number, for example. In this example it goes to #, because the issuers are invented. Nothing is checked in the browser.
Related
- Pro
Credentials Table Team
Skills and expertiseNine 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.
- 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
Badge Tracker Team
RecognitionOne person's eight badges in hairline cells, earned ones solid and locked ones dashed outlines, beside the person and a bar to the next badge: 7 of 10 reviews to Reviewer II.
- 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
Course Steps Learning Path Team
Learning and mentoringOne person's study path for a certification as read-only vertical steps: five courses in hairline rows, ticked when done, a halo on the one in progress, each with a quiet bar and the hours to go.
- Pro
Expertise Tags Team
Skills and expertiseOne engineer's expertise in a split: a person and an endorsements stack on the start, three columns (Strong, Working, Learning) on the end, with the level carried by the chip's weight: solid, outlined or muted.