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