Simplify vertical ui.toggle() for vertical menus #5540
whoamiafterall
started this conversation in
Ideas / Feature Requests
Replies: 1 comment 2 replies
-
|
Thanks for sharing this idea, @whoamiafterall! Here is an example of your proposed solution ("wrap" doesn't seem to be necessary): ui.toggle(['Amazon', 'Bing', 'Google'])
ui.toggle(['Amazon', 'Bing', 'Google']).classes('column')
But if you look closely, the result isn't 100% correct. The left corners of the selected "Amazon" button are rounded - as they should for horizontal toggle buttons. Therefore I think the implementation would be quite a bit more complicated and might fail in combination with props like "outline", "rounded", "dense" etc. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking for a way to have a vertical menu recently without using ui.tabs(), so i figured i could use a toggle.
However there is no documentation neither on nicegui's nor on quasar's side on how to do this vertically (e.g. in a sidebar, or a dropdown). I even asked AI and it told me to use some custom css :D
Anyhow - i literally just had to set:
It took me like 20min including some browser inspecting to figure that out, so i thought you may be willing to just add a keyword argument to switch that up, like this:
I think having this would probably be nice for quite some of the ui elements, not just this one.
However, i respect if you think that this is out of scope.
Adding it to the docs would be nice(gui) then anyway.
If you feel like adding this sidebar-menu approach to the examples, here's my code:
Infra-United/inventurgui@6dcace2#diff-31fb021d8d7b5ccfa01bbb378f72b509f21b27d95523ed2a1914a5688a46cb0b
Thanks for your great work so far!
Beta Was this translation helpful? Give feedback.
All reactions