Topic: Active button is always active inside button-group
Joachim Schneider priority asked 2 years ago
Expected behavior When I click on the 2nd button inside a button-group, the active button should become inactive.
Actual behavior The "Button1" stays active when the 2nd button is clicked.
<div class="btn-group shadow-1" role="group"> <button href="#!" class="btn btn-link active">Button1</button> <button href="#!" class="btn btn-link">Button2</button> <button href="#!" class="btn btn-link">Button3</button> </div>
Is there a an other way to pre-select a button inside a button-group?
Thanks a lot
Hello, the behaviour you described matches Radio buttons https://mdbootstrap.com/snippets/standard/m-duszak/3256739
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.9.0
- Device: Web
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No