Snippets Emoji

Bootstrap 5 Emoji Rating and Review Component

A satisfaction summary with an emoji headline and per-category progress bars, next to an emoji rating form with an optional comment.

Bootstrap 5 No jQuery Dec 2019 3.5K views

<section class="wdw-stage">
  <div class="container" style="max-width: 980px;">
    <div class="row g-4 align-items-stretch">
      <div class="col-lg-6">
        <div class="wdw-card p-4 p-md-5 h-100">
          <div class="text-center mb-4">
            <div class="rv-hero" id="rv-hero" aria-hidden="true">😍</div>
            <h1 class="wdw-heading h4 mb-1">3,234 people are satisfied</h1>
            <p class="wdw-muted small mb-0">Average across <span id="rv-total">4</span> categories this month</p>
          </div>
          <ul class="list-unstyled d-grid gap-3 mb-0" id="rv-rows">
            <li class="d-flex align-items-center gap-3"><span class="rv-emoji" aria-hidden="true">😍</span><div class="flex-grow-1"><div class="d-flex justify-content-between small mb-1"><span class="fw-semibold">Coffee</span><span class="wdw-muted">200 people</span></div><div class="progress" role="progressbar" aria-label="Coffee satisfaction" aria-valuenow="96" aria-valuemin="0" aria-valuemax="100" style="height:8px"><div class="progress-bar" style="width:96%"></div></div></div></li>
            <li class="d-flex align-items-center gap-3"><span class="rv-emoji" aria-hidden="true">😄</span><div class="flex-grow-1"><div class="d-flex justify-content-between small mb-1"><span class="fw-semibold">Customer service</span><span class="wdw-muted">165 people</span></div><div class="progress" role="progressbar" aria-label="Customer service satisfaction" aria-valuenow="82" aria-valuemin="0" aria-valuemax="100" style="height:8px"><div class="progress-bar" style="width:82%"></div></div></div></li>
            <li class="d-flex align-items-center gap-3"><span class="rv-emoji" aria-hidden="true">☺️</span><div class="flex-grow-1"><div class="d-flex justify-content-between small mb-1"><span class="fw-semibold">Outdoor lighting</span><span class="wdw-muted">130 people</span></div><div class="progress" role="progressbar" aria-label="Outdoor lighting satisfaction" aria-valuenow="65" aria-valuemin="0" aria-valuemax="100" style="height:8px"><div class="progress-bar" style="width:65%"></div></div></div></li>
            <li class="d-flex align-items-center gap-3"><span class="rv-emoji" aria-hidden="true">😥</span><div class="flex-grow-1"><div class="d-flex justify-content-between small mb-1"><span class="fw-semibold">Restrooms</span><span class="wdw-muted">100 people</span></div><div class="progress" role="progressbar" aria-label="Restrooms satisfaction" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="height:8px"><div class="progress-bar bg-warning" style="width:40%"></div></div></div></li>
          </ul>
        </div>
      </div>

      <div class="col-lg-6">
        <form class="wdw-card p-4 p-md-5 h-100 d-flex flex-column" id="rv-form" novalidate>
          <span class="wdw-eyebrow">Your turn</span>
          <h2 class="wdw-heading h4 mt-1 mb-1">How was your visit?</h2>
          <p class="wdw-muted small mb-4" id="rv-label" aria-live="polite">Pick the face that fits best.</p>
          <fieldset class="mb-4">
            <legend class="visually-hidden">Rating</legend>
            <div class="d-flex justify-content-between gap-1 gap-sm-2" id="rv-faces">
              <div class="rv-face"><input type="radio" class="btn-check" name="rv" id="rv1" value="Poor" autocomplete="off"><label for="rv1"><span aria-hidden="true">😡</span><span class="visually-hidden">Poor</span></label></div>
              <div class="rv-face"><input type="radio" class="btn-check" name="rv" id="rv2" value="Not great" autocomplete="off"><label for="rv2"><span aria-hidden="true">😕</span><span class="visually-hidden">Not great</span></label></div>
              <div class="rv-face"><input type="radio" class="btn-check" name="rv" id="rv3" value="Okay" autocomplete="off"><label for="rv3"><span aria-hidden="true">😐</span><span class="visually-hidden">Okay</span></label></div>
              <div class="rv-face"><input type="radio" class="btn-check" name="rv" id="rv4" value="Good" autocomplete="off"><label for="rv4"><span aria-hidden="true">😊</span><span class="visually-hidden">Good</span></label></div>
              <div class="rv-face"><input type="radio" class="btn-check" name="rv" id="rv5" value="Loved it" autocomplete="off"><label for="rv5"><span aria-hidden="true">😍</span><span class="visually-hidden">Loved it</span></label></div>
            </div>
          </fieldset>
          <div class="mb-3">
            <label for="rv-note" class="form-label small fw-semibold">Anything we should know? <span class="wdw-muted fw-normal">(optional)</span></label>
            <textarea class="form-control" id="rv-note" rows="3" placeholder="The coffee was great, the lighting could be warmer..." style="height:auto;min-height:0;"></textarea>
          </div>
          <button type="submit" class="btn btn-primary rounded-pill mt-auto" id="rv-submit">Send review</button>
        </form>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.