active
Type
booleanLeave Yamada UI a star
StarSwitch is a component used to toggle between on and off states.
Type
booleanType
booleanType
booleanType
booleanDeprecated
Use active instead.
Type
booleanDeprecated
Use checked instead.
Type
booleanDeprecated
Use focused instead.
Type
booleanDeprecated
Use hovered instead.
Type
booleanDescription
If true, the checkbox will be checked.
Type
booleanDefault
falseDescription
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
"primary"Description
If true, the checkbox will be initially checked.
Type
booleanDefault
falseDescription
If true, the checkbox will be initially checked.
Deprecated
Use defaultChecked instead.
Type
booleanDefault
falseDescription
If true, the form control will be disabled.
Type
booleanDefault
falseDescription
The switch icon to use.
Type
ReactElement<SwitchIconProps,
string | JSXElementConstructor<any>>Description
id assigned to input.
Type
stringDescription
If true, the checkbox will be indeterminate.
Type
booleanDefault
falseDescription
Props for switch input element.
Type
InputHTMLAttributes<HTMLInputElement>Description
If true, the form control will be invalid.
Type
booleanDefault
falseDescription
If true, the checkbox will be checked.
Deprecated
Use checked instead.
Type
booleanDefault
falseDescription
If true, the form control will be disabled.
Deprecated
Use disabled instead.
Type
booleanDefault
falseDescription
If true, the form control will be invalid.
Deprecated
Use invalid instead.
Type
booleanDefault
falseDescription
If true, the form control will be readonly.
Deprecated
Use readOnly instead.
Type
booleanDefault
falseDescription
If true, the form control will be required.
Deprecated
Use required instead.
Type
booleanDefault
falseDescription
Change switch label from right to left.
Deprecated
Use reverse instead.
Type
booleanDefault
falseDescription
Props for switch label element.
Type
HTMLUIProps<"span">Description
The HTML name attribute used for forms.
Type
stringDescription
The callback invoked when the checkbox is blurred.
Type
FocusEventHandler<HTMLInputElement>Description
The callback invoked when the checked state changes.
Type
ChangeEventHandler<HTMLInputElement>Description
The callback invoked when the checkbox is focused.
Type
FocusEventHandler<HTMLInputElement>Description
If true, the form control will be readonly.
Type
booleanDefault
falseDescription
If true, the form control will be required.
Type
booleanDefault
falseDescription
Change switch label from right to left.
Type
booleanDefault
falseDescription
If true, the checkbox will be selected when the Enter key is pressed.
Type
booleanDefault
falseDescription
The size of the Switch.
Type
"sm" | "md" | "lg"Default
"md"Description
The tab-index property of the underlying input element.
Type
numberDescription
Motion transition settings.
Type
TransitionDescription
The value to be used in the checkbox input.
Type
stringDescription
The variant of the Switch.
Type
"thin" | "thick"Default
"thick"Edit this page on GitHub