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

Toggle buttons #887

Open
hakenr opened this issue Sep 23, 2024 · 2 comments · May be fixed by #879
Open

Toggle buttons #887

hakenr opened this issue Sep 23, 2024 · 2 comments · May be fixed by #879
Assignees
Labels
gap Something raw Bootstrap has and we don't

Comments

@hakenr
Copy link
Member

hakenr commented Sep 23, 2024

There is a Bootstrap feature we haven't covered: https://getbootstrap.com/docs/5.3/forms/checks-radios/#toggle-buttons
There is a pull request #879 from @mmonteagudo that proposes an implementation.

There are still questions to resolve:

  1. How does this coexist with Switches, which we implemented using the widely-used HxSwitch component (derived from HxCheckbox)? Should the toggle-button be another derivative of HxCheckbox, or are checkbox/switch/toggle-button variants of the basic HxCheckbox component that should be selectable via a Variant=CheckboxVariant.Regular|Switch|ToggleButton parameter? The enum-based variant would likely allow us to configure HxCheckboxList to handle rendering with a single parameter.

  2. How do we handle the optional button group?

  3. There are also Button plugin on/off buttons with similar behavior. Should we consider these as a separate feature that doesn't affect our check/radio boxes implementation, or is there potential overlap (e.g., HxCheckboxVariant.ButtonPlugin)?

@hakenr hakenr added the gap Something raw Bootstrap has and we don't label Sep 23, 2024
@hakenr hakenr self-assigned this Sep 23, 2024
@hakenr hakenr added this to the Priority 2 - Normal milestone Sep 23, 2024
@crdo
Copy link
Member

crdo commented Sep 24, 2024

@hakenr it actually is there, but the implementation or use is somehow awkward as it requires use of pure Blazor InputCheckbox with HxButtonGroup.

It is also well hidden in the docs.

https://havit.blazor.eu/components/HxButtonGroup#checkboxes-and-radios

@mmonteagudo
Copy link
Contributor

Yes, the intention here is to add the feature in the very handy CheckboxList and RadiobuttonList components for ease of use. I'm already using it in our application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gap Something raw Bootstrap has and we don't
Projects
None yet
3 participants