[button] toggle button with a different background-color
See original GitHub issueFeature Request
AFAICT, .ui.toggle.button.active
uses background-color: @positiveColor;
Would it be possible to choose a custom background-color?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Toggle button background color when clicked - Stack Overflow
1 - The button starts out with this color unClickedColor = #0f2e0c . However, on the very first click, the alert does not...
Read more >Toggle an Element's background color on click using JS
Toggle an Element's background color on click using JS #. To toggle an element's background color on click: Add a click event listener...
Read more >How to change the “checked” background color of toggle ...
In Bootstrap 4, the background color of the toggle switch is blue. This color can be changed by manipulating the custom-control-input class.
Read more >Switch Background Color On Toggle Click [CSS + JavaScript]
Switch Background Color On Toggle Click [CSS + JavaScript] | How To Change Background Color On Button Click | JavaScript Background ...
Read more >3 Ways To Toggle A Button On Click In Vue JS - SoftAuthor
At this stage, toggling the active class to the button will change the background color from grey to green and vice versa.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I should have been more precise in my question. The idea I had in mind was to be able to do so without theming, but with predifined CSS classes.
Something like this or similar:
<button class="ui toggle toggle-red button">my button</button>
this way, you could render 2 toggle buttons side by side with different background colors when active
Here is another workaround without extra css. Replace the classname
active
by the desired color nameSee https://jsfiddle.net/lubber/vL4he5fd/15/