Leave Yamada UI a star

Star
Yamada UIYamada UIv1.6.4

Rating

Rating is a component used to allow users to provide ratings.

Source@yamada-ui/rating

Props

RatingProps

color

Description

The color of the filled icons.

Type

((value: number) => UIValue<"border" | Color | ({} & string) | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | ... 320 more ... | "yellow.950"> | undefined) | UIValue<...>

colorScheme

Description

The visual color appearance of the component.

Type

"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"

Default

"yellow"

defaultValue

Description

The initial value of the rating.

Type

number

Default

0

emptyIcon

Description

The empty icon for the rating.

Type

type ONLY_FOR_FORMAT = | string | number | boolean | ((value: number) => ReactNode) | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

filledIcon

Description

The filled icon for the rating.

Type

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | ((value: number) => ReactNode)

fractions

Description

Number of fractions each item can be divided into,

Type

number

Default

1

groupProps

Description

Props for the rating group.

Type

GroupProps

highlightSelectedOnly

Description

If true, only the selected icons will be filled.

Type

boolean

Default

false

id

Description

The top-level id string that will be applied to the rating. The index of the rating item will be appended to this top-level id.

Type

string

inputProps

Description

Props for the input element.

Type

InputProps

isDisabled

Description

If true, the form control will be disabled.

Type

boolean

Default

false

isInvalid

Description

If true, the form control will be invalid.

Type

boolean

Default

false

isReadOnly

Description

If true, the form control will be readonly.

Type

boolean

Default

false

isRequired

Description

If true, the form control will be required.

Type

boolean

Default

false

itemProps

Description

Props for the rating item.

Type

ItemProps

items

Description

Number of controls that should be rendered.

Type

number

Default

5

name

Description

The name of the input element.

Type

string

onChange

Description

The callback invoked when value state changes.

Type

(value: number) => void

onHover

Description

The callback invoked when hovering over the rating.

Type

(value: number) => void

size

Description

The size of the Rating.

Type

"xs" | "sm" | "md" | "lg" | "xl"

Default

"md"

value

Description

The value of the rating.

Type

number

variant

Description

The variant of the Rating.

Type

string

Edit this page on GitHub

PreviousEditableNextSegmentedControl