shadcn.io is not affiliated with official shadcn/ui
Nomination Form Awards Block for React
A nomination form for an internal recognition programme: a category radio group, a searchable colleague list, a reason with a live character count and a confirmation that says it is only recorded in the demo.
Installation
Overview
A nomination form for React with Base UI, split by a hairline that meets the page's top rule with a + mark. At the start, a compact header, the three steps from nomination to result as a numbered list joined by a thin line, and a band with the closing date. At the end, a real form: a category as a radio group of four cards, a colleague picked from a searchable list of eight in a Combobox, and a reason of up to 300 characters in a Textarea with a live count and the Shine Button to send. Submitting checks every field, shows each problem under its field, marks the control invalid and moves focus to the first one; a valid nomination turns into a summary in the same space, which takes focus and says it is recorded in this demo only. The page's rails and top rule come from the Guides spine. It's built from Radio Group, Combobox, Textarea, Field, Shine Button, Button, Guides and your theme's tokens. The Lumengate Awards and the colleagues are made up for the example.
FAQ
Where does the nomination go?
Nowhere. The submit handler waits 800 milliseconds as a stand-in for a request, then shows the summary, which says plainly that it is recorded in this demo only. Replace that timer in submit with your own call (an inbox, a form endpoint or your recognition tool): details holds the category, the colleague and the reason.
How does the form check what's entered?
The form has noValidate, so the browser's own bubbles stay away and the block shows its own. On submit, problems checks that a category is chosen, that a colleague was picked from the list (typing a name without choosing one doesn't count) and that the reason has at least 20 characters. Each problem appears under its field with an icon, the control gets aria-invalid and a description, and focus moves to the first one. Choosing or typing clears a field's message.
How does the colleague list work?
Type to filter the eight names and choose one with the pointer or the arrow keys and Enter; the clear button empties it. The list is COLLEAGUES at the top of the file, so swap in your own directory, or load it from your people API.
The list filters itself as you type from the items you pass.
How is the character count announced?
The visible count is hidden from assistive technology so a screen reader isn't interrupted at every key. A hidden status line speaks only at stages: twenty or fewer characters remain, ten or fewer, and none. The textarea stops at 300 characters.
What happens after sending?
The form turns into a summary in the same space, so the block keeps its height. The summary's heading takes focus and a status region announces it; it repeats the category, the colleague and the start of the reason. "Nominate someone else" brings back an empty form and puts focus on its heading.
Related
- Pro
Talk to Sales Contact
Contact formsA talk-to-sales split for a scheduling platform: what happens next as three numbered steps and a band of contact details beside a form that checks itself, shows each problem under its field and confirms in place.
- Pro
Judge Hover Card Awards
People and teamsThe jury of a hackathon cup as six cells on shared hairlines, each an initials avatar, a name, a role, a workplace and the fields judged, with a short bio in a hover card on hover, focus or touch.
- “Pro
Jury Statement Awards
Press and quotesThe jury's statement for each category a legal-drafting tool won: the categories as a radio group at the start, the chosen one's statement as a large quote with its jurors' avatars at the end.
- Pro
Raised Card Showcase Awards
Cards and gridsThree awards on one raised card for a storefront platform, each row a drawn mark, the award, its programme, a one-line reason and the year, with a centred header and a Shine Button to all awards.
- Pro
Trophy Hero Awards
One featured awardAn award as a hero for a voice platform: the headline, one sentence, a Shine Button and three judging figures beside a drawn trophy on a plinth with four category chips in front.
- Pro
Criteria Checklist Awards
Rankings and scoresTwo awards a code-quality scanner is working toward as cells with overshoot lines: a progress bar, a count and five criteria each, met or in review, with the last explained in a disclosure.