<kern-rating>
Star rating 1–max, form-associated (value 0 = not rated). A radio group with one tab stop: arrow keys change the rating, Home/End jump, with clearable 0/Backspace or a click on the current star clears it. Hovering previews. readonly only shows the rating („4 von 5 Sternen“).
Examples
Star rating
A radio group with one tab stop: arrow keys change the rating, Home/End jump. With clearable, 0, Backspace or a click on the current star clears it (value 0 = not rated). Hovering previews.
Read-only and required
readonly only shows the rating, e.g. in a card or table. required blocks submitting while the value is 0; disabled stops interaction.
Properties
ariaLabelTextstring | undefined
Accessible name when there is no visible label.
clearableboolean
Allows going back to 0 (not rated).
disabledboolean
errorstring | undefined
hintstring | undefined
labelstring | undefined
labelValuestring | undefined
Name of each star and the read-only rating; {n} and {max} are replaced.
maxnumber
Number of stars.
namestring | undefined
readonlyboolean
Display only, no interaction.
requiredboolean
size"md" | "sm"
valuenumber
Number of filled stars, 0 = not rated.
Events
kernChangeCustomEvent<{ value: number; }>
When the rating changes.
Methods
setFocus()setFocus() => Promise<void>
Focuses the selected star (or the first).
CSS parts
starEach star