-
Notifications
You must be signed in to change notification settings - Fork 771
Open
Labels
area-ToggleSwitchfeature proposalNew feature proposalNew feature proposalteam-ControlsIssue for the Controls teamIssue for the Controls team
Description
Proposal: Add alternate label placement to ToggleSwitch
Summary
Apps are interested in a left-positioned on/off label on the ToggleSwitch instead of it appearing on the right. We're thinking of adding additional API to support the choice between a left or right positioned on/off label. However, we would like to hear from the community on whether this would be taken advantage of in your apps or if the proposed approach can be improved upon.
Current ToggleSwitch on/off label position
Additional ToggleSwitch on/off label position
Rationale
- If a popular pattern, a built in API to switch between the two modes would increase consistency of exact recommended position
Scope
Capability | Priority |
---|---|
A on/off label can appear to the left of the switch itself (in LTR languages) without re-templating or re-styling the ToggleSwitch | Must |
Implementation exploration
An on/off content positioning boolean
<ToggleSwitch IsOnOffContentPositionOpposite="true" />
// In RTL languages, the OnOffContent is by default to the left of the ToggleSwitch. Setting this to true would mean the OnOffContent would appear to the right of the ToggleSwitch and the header label would still be right-aligned.
An on/off position property with new enum
<ToggleSwitch OnOffContentPosition="Left" />
enum ToggleSwitchOnOffContentPosition
{
Right, // default
Left,
}
Open Questions
- Are you changing the location of the on/off label in a ToggleSwitch currently?
- Is there a use to add more positions than merely left or right?
mdtauk, niels9001, chigy, jp-weber, codingdna2 and 11 morePoopooracoocoo
Metadata
Metadata
Assignees
Labels
area-ToggleSwitchfeature proposalNew feature proposalNew feature proposalteam-ControlsIssue for the Controls teamIssue for the Controls team