Skip to content

Checkbox

Checkbox selection input type
name
type
default
description
background
"grey" | "white"
-
Set the background color for regular variant.
checked
boolean
-
The checked attribute of input element
colorStyle
"accent" | "blue" | "green" | "yellow" | "red" | "orange" | "indigo" | "pink" | "purple" | "grey" | "accentPrimary" | "accentSecondary" | "bluePrimary" | "blueSecondary" | "greenPrimary" | "greenSecondary" | "yellowPrimary" | "yellowSecondary" | "redPrimary" | "redSecondary" | "orangePrimary" | "orangeSecondary" | "indigoPrimary" | "indigoSecondary" | "pinkPrimary" | "pinkSecondary" | "purplePrimary" | "purpleSecondary" | "greyPrimary" | "greySecondary"
accentPrimary
-
defaultChecked
boolean
-
The initial value for checked of input element
defaultValue
string | number
-
The initial value of the input element
description
ReactNode
-
Description text or react component.
disabled
boolean
-
The disabled attribute of input element
error
ReactNode
-
Error text or a react component.
hideLabel
boolean
-
If true, hides the label and secondary label.
id
string
-
The id attribute of input element.
inline
boolean
true
If true, moves the label and status messages to the right of the content.
label *
Required
ReactNode
-
Label content Label text or react component
name
string
-
The name attribute of input element.
tabIndex
number
-
The tabindex attribute for input element.
value
string | number
-
The value attribute of input element.
onChange
ChangeEventHandler<HTMLInputElement>
-
The handler for change events.
onFocus
FocusEventHandler<HTMLInputElement>
-
The handler for focus events.
onBlur
FocusEventHandler<HTMLInputElement>
-
The handler for blur events.
labelSecondary
ReactNode
-
Secondary text or react component
readOnly
boolean
-
Set the input to readonly mode If true, will set the Fields component to read only mode
ref
null | string | (instance: HTMLInputElement | null) => void | RefObject<HTMLInputElement>
-
Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}
required
boolean
-
Adds mark to label
reverse
boolean
-
Have label appear on the left of the form element.
width
"max" | "min" | "0" | "auto" | "px" | "0.25" | "0.5" | "0.75" | "1" | "1.25" | "1.5" | "1.75" | "2" | "2.5" | "3" | "3.5" | "4" | "4.5" | "5" | "5.5" | "6" | "6.5" | "7" | "7.5" | "8" | "8.5" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "18" | "20" | "22.5" | "24" | "26" | "28" | "30" | "32" | "36" | "40" | "44" | "45" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "112" | "128" | "144" | "168" | "192" | "224" | "256" | "288" | "320" | "1/4" | "1/3" | "1/2" | "2/3" | "3/4" | "full" | "fit" | "viewHeight" | "viewWidth" | "none" | "dialogMobileWidth" | "dialogDesktopWidth" | "-1.5" | "-4" | "-6"
-
A tokens space key value setting the width of the parent element.
Primary Colors
Secondary Colors
v1.0