Star Rating

premium

Star rating component with configurable max stars.

Overview

The Star Rating component lets users rate something by clicking on stars. Treats 0 as "no selection" for required validation. Includes a hidden input for native form submission.

Properties

PropertyTypeDefaultDescription
nameString"rating"Field name used in form data.
labelString"Rating"Label displayed above the stars.
requiredBooleanfalseWhether a rating must be selected (0 = no selection).

Features

  • Click or hover to select rating
  • Configurable max stars
  • Custom filled/empty star colors
  • 0 treated as "no selection" for required validation
  • Hidden <input> for native form submission

Tips

A value of 0 is treated as "no selection" — this means required validation works correctly.
Use custom star colors to match your brand.

Validation

This component uses rating validation. See the Validation Guide for details on configuring rules and error messages.

Related components