Hi folks, I have rescued custom-sidebar-v2 plugin and brought again to live because since a while I want to use it in one of my kiosk devices but it is not longer maintained and the repository is archived.
I am plannig to keep it alive and up to date with any Home Assistant front-end update.
Very nice!!!
Exactly what I was looking for after seeing other 2 repos that were not updated for a whileā¦
Thank for this sidebar custom shizzle plugin v3!!
Check all the options in the documentation, all the possibilities are documented there. But just some things (among others) that you can achieve with this custom plugin and it is not possible natively:
The changes are stored in a config file so if you logout and login again, they donāt get lost. The same applies to different devices, every time that you log-in in a device the configuration that match with your username is taken from the stored config.
You can change the icon or rename the sidebar items
You can move items to the bottom group of the sidebar
You can dynamically add notifications to the items in the sidebar (for example, display the number of HACS updates as a notification in the HACS sidebar item)
You can use JavaScript/Jinja templates in some of the elements
But as it is stated in the last section of the documentation, if you donāt need anything of this, it is probably that the built-in sidebar configuration options are enough for you.
Read the message that I left before or consult the documentation. Custom-sidebar is not only to hide and reorder the sidebar items for the current user and the current session (as the built-in functionality) so the built-in functionality is not another option to achieve what this plugin achieves.
But as it is stated in the same plugin documentation, maybe for some users the built-in functionality, together with the built-in panel_custom and the panel_iframe features, is enough for their use cases.
The styles option should do the job if you want to add those margins/paddings, just post your code and I can guide you how to do it.
About the collapsible menu, at the moment it is not possible with this plugin. There was a proposal to implement it into Home Assistant but it was not merged. There is also this feature request that has not received much attention.
The styles are added automatically to the shadowRoot of the sidebar, you only need to specify the items, and it is better that you set the styles in the paper-icon-item element not in the a one. Try with this instead:
Instead of trying to get the item by its index, try to get it by its data-panel, the previous example tries to get the Logbook item, change it to the item that you want.