Components
Rate

Rate

Import

import { VKRate } from "@vivakits/react-components";

Star

The number of stars can be specified by the star prop. Defaults to 5.

Allow Clear

The allowClear prop specifies whether to allow clear when clicked again. Defaults to true.

Allow Half

The allowHalf prop specifies whether to allow semi selection. Defaults to true.

Disabled

The disabled prop specifies whether the rate is read-only and unable to interact. Defaults to false.

onChange

The onChange prop specifies the callback when the select value changes.

Value

The value prop specifies the current value.

defaultValue

The defaultValue prop specifies the default value. Defaults to 4.

Character

The character prop specifies the custom character of the rate. Defaults to .

🌟🌟🌟🌟🌟

className

The className prop specifies the custom class name of the rate.

filledColor

The filledColor prop specifies the custom color when filled. Defaults to yellow.

emptyColor

The emptyColor prop specifies the custom color when empty. Defaults to gray.

API Reference

AttributeTypeDescriptionDefault
starnumberStar couunt5
allowClearbooleanWhether to allow clear when click againtrue
allowHalfbooleanWhether to allow semi selectiontrue
disabledbooleanIf read only, unable to interactfalse
onChangefunctionCallback when select value-
valuenumberThe current value-
defaultValuenumberThe default value4
characterReactNodeThe custom character of rate
classNamestringThe custom class name of rate-
filledColorstringCustom color when filledyellow
emptyColorstringCustom color when emptygray