-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Add pure css button (group) toggle #25185
Conversation
That's likely a deal breaker on this being in v4 as an update to the existing button group. We'd have to deprecate the existing one and provide this as a new component. Breaking changes are a no-go heading into stable v4.0. |
I added .btn-group-input { ... } to .btn-group > input[type="radio"],
.btn-group > input[type="checkbox"] { ... } <div class="btn-group">
<input type="checkbox" id="checkbox1">
<label class="btn btn-primary" for="checkbox1">Single toggle</label>
</div> |
i'd like to see this addressed in 4.1 perhaps though. toggle groups are extremely brittle due to their reliance on JS which makes them easily go out of sync with things like keyboard behavior, autofill behavior, etc |
x-ref: #25281 |
I like this, but maybe we better move this to v5? Otherwise we'll have 2 implementations of the same component. @mdo, what do you think? |
Superseded by #28463. |
This PR add pure CSS toggle button.
The button plugin will be no longer need, but this allows available both JS and pure css.
Button Plugin:
Pure CSS (Required new
.btn-group-input
class):Demo: https://codepen.io/fellows3/pen/bQydEm
Fixes #25122
Fixes #27600