ux_icon() to render SVG icons in menu items. When not installed, the template falls back to a <span data-icon="..."> element you can style with your own icon system.
Installing UX Icons
Setting an icon on a menu item
Set the Icon field on any menu item in the dashboard using the icon library prefix format:: is the icon library identifier. The part after : is the icon name within that library.
Configuring the icon library prefix map
Different UX Icons adapters expect different short prefixes (e.g. Bootstrap Icons expectsbi:house, not bootstrap-icons:house). Configure the mapping in your bundle YAML:
config/packages/nowo_dashboard_menu.yaml
bootstrap-icons:house → bi:house before calling ux_icon('bi:house').
You can add as many entries as you need:
Config keys are normalised internally (hyphens become underscores), so
bootstrap-icons and bootstrap_icons both work as YAML keys.Per-menu UX Icons toggle
Each menu in the database has ause_ux_icons flag. Set it via the configuration panel (gear icon) in the dashboard. When disabled for a specific menu, the template outputs <span data-icon="..."> even if UX Icons is installed globally.
Fallback when UX Icons is not installed
Whensymfony/ux-icons is not installed, the menu template renders icons as:
Icon size
The rendered icon size is controlled by thedashboard.icon_size config option:
config/packages/nowo_dashboard_menu.yaml
width and height on SVG icons rendered by UX Icons, and as font-size on legacy span icons.
Icon selector integration
If you use nowo-tech/icon-selector-bundle, you can connect it to the item form’s icon field by providing the selector script URL:config/packages/nowo_dashboard_menu.yaml