Park UI

Rating Group

A form input component for capturing user ratings and reviews.

Installation

Usage

Shortcuts

The RatingGroup component also provides a set of shortcuts for common use cases.

RatingControl

This component renders the number of rating items specified in the count prop.

This works:

This might be more concise, if you don't need to customize the rating icons:

Examples

Sizes

Use the size prop to change the size of the rating component.

Controlled

Use the value and onValueChange prop to control the rating value.

ReadOnly

Use the readOnly prop to make the rating component read-only.

Custom Icon

Use the icon prop to pass a custom icon to the rating component. This will override the default star icon.

Label

Render the RatingGroup.Label component to provide a human-readable label for the rating component.

Half Star

Use the allowHalf prop to allow half-star ratings.

Colors

Use the colorPalette prop to change the color of the rating.

Closed Component

Here's how to setup the Rating for a closed component composition.

So that you can use it like this:

Props

Root

Item