SubComponents

Control

The control subcomponent is required to render the Control of the Switch component. Because of this, this component extends the native input[type='checkbox']component props. Because of this, you can use all of the native props. This is a required children.

Control API

Props
Type
Required

defaultChecked

boolean

checked

boolean

isDisabled

boolean

defaultChecked

This prop is used when using and uncontrolled approach of the component, passing a defaultValue to set the initial state.

checked

Prop that controls the checked state of the component.

HelpText

The HelpText subcomponent extends the SDS HelpText component. See for reference: HelpText

Label

The Label subcomponent extends the SDS label component. See for reference: Label

Last updated