Rebar UI

1.0

imitation

Rate

A star rating input.

Interview ratingClick a star or use the arrow keys

3 / 5

Unrated
Disabled
Ten stars

In context

Interview debriefPriya scores call 11 before she files the notes
PNCrew interview 1121 Oct, 11:30

How useful was this conversation?

Props

PropTypeRequiredDefault
valuenumber | undefinedNo—
defaultValuenumber | undefinedNo0
countnumber | undefinedNo5
disabledboolean | undefinedNo—
onChange((value: number) => void) | undefinedNo—
aria-labelstring | undefinedNoRating
classNamestring | undefinedNo—

Accessibility

role="radiogroup" over real role="radio" buttons, one per star, each labeled "N stars" — Left/Down decreases, Right/Up increases, matching the standard radio-group keyboard pattern. Only the checked (or first) star sits in the Tab order; the rest are reached via arrow keys, not Tab, same as any other radio group.

data-rebar-* attributes

data-rebar-component="rate", data-rebar-part="star" on each star.

Migrating to Ant Design

AntD's Rate has the same value/defaultValue/count/disabled/onChange shape, plus an allowHalf option this component doesn't support yet (a real, stated scope limitation, not an oversight — half-star hit-testing is real added complexity deferred for now). Not yet codemod-covered.