Skip to content

zk-rating ​

A read-only rating drawn with stars.

Props ​

PropTypeDefaultDescription
valueint|float0Value; half a star is shown from .5
maxint5Number of stars
labelstring|nullnullAccessible name, by default value / max
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

The stars are decorative (aria-hidden): the root is role="img" with the accessible name. Each star has data-state (full, half or empty). To let the user choose a rating, use zk-rating-input. No JavaScript.

Examples ​

Basic ​

blade
<x-zk-rating :value="3.5" />

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