You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to style a Switch with the same classes but in the OFF position (switch button on the left), in combination with the default behaviour for styling the ON position? By default, switch = off is always grayed out.
I would like to have a switch in different colors, whether it's on the "off" or "on" position – image it to be more like an A/B chooser, instead of an ON/OFF switch.
Thanks for any hints on this,
Oliver
The text was updated successfully, but these errors were encountered:
The default styles are inspired by iOS switches, where they're plain white/gray by default and turn a color when activated.
I'd suggest adding a modifier class to customize your own. You can use the base switch class to start, then override it with your modifier class (e.g. switch-colored).
This is regarding the Switches span: https://shoelace.style/docs/switches.html
Is it possible to style a Switch with the same classes but in the OFF position (switch button on the left), in combination with the default behaviour for styling the ON position? By default, switch = off is always grayed out.
I would like to have a switch in different colors, whether it's on the "off" or "on" position – image it to be more like an A/B chooser, instead of an ON/OFF switch.
Thanks for any hints on this,
Oliver
The text was updated successfully, but these errors were encountered: