Interface ToggleSwitchProps

interface ToggleSwitchProps {
    defaultChecked?: boolean;
    description?: string;
    disabled?: boolean;
    label: string;
    name?: string;
    onChange?: (value: boolean) => void;
    title?: string;
    value?: boolean;
}

Properties

defaultChecked?: boolean
description?: string

Maximum two lines of text.

disabled?: boolean
label: string
name?: string
onChange?: (value: boolean) => void
title?: string

HTML title attribute

value?: boolean

value and onChange are optional because we want to be able to use the control in an uncontrolled manner as well (for example, in forms)