Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

q-toggle color for false state (and no color for indeterminate state) #7593

Open
FragsterAt opened this issue Aug 7, 2020 · 5 comments · May be fixed by #7598
Open

q-toggle color for false state (and no color for indeterminate state) #7593

FragsterAt opened this issue Aug 7, 2020 · 5 comments · May be fixed by #7598

Comments

@FragsterAt
Copy link

FragsterAt commented Aug 7, 2020

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

@FragsterAt FragsterAt changed the title q-toggle equal color for both states (and no color fot indeterminate state) q-toggle equal color for both states (and no color for indeterminate state) Aug 7, 2020
@FragsterAt FragsterAt changed the title q-toggle equal color for both states (and no color for indeterminate state) q-toggle color for false state (and no color for indeterminate state) Aug 10, 2020
@IlCallo
Copy link
Member

IlCallo commented Aug 11, 2020

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 :)

@FragsterAt
Copy link
Author

@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.

@IlCallo
Copy link
Member

IlCallo commented Aug 14, 2020

True that, do you have examples from other UI libraries?

@pdanpdan
Copy link
Collaborator

cross reference:
#7593
#7004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants