IPropertyPaneToggleProps interface

PropertyPaneToggle component props.

Properties

ariaLabel

Optional ariaLabel flag. Text for screen-reader to announce regardless of toggle state.

checked

Checked state of the toggle.

disabled

Optional disabled flag.

inlineLabel

Whether the label (not the onText/offText) should be positioned inline with the toggle control. Left (right in RTL) side when on/off text provided VS right (left in RTL) side when no on/off text. Caution: when not providing on/off text user may get confused in differentiating the on/off states of the toggle.

key

A key to uniquely identify the field.

label

A label for the toggle.

offAriaLabel

Optional offAriaLabel flag. Text for screen-reader to announce when toggle is OFF.

offText

Test display when toggle is OFF.

onAriaLabel

Optional onAriaLabel flag. Text for screen-reader to announce when toggle is ON.

onText

Text to display when toggle is ON.

Property Details

ariaLabel

Optional ariaLabel flag. Text for screen-reader to announce regardless of toggle state.

ariaLabel?: string;

Property Value

string

checked

Checked state of the toggle.

checked?: boolean;

Property Value

boolean

Remarks

If you are maintaining state yourself, use this property.

disabled

Optional disabled flag.

disabled?: boolean;

Property Value

boolean

inlineLabel

Whether the label (not the onText/offText) should be positioned inline with the toggle control. Left (right in RTL) side when on/off text provided VS right (left in RTL) side when no on/off text. Caution: when not providing on/off text user may get confused in differentiating the on/off states of the toggle.

inlineLabel?: boolean;

Property Value

boolean

key

A key to uniquely identify the field.

key?: string | number;

Property Value

string | number

label

A label for the toggle.

label?: string;

Property Value

string

offAriaLabel

Optional offAriaLabel flag. Text for screen-reader to announce when toggle is OFF.

offAriaLabel?: string;

Property Value

string

offText

Test display when toggle is OFF.

offText?: string;

Property Value

string

onAriaLabel

Optional onAriaLabel flag. Text for screen-reader to announce when toggle is ON.

onAriaLabel?: string;

Property Value

string

onText

Text to display when toggle is ON.

onText?: string;

Property Value

string