Rating
A star rating field for capturing satisfaction or quality scores.
Overview
The Rating field renders a row of star icons (or other symbols) that the respondent can click to select a score. It is the go-to field for Net Promoter Score (NPS) surveys, product reviews, and service satisfaction ratings.
The maximum rating count defaults to 5 but can be changed up to 10. The field stores the selected numeric value (1 through max). You can configure icon style, size, and whether half-star increments are allowed.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| type | string | — | The field type identifier (e.g. "text", "email"). |
| label | string | — | Human-readable label shown above the field. |
| name | string | — | Unique machine name used as the data key in submissions. |
| required | boolean | false | When true the form cannot be submitted without a value. |
| placeholder | string | undefined | Ghost text shown inside the input when empty. |
| defaultValue | any | undefined | Pre-filled value when the form loads. |
| hidden | boolean | false | Hides the field from the rendered form (still submitted). |
| disabled | boolean | false | Renders the field as read-only and non-interactive. |
| description | string | undefined | Helper text displayed below the field label. |
| className | string | undefined | Additional CSS class applied to the field wrapper. |
| maxRating | number | 5 | Total number of rating icons shown. |
| allowHalf | boolean | false | Allows selecting 0.5 increment values. |
| icon | "star" | "heart" | "thumb" | "star" | The icon used for rating symbols. |
| labels | string[] | undefined | Optional label for each rating value (e.g. ["Poor", "Excellent"]). |
JSON Schema
{
"type": "rating",
"label": "How would you rate our service?",
"name": "service_rating",
"required": true,
"maxRating": 5,
"allowHalf": false,
"icon": "star",
"labels": ["Poor", "Fair", "Good", "Very Good", "Excellent"]
}