Description
Feature Description
Provide a property or other setting to expand a slide-toggle to fill its horizontal width, so that the label is left-aligned and the switch is right-aligned (for LTR languages).
Use Case
When you have a slide-toggle with a label on the left, it's common, especially in narrow settings panels, so have the label left aligned and the switch itself right-aligned (for LTR languages). So if you have a panel with a bunch of settings, you'd have the labels all left-aligned and all the switches in the same position on the right.
This doesn't seem to be possible with mat-slide-toggle, without reliance on internal implementation details. Currently, even if the mat-slide-toggle is very wide, the label and switch will be packed to the left.
Here are a few examples of the layout I'd like to be able to achieve:
- All of the examples on https://material.io/components/switches
- https://photos.google.com/settings
- Chrome settings (e.g., chrome://settings/appearance and I think wherever else switches are used)
- Android settings, I think pretty much wherever this kind of switch is used.
- https://docs.google.com (go to settings)
- https://myaccount.google.com/contacts