Skip to content

zk-rating-input ​

A rating the user chooses, a group of radio buttons with stars.

Props ​

PropTypeDefaultDescription
namestringrequiredName of the field
valueint|nullnullCurrent value (the old input wins)
maxint5Number of stars
legendstring|nullnullText of the legend
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Real radio buttons: it works in a form with no script and with the keyboard. Hide the inputs and light the stars with input:checked ~ span in your style; the text for assistive technology is in .visually-hidden. No JavaScript.

Examples ​

Review ​

blade
<x-zk-rating-input name="stars" legend="Your rating" :value="4" />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.