Rating

Attribute Type Documentation Default Value
id :any

HTML id attribute

name :string

form field name for hidden input

value :integer

current rating value (0 to max)

0
field %FormField{}

a form field struct retrieved from the form

max :integer

maximum number of stars

5
size :string

rating size variant

color :string

color variant for filled stars

readonly :boolean

make rating read-only (no interaction)

false
disabled :boolean

disable rating entirely

false
animated :boolean

enable pop animation on filled stars

false
compact :boolean

reduce spacing between stars

false
icon :string

MDI icon name for rating items

"star"
error :boolean

show error state

false
errors :list

list of error messages to display

[]
helper :string

helper text displayed below the component

class :any

additional CSS classes

group_label :string

Accessible label for the rating group. Use {value} and {max} (i18n)

"Rating: {value} out of {max}"
item_label :string

Accessible label template for each star button. Use {index} and {max} (i18n)

"Rate {index} out of {max}"
rest :global