jupyter-widgets / ipywidgets

Interactive Widgets for the Jupyter Notebook
https://ipywidgets.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.1k stars 946 forks source link

vertical Tabs #1306

Open disimone opened 7 years ago

disimone commented 7 years ago

Dear all,

first of all, thanks for providing these widgets.

I was wondering is there is a way to get the tabs of the Tab widget to be placed vertically. I mean that the whole tab bar should be rotated by 180 degrees, including text. My use-case is that I would like to nest two Tab widgets, and I think the navigation would be a lot easier if the tabs from the two levels were also clearly distinct.

Thanks for your help,

Andrea.

jasongrout commented 7 years ago

Great idea. It's possible to augment the code to do this - JupyterLab already has vertical tabs. We'd just need to figure out how it works over there and copy the changes over to our code.

disimone commented 7 years ago

Hi Jason,

thanks for your reply.

Since this needs to be implemented, I'll add another small request: in addition to vertical/horizontal, it would be great to be able to choose the tab position wrt the contents: top/bottom (or left/right for vertical tabs)

jasongrout commented 7 years ago

Thanks. If you'd like to do this, I can help you get started on a pull request.

jasongrout commented 7 years ago

Also note that you might be able to use the accordion widget as a differentiating container.

disimone commented 7 years ago

Hi Jason,

good point, the accordion is a nice alternative. As far as implementing the widget myself, I have unfortunately no experience at all with javascript, so if that is a prerequisite, I am afraid I can't be of anz help.

info-rchitect commented 3 years ago

Any update on this?

jasongrout commented 3 years ago

No update that I know of. If someone is willing to work on this, please post here.

jamiecook commented 3 years ago

I think that Google's Colab spaces have support for this use case. Their UI controller is called a TabBar

image