Skip to main content

Checkbox

Checkbox is a form control for selecting one or more options, like accepting terms or choosing notification preferences. It can show helper text and a mixed state, and people click or tap the box or its label to toggle it.

Import

import { Checkbox } from '@vortexlabs/vortex';
import type { CheckboxProps } from '@vortexlabs/vortex';

Other links

Checkbox

Checkbox props
PropTypeDefaultAttributes
name
string
No default value
disabled
boolean
No default value
error
boolean
No default value
value
string
No default value
indeterminate
boolean
No default value
size
union
md
stretched
boolean
No default value
onChange
callback
No default value
onFocus
callback
No default value
onBlur
callback
No default value
className
union
No default value
attributes
object
No default value
inputAttributes
object
No default value
label
React.ReactNode
No default value
helperText
React.ReactNode
No default value
ariaLabel
string
No default value
checked
boolean
No default value
defaultChecked
boolean
No default value
ref
ref
No default value

Checkbox.Item

Checkbox.Item props
PropTypeDefaultAttributes
value
string
No default value
label
React.ReactNode
No default value
helperText
React.ReactNode
No default value
ariaLabel
string
No default value
disabled
boolean
No default value
error
boolean
No default value
indeterminate
boolean
No default value
size
union
md
stretched
boolean
No default value
onChange
callback
No default value
onFocus
callback
No default value
onBlur
callback
No default value
className
union
No default value
attributes
object
No default value
inputAttributes
object
No default value
ref
ref
No default value

Checkbox.Group

Checkbox.Group props
PropTypeDefaultAttributes
name
string
No default value
children
React.ReactNode
No default value
value
string[]
No default value
defaultValue
string[]
No default value
onChange
callback
No default value
ariaLabel
string
No default value
disabled
boolean
No default value
error
boolean
No default value
id
string
No default value
className
union
No default value
attributes
object
No default value

Checkbox.GroupLabel

Checkbox.GroupLabel props
PropTypeDefaultAttributes
children
React.ReactNode
No default value
className
union
No default value
attributes
object
No default value

Checkbox.GroupDescription

Checkbox.GroupDescription props
PropTypeDefaultAttributes
children
React.ReactNode
No default value
className
union
No default value
attributes
object
No default value