Skip to content

Emoji Feedback Rating

Bootstrap 5 feedback card with five emoji faces from Terrible to Excellent, a mood-aware comment prompt and simulated submit.

Also known as: emoji rating, emoji feedback form, satisfaction rating faces, smiley feedback widget, customer mood rating

Bootstrap 5 Ratings Responsive #card #emoji #feedback #form #rating

Emoji Feedback Rating live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A Bootstrap 5 satisfaction widget that asks one quick question and lets visitors answer with five emoji faces, from Terrible to Excellent. Drop it after checkout, at the end of a help article or in an onboarding flow where a star rating feels too formal.

How it works

The card is a section.efr-card inside a pastel gradient .efr-wrap. The faces are a real radio group: five input.efr-input elements (hidden with Bootstrap's visually-hidden) inside a fieldset, each followed by a label.efr-face that holds an inline SVG face and a text label. The faces are drawn with SVG circles and paths instead of emoji characters, so they look the same everywhere. The .efr-scale grid keeps all five in one row, even on narrow phones.

Unselected faces are muted with filter: saturate(0.25). Hovering a face restores its color and lifts it slightly; the checked face gets a tinted background, a colored border and a springy scale(1.18). All of this is pure CSS using the :checked + .efr-face sibling selector.

The script runs on DOMContentLoaded for every .efr-card. On each change it copies the data-efr-prompt of the chosen input into the .efr-prompt label above the comment box, so a low score asks "What went wrong?" and a high score asks what the visitor enjoyed. On submit it calls preventDefault(), shows the spinner inside .efr-submit and after 800 ms writes a thank-you message into .efr-status. If no face is selected, it shows an error instead.

Customization

  • --efr-accent and --efr-accent-hover on .efr-wrap in style.css: change the color of the badge text, the focus ring and the submit button.
  • --efr-face in .efr-face--1 to .efr-face--5: set the fill color of each face.
  • data-efr-prompt on each input.efr-input: change the follow-up question shown above the comment box for that score.
  • The .efr-face__text spans: rename the five labels, such as "Very unhappy" to "Very happy".
  • checked on the fourth input in index.html: move it to preselect another face, or remove it to start with no selection.
  • max-width: 560px in .efr-card: make the card wider or narrower.
  • The setTimeout in the submit handler of script.js: replace it with your own fetch() call that sends the payload object.

Use cases

  • Support pages: visitors rate help with five faces from Terrible to Excellent
  • Post-purchase surveys: a mood-aware comment prompt asks the right follow-up question
  • SaaS apps: a quick feedback card collects sentiment with one click
  • Documentation sites: a simulated submit shows a thank-you state after rating

Accessibility

Because the faces are native radio buttons, the arrow keys move between them and Tab leaves the group, as users expect. The fieldset has a visually hidden legend that explains the 1 to 5 scale, and every face has a visible text label, so screen readers announce "Good, radio button, 4 of 5". The SVG icons are aria-hidden. A focused face gets a 3 px outline through .efr-input:focus-visible + .efr-face. .efr-status is a role="status" live region, so the confirmation and the error are announced. Under prefers-reduced-motion: reduce the transitions and scale effects are turned off.

Usage notes

Requires only Bootstrap 5. The radio id, for and name values must be unique on the page, so rename them when you add a second card.

Emoji Feedback Rating at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5
Layout
Responsive, works on mobile
Category
Ratings
License
Free for personal and commercial use

Questions about this template

Can I use the Emoji Feedback Rating code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
Emoji Feedback Rating – free Bootstrap 5 rating template
Emoji Feedback Rating · free Bootstrap 5 rating template

More Ratings

Star Rating Input – free Pure CSS rating template

Star Rating Input

Accessible pure CSS star rating input with half stars, built on native radio buttons, hover preview and a live value label.

Rating Summary with Bars – free Tailwind CSS rating template

Rating Summary with Bars

Tailwind CSS review summary with an average score, partial star fill and clickable rating distribution bars that filter reviews.