Ratings
Stars to give, and stars shown
Give a rating
Five radio buttons in a group: arrow keys change it.
Show the code
<fieldset class="rate"> <legend class="sr-only">Rate your visit</legend> <input type="radio" name="rate" id="rate-5" value="5"> <label for="rate-5"> <i class="ti ti-star"> </i> <span class="sr-only">5 stars</span> </label> <input type="radio" name="rate" id="rate-4" value="4" checked> <label for="rate-4"> <i class="ti ti-star"> </i> <span class="sr-only">4 stars</span> </label> <input type="radio" name="rate" id="rate-3" value="3"> <label for="rate-3"> <i class="ti ti-star"> </i> <span class="sr-only">3 stars</span> </label> <input type="radio" name="rate" id="rate-2" value="2"> <label for="rate-2"> <i class="ti ti-star"> </i> <span class="sr-only">2 stars</span> </label> <input type="radio" name="rate" id="rate-1" value="1"> <label for="rate-1"> <i class="ti ti-star"> </i> <span class="sr-only">1 star</span> </label> </fieldset>
Show a rating
An average shows a half star; the number is in the label and beside the stars.
4.4 from 10 reviews
Show the code
<span class="stars" role="img" aria-label="4.4 out of 5 stars"> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <span class="star-half"> <i class="ti ti-star"> </i> <i class="ti ti-star on"> </i> </span> </span> <span class="muted fs-sm">4.4 from 10 reviews</span>
Each review
Whole stars for one person’s rating.
5 of 5
3 of 5
1 of 5
Show the code
<div class="stack tight"> <span class="cluster gap-2"> <span class="stars" role="img" aria-label="5 out of 5 stars"> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> </span> <span class="fs-sm muted">5 of 5</span> </span> <span class="cluster gap-2"> <span class="stars" role="img" aria-label="3 out of 5 stars"> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <i class="ti ti-star on"> </i> <i class="ti ti-star"> </i> <i class="ti ti-star"> </i> </span> <span class="fs-sm muted">3 of 5</span> </span> <span class="cluster gap-2"> <span class="stars" role="img" aria-label="1 out of 5 stars"> <i class="ti ti-star on"> </i> <i class="ti ti-star"> </i> <i class="ti ti-star"> </i> <i class="ti ti-star"> </i> <i class="ti ti-star"> </i> </span> <span class="fs-sm muted">1 of 5</span> </span> </div>