shadcn.io is not affiliated with official shadcn/ui
Credential Badge Kit Awards Block for React
A credential badge drawn at 96, 64 and 32 pixels in a framed figure, beside an HTML and Markdown embed snippet in tabs with a Copy button and a Verified line that shows the day the credential is valid until.
Installation
Overview
A credential badge kit for React with Base UI. A split on a divider: at the end a framed figure draws the badge, a scalloped seal round a ring and a check, at the three sizes a platform issues (96, 64 and 32 pixels) with where each goes; at the start, under the header, an embed snippet in two tabs (HTML and Markdown) in a mono box with a Copy button, and a line that reads "Verified" with the day the credential is valid until. On a phone the figure comes before the snippet. The page's rails and top rule come from the Guides spine. The badge is a drawing made for the example, not a real standard's mark; Hallmarq, the Dunegate Standard, the numbers and the embed addresses (on the reserved example domain) are made up: swap in your own credential and links.
FAQ
How do I change the badge?
It is one inline SVG in a 64 by 64 box, built from three pieces at the top of the file: SEAL (the scalloped edge, LOBES round bumps on a circle), RING and CHECK. Change LOBES for a different edge, or replace CHECK with your own path. CredentialMark takes a size class and whether to draw the ring: the 32 pixel size drops it so the mark stays clear. The drawing is hidden from assistive technology; the credential's name is in the alternative text of the snippet and in the text beside it.
Where do the snippets come from and how does Copy work?
HTML_SNIPPET and MARKDOWN_SNIPPET are plain strings at the top of the file, and the Copy button copies exactly the text in its box, then says "Copied" to screen readers. Browsers only allow clipboard access on secure pages (HTTPS or localhost); if the clipboard refuses, the button says so instead of failing silently. The box scrolls sideways on a narrow screen and can be focused to scroll it with the keyboard.
How do the tabs work from the keyboard?
Tab moves into the list and the arrow keys switch between HTML and Markdown on every library; Home and End jump to the first and last. Both snippet boxes are the same height, so switching never moves the page.
Where does the Verified line come from?
It is worked out, not typed: VALID_UNTIL is a fixed day and AS_OF is a fixed day the block is read as of. If the first is on or after the second the line reads "Verified" with the days to go; otherwise it reads "Expired". Set AS_OF to today's date in your own page, or compute it where you render, to keep it current.
Is this a real certification?
No. Hallmarq and the Dunegate Standard are made up and nothing here checks anything. The badge is drawn by the block, not copied from any standards body. If you show a real certification, name it in text and use its official badge only if its rules allow it.
How does it fit on a phone?
The header comes first, then the framed figure with the three sizes side by side, then the embed snippet; thin rules separate the parts. Nothing scrolls sideways at 320 pixels except the code box itself. In a right-to-left layout the split mirrors while the code stays left to right.
Related
- Pro
Verification Lookup Awards
Filters and searchA certificate number lookup with a labelled field and a Shine Button, sample numbers as chips and a live result panel that reads Valid, Expired or Not found against four typed records.
- Pro
Certificate Awards
One featured awardA formal certificate of award as HTML with a double hairline frame, a drawn laurel, the recipient, a citation, two signature strokes and a seal, beside a details list and an outline Verify link.
- Pro
Annotated Seal Awards
Badges and sealsA large drawn seal with a grade, a year ribbon, a serial and the lab and programme set round it on a text path, with four numbered hairline leaders to an ordered list that explains each mark.
- Pro
Seal Row Awards
Badges and sealsA free row of six drawn award seals, each a different silhouette, with the award, its programme and the year under it, and one counted line below.
- Pro
Dense Badge Wall Awards
Badges and sealsA wall of twelve drawn award badges on shared hairlines, four across, with a tally counted from the list and a show-all button on phones.
- Pro
Status Grouped Compliance Badges About
Security and platformA compliance list for a vendor-risk tool grouped by status, In force and In progress, each row a generic programme with its scope, last audit and next step, with a ghost link to request the report.