Rating Group

Selection & Input
Local guide ↗ import { RatingGroup } from "bits-ui"

Interactive half ratings

The items snippet exposes active, partial and inactive visual states while the bound value remains numeric

Release confidence

Half-step precision is enabled.

3.5 / 5

Read-only aggregate

Readonly preserves the same accessible value model without presenting an editable control

SvelteKit adapter

Aggregate from 1,284 verified projects

4.5 average

The bound value is always a number. allowHalf changes pointer and arrow-key precision to 0.5, and each item in the root snippet reports "inactive", "active" or "partial". Use those states for the artwork rather than recomputing fill from the value. max also controls how many item records are generated.

This component follows the ARIA slider pattern: the root is the single focus stop and items are presentational. Set name to render a hidden form input containing the numeric value; required marks that input required. aria-valuetext accepts either a string or a function of the current value and maximum.