Skip to content

Rating

A row of stars scoring out of max; readOnly only displays.

Group: Inputs · Kind: macro · in the lite catalog

example
size · sm
size · default
size · lg

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-rating on Web
exponential-ui-rating on iOS
exponential-ui-rating on Android
exponential-ui-rating on Desktop
readOnly
Prop Type Required Bindable Description
value number – yes The score, 0 to max. Default 0.
max number – – How many stars (1 to 100). Default 5.
readOnly boolean – – Display only; no presses. Default false.
size sm | default | lg – – Star size. Default "default".
  • on.change: runs an action

None.

none

No basic catalog component maps here.

Box · Icon

Role: group

A group of star buttons: each labelled ratingStar (“3 of 5”), the chosen one aria-pressed; read-only stars leave the tree and the group is an img labelled ratingValue ($a11y).

Keys Action
Tab through the stars; Enter Space rate

Recipe parts: Rating/root Rating/star Rating/icon

Keyed by: size readOnly filled :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Icon · Form · FieldGroup · FormActions · Input · Textarea · NumberField · Checkbox