About this set
Choice controls that carry some character. A heart toggle is a checkbox whose emoji heart is greyed out until the item is saved, then shows in full colour at a slightly larger size. A five-star rating is built from five radio buttons, so exactly one rating is selected and it submits with a form like any radio group. A thumbs up/down pair is a two-option radio group for quick feedback on articles and help pages. The star rating uses the reversed-order technique: the radios run from five to one in the markup and the row is flipped with flex-direction row-reverse, so a sibling selector can colour the checked star and every star to its left, with a hover preview. The emoji marks use a CSS grayscale filter and scale transform keyed off the checked input. The Bootstrap version hides each input with .btn-check and uses .visually-hidden for the star names. The Tailwind version uses peer-checked, peer-hover and grayscale utilities.
What’s included
- Heart toggle built on a checkbox
- Five-star rating built from radios, with hover preview
- Thumbs up/down radio pair
- Stars and emoji hidden from screen readers, with text names
- No JavaScript
Accessibility
Every control is a real input: the hearts and thumbs are labelled by their visible text, and each star has visually hidden text such as 4 stars while the glyph is aria-hidden. The rating and thumbs groups have role="radiogroup" with an aria-label. Focus draws a 2px blue outline around the heart, thumb or star. Because the stars are in reverse order, the arrow keys move from higher to lower ratings. Scale and colour transitions are disabled under prefers-reduced-motion.
Customise it
Plain CSS: change #d97706 (selected) and #848fa3 (empty) in the .rate rules and the font-size of .heart, .thumb and the stars. Bootstrap: set --choice-star and --choice-star-on on .choice-rate. Tailwind: swap amber-600 and text-[#848fa3] on the star labels.






