IPropertyPaneToggleProps interface
PropertyPaneToggle component props.
Properties
| aria |
Optional ariaLabel flag. Text for screen-reader to announce regardless of toggle state. |
| checked | Checked state of the toggle. If you are maintaining state yourself, set this property accordingly. |
| disabled | Disabled state of the toggle. |
| inline |
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. |
| off |
Optional offAriaLabel flag. Text for screen-reader to announce when toggle is OFF. |
| off |
Test display when toggle is OFF. |
| on |
Optional onAriaLabel flag. Text for screen-reader to announce when toggle is ON. |
| on |
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. If you are maintaining state yourself, set this property accordingly.
checked?: boolean;
Property Value
boolean
disabled
Disabled state of the toggle.
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