Skip to content
shadcn.io

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.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

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.

Why doesn't the block change height when I pick a badge?

All six panels sit in one grid cell and only the picked one shows, so the cell is as tall as the tallest panel. On a phone the title and the issuer reserve two lines each, which is the most any of the six needs.

Are the dates computed from today?

No. Every date is fixed text in the data, shown with Intl.DateTimeFormat in UTC so the server and the browser agree. A credential that has lapsed by the time you read this is still shown with the date it had, which is what a record of what was issued should do.

  • Pro

    Credentials Table Team

    Skills and expertise

    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.

  • Pro

    A 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

    One 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 expertise

    A 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 mentoring

    One 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 expertise

    One 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.