Semantic-UI: Sidebar with Icons always visible

馋奶兔 提交于 2019-12-24 03:29:52

问题


I'd like to implement a sidebar, where each entry will have an Icon along to it's text.

In deactivated state, the sidebar shall display only the icons, wheres in activated state, the sidebar shall expand to its whole width, showing its entries with both icons and text. Just like the menu button in Expanding Menu Button, but this behaviour for the whole sidebar.

Can this be done using Semantic UI?


回答1:


I have asked a similar question a while ago here, and I managed to solve it myself, by modifying some of Semantic-UI's source code.

Unfortunately, the modifications were too extensive to post them directly in this answer, so I have created a github repo with an example here. Hopefully it helps. Due to the fact that the source code from Semantic-UI was modified, normal sidebars will probably be buggy.



来源:https://stackoverflow.com/questions/31436385/semantic-ui-sidebar-with-icons-always-visible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!