Skip to main content
Menu items store icons using the full library format, for example bootstrap-icons:house. Symfony UX Icons expects a short prefix, for example bi:house. The icon_library_prefix_map option bridges the two.

How it works

When the bundle renders a menu item icon, it replaces the library portion of the icon name with the configured short prefix:
bootstrap-icons:house  →  bi:house
The converted name is passed to ux_icon('bi:house') in the Twig template.

Options

icon_library_prefix_map
object
default:"{bootstrap-icons: bi}"
A map of full icon library names to their short prefix aliases. Keys are the library name (the part before : in the icon string). Values are the short prefix used when calling ux_icon().
config/packages/nowo_dashboard_menu.yaml
nowo_dashboard_menu:
    icon_library_prefix_map:
        bootstrap-icons: bi
With multiple libraries:
config/packages/nowo_dashboard_menu.yaml
nowo_dashboard_menu:
    icon_library_prefix_map:
        bootstrap-icons: bi
        heroicons: heroicons
        lucide: lucide

Using icons in Twig

After the mapping is applied, the short form is passed directly to the ux_icon() helper:
{{ ux_icon('bi:house') }}
You do not call ux_icon() with the full library name — the bundle handles the conversion internally before rendering.

Key normalization

YAML normalizes keys with hyphens to underscores (e.g. bootstrap-icons becomes bootstrap_icons internally). The bundle accepts both forms when resolving icon names, so your YAML can use either bootstrap-icons or bootstrap_icons as the key.

Installing Symfony UX Icons

To render SVG icons from icon libraries such as Bootstrap Icons or Heroicons, install Symfony UX Icons:
composer require symfony/ux-icons
Then set the icon field on each menu item in the dashboard (e.g. bootstrap-icons:house) and configure icon_library_prefix_map so the bundle converts it to the short form your setup expects.