ariaLabel | string | The aria-label text for the toggle. |
children | JSX.Element | React element children. |
customAttributes | object | Custom attributes for the component. |
customClasses | string | Array | object | Custom classes for the component. |
disabled | boolean | If toggle is disabled. |
externalChecked | boolean | If toggle is checked or not, can change current checked state if changed. |
externalControl | boolean | If toggle can be controlled externally. |
helpTextAttributes | object | Attributes for the help text component. |
helpTextWidth | string | Width of the help text, one of auto or full . |
icons | boolean | Do we use the checkmark and x icons for this instance. |
iconPrefix | string | The icon prefix to use for the icons. |
iconBefore | string | The icon to use when the toggle is unchecked. |
iconAfter | string | The icon to use when the toggle is checked. |
id | string | Id for the toggle, auto generated if not passed. |
initialChecked | boolean | Is it checked on render? |
labelAttributes | object | Attributes for the label component. |
labelPosition | string | Position of the label, one of left or right . |
name | string | Name for the input. |
onBlur | function | On blur function handler. |
onChange | function | On change function handler. |
onFocus | function | On focus function handler. |
size | string | Size for the toggle. Small (size-s ), medium (size-m ), or large (size-l ). |
spacing | string | number | Array | object | The spacing for the component, as a string, number, array, or object. |
theme | string | Theme for the toggle, one of primary or cosmos . |
width | string | Width for the toggle, one of auto or full . |
wrapperAttributes | object | Custom attributes for the wrapper element. |
wrapperClasses | string | Array | object | Custom classes for the wrapper element. |
wrapperTagName | object | Tag to use for the toggle wrapper. Defaults to div . |