Using HTML, this simple notification badge and counter can be written into a template column and displayed through a rich text component. This allows you to dynamically show the number of unread chats for your users. Note that your counter data must be in the user table and contain the number of unread chats, or be empty if all chats are read. To show or hide (empty) the badge, you need to add the class name “notifBubble” to the rich text component and use the following Html & CSS code:
Adding CSS to add a static notification badge to Glide’s navigation buttons, whether in the tab-bar (mobile), top-bar, or side-bar. To ensure the notification on these buttons remains visible regardless of the active screen, you can add a spacer component or similar and give it the class name “show-counter” on each screen. Don’t forget to set its visibility to “show component when Counter is not empty.”
The richtext function along with this HTML code is only presented as a button on screens where it is needed. Therefore, the HTML code and related counter data are all placed in the user table. I have been doing it this way so that I can present more than one button on different screens, including different roles in the actions added to the component.
The use of spacers is only necessary for displaying notification badges on Glide navigation buttons. So these two components are two different things. If you have richtext buttons on all screens, you do not need to add a spacer component and can directly refer to the CSS code at :has(#counter-text:empty).
Need help! This is an awesome feature, so thank you for taking the time to put this here for us to use!
My question though, is I have a Rich Text component pulling in the template with your HTML, as well as the CSS for the side navigation. Gave the Rich Text the proper class, and added the spacer with the proper class.
For some reason though, I can’t seem to get the badge to move from this location. I’m trying to have it next to the “New Candidates” tab, but so far I can’t figure it out. Any suggestions?
Make sure your image URL can be opened in a browser, I tried it and it couldn’t appear.
Apart from that, you have to turn off the Use Compiled CSS button and turn on the Preview CSS button to be able to see it in the builder.
For Button Block, use a method like the nav-bar notification above with a class that you customize for your button, for example [aria-label=“Reviews”].