StratoDem / sd-material-ui

material-ui components for Dash
MIT License
194 stars 27 forks source link

Bottom Navigation icon #931

Open CChisuwo opened 2 years ago

CChisuwo commented 2 years ago

I am trying to implement a bottom navigation for a mobile first dash web app. I am however unable to add icons to each of the navigation items even after adding an icon="css_icon_pack_name" to the navitem dict. Any advice would be very helpful thanks

coralvanda commented 2 years ago

The icon prop won't accept a pack name, it needs to have a string for a particular icon, and each item can have a different icon that way. Basic example:

navItems=[
            dict(label='test 1', value='val1', icon='1'),
            dict(label='test 2', value='val2', icon='2'),
]),