Yamada UIにスターをあげる

スター
Yamada UIYamada UIv1.5.1

Rating

Ratingは、ユーザーが評価を行うために使用させるコンポーネントです。

ソース@yamada-ui/rating

Props

RatingProps

color

説明

The color of the filled icons.

タイプ

UIValue<"border" | "link" | Color | "current" | "focus" | "whiteAlpha.50" | "whiteAlpha.100" | "whiteAlpha.200" | "whiteAlpha.300" | "whiteAlpha.400" | "whiteAlpha.500" | ... 319 more ... | "link.950"> | ((value: number) => UIValue<...> | undefined)

colorScheme

説明

The visual color appearance of the component.

タイプ

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

デフォルト

yellow

defaultValue

説明

The initial value of the rating.

タイプ

number

デフォルト

0

emptyIcon

説明

The empty icon for the rating.

タイプ

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

filledIcon

説明

The filled icon for the rating.

タイプ

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

fractions

説明

Number of fractions each item can be divided into,

タイプ

number

デフォルト

1

groupProps

説明

Props for the rating group.

タイプ

GroupProps

highlightSelectedOnly

説明

If true, only the selected icons will be filled.

タイプ

boolean

デフォルト

false

id

説明

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.

タイプ

string

inputProps

説明

Props for the input element.

タイプ

InputProps

isDisabled

説明

If true, the form control will be disabled.

タイプ

boolean

デフォルト

false

isInvalid

説明

If true, the form control will be invalid.

タイプ

boolean

デフォルト

false

isReadOnly

説明

If true, the form control will be readonly.

タイプ

boolean

デフォルト

false

isRequired

説明

If true, the form control will be required.

タイプ

boolean

デフォルト

false

itemProps

説明

Props for the rating item.

タイプ

ItemProps

items

説明

Number of controls that should be rendered.

タイプ

number

デフォルト

5

name

説明

The name of the input element.

タイプ

string

onChange

説明

The callback invoked when value state changes.

タイプ

(value: number) => void

onHover

説明

The callback invoked when hovering over the rating.

タイプ

(value: number) => void

size

説明

The size of the Rating.

タイプ

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

デフォルト

md

value

説明

The value of the rating.

タイプ

number

variant

説明

The variant of the Rating.

タイプ

string

GitHubでこのページを編集する

EditableSegmentedControl