Skip to main content

Routes

Routes represents an array of clickable icons that redirects to a given path. Each item in the array should contain the following configuration:

NameTypeDefaultDescription
urlstringRequired*The path to a Lovelace view. Ignored if tap_action is defined.
iconstring | JSTemplate-Material icon to display as this entry icon. Either icon or image is required.
icon_selectedstring | JSTemplate-Icon to be displayed when url matches the current browser URL
icon_colorstring | JSTemplate-Custom color for the icon of this route.
imagestring | JSTemplate-URL of an image to display as this entry icon. Either icon or image is required.
image_selectedstring | JSTemplate-Image to be displayed when url matches the current browser URL
badgeBadge-Badge configuration
labelstring | JSTemplate-Label to be displayed under the given route if show_labels is true
selectedboolean | JSTemplate-Controls whether to display this route as selected or not. If not defined, the selected status will be computed as route.url == window.location.pathname
selected_colorstring | JSTemplate-Custom color for the route when it is selected
tap_actionCustomAction-Custom tap action configuration.
hold_actionCustomAction-Custom hold action configuration.
double_tap_actionCustomAction-Custom double_tap action configuration.
popupPopup items| JSTemplate-List of routes to display in a popup menu
hiddenboolean | JSTemplate-Controls whether to render this route or not
info

url is required unless tap_action, hold_action, double_tap_action or popup is present.

info

If tap_action is defined, url is ignored.

tip

Some suggestions when using the image property:

  1. Place your custom images in the <ha-config-folder>/www directory
  2. Use images with a transparent background for best results
  3. Keep image dimensions squared for best results

Badge

Configuration to display a small badge on any of the navbar items.

navbar-card_badgesnavbar-card_badges
NameTypeDefaultDescription
showboolean | JSTemplatefalseBoolean template indicating whether to display the badge or not
colorstring | JSTemplateredBackground color of the badge
countstring | JSTemplate-Text to be displayed inside the badge
textColorstring | JSTemplate-Color for the text displayed inside the badge

For each route, a popup menu can be configured, to display a popup when clicked. This is activated using the open-popup action in either tap_action or hold_action.

navbar-card_popupnavbar-card_popup
NameTypeDefaultDescription
urlstringRequired*The path to a Lovelace view. Ignored if tap_action is defined.
iconstring | JSTemplate-Material icon to display as this entry icon.
icon_selectedstring | JSTemplate-Icon to be displayed when url matches the current browser URL
imagestring | JSTemplate-URL of an image to display as this entry icon.
image_selectedstring | JSTemplate-Image to be displayed when url matches the current browser URL
badgeBadge-Badge configuration
labelstring | JSTemplate-Label to be displayed under the given route if show_labels is true
selectedboolean | JSTemplate-Controls whether to display this item as selected or not. If not defined, the selected status will be computed as item.url == window.location.pathname
selected_colorstring | JSTemplate-Custom color for the route when it is selected
tap_actionCustomAction-Custom tap action configuration.
hold_actionCustomAction-Custom hold action configuration.
double_tap_actionCustomAction-Custom double_tap action configuration.

In addition to the default annotation, we also support using JSTemplate to define popup items. For example, you can dynamically define items based on the areas in your Home Assistant environment:

- icon: mdi:sofa-outline
icon_selected: mdi:sofa
label: Rooms
tap_action: { action: open-popup }
popup: |
[[[
return Object.values(hass.areas).map(area => ({
label: area.name,
url: "/d-bubble/home#" + area.area_id,
icon: area.icon
}));
]]]