Open FragsterAt opened 4 years ago
Hi @FragsterAt, we follow material design guidelines and the behaviour you ask isn't what toggles are made for. You should probably use QRadio/QOptionGroup component for a selection between 2 "truthy" values.
I checked around and seems like all other frameworks agree on this, so we probably won't accept your PR.
Will leave open in case @rstoenescu wants to weight in confirming/contradicting what I wrote.
As rejecting a PR isn't nice either for Quasar team and the PR maker, please follow the PR guidelines next time and wait the green light before sending a PR. We love to have an actively involved community which help us with bugfixing and new features, but we want to avoid wasting community members time on PRs which aren't sure to be accepted :)
@IlCallo , I looked at https://material.io/develop/web/components/input-controls/switches and find options toggled-off-color($color) and others to set custom "off" color, even different colors for track, thumb in every state.
True that, do you have examples from other UI libraries?
@IlCallo there is links to custom components, where i can change false color without making changes in lib, only by my own styles (time limit for finding way to set false-color was one minute): https://github.com/euvl/vue-js-toggle-button https://mariomka.github.io/vue-checkbox-radio/ https://github.com/Keiwen/vue-enhancedCheck https://github.com/hamed-ehtesham/pretty-checkbox-vue https://github.com/juliandreas/vue-toggles https://wikiki.github.io/form/switch/ ...
ui kits: https://element.eleme.io/#/en-US/component/switch https://github.com/material-components/material-components-web/tree/master/packages/mdc-switch https://www.iviewui.com/components/switch-en ...
Is your feature request related to a problem? Please describe. I want to use q-toggle not like on-off (checkbox), but like select between two equal values Now it seems like this: https://i.imgur.com/gqvD7gl.png But I want to see it like this: https://i.imgur.com/kwogVVc.png
Describe the solution you'd like Option false-color to add color and bg for 'off' state
Describe alternatives you've considered Alternative is button-toggle, but it is not clear for users, when it is only two values
Additional context