Toggle

For quickly switching between two possible states.


defaultToggled
disabled
toggled
onChange
required

Props

NameTypeDefaultDescription

defaultToggled

boolean

false

Display the toggle as checked by default.

disabled

boolean

false

Marks the toggle as disabled and disallows user input.

helpText

string

Placed below the label to provide assistance on how to fill out a field or the expected format. It can also provide an explanation of why the information is needed and how it will be used.

labelText

string

Informs users what the corresponding input field is for.

offText

string

false

A label for the toggle's off state.

onText

string

false

A label for the toggle's on state.

toggled

boolean

The value of the toggle when using as a controlled component.

onChange

function

Function that triggers when toggle is clicked, use with the toggled prop for a controlled component.

required

boolean

false

Makes the field require input before the form will submit.

requirementText

string

(Optional) or (Required).

id

string

A unique ID for this input.

className

string

Class name.

Related Components


The Nulogy Design System is maintained by the Design Ops team. Our mission is to help our teams build better interfaces faster. 🚀

Please reach out with any questions or requests.