Items Appearance
The BottomNavigation component allows you to modify its textual content and styling according to the specific project requirements.
To configure the BottomNavigation items, use its built-in items property and bind it to an array of BottomNavigationItem elements.
The BottomNavigation provides various configuration options and enables you to do the following:
- Specify the text
- Set the selected items
- Disable specific items
- Change the style of the items
- Display icons
Setting the Item Text
You can set the text of the BottomNavigation's items by utilizing the text property.
The following example demonstrates how to set the text property of the BottomNavigation.
Setting the Selected Items
You can modify the selected state of the items in the BottomNavigation by using the selected property.
The following example demonstrates how to set the selected property of the BottomNavigation.
Disabling Specific Items
You can disable BottomNavigation items by setting the disabled property to true.
The following example demonstrates how to set the disabled property of the BottomNavigation.
Styling the Items
You can customize the styling of the BottomNavigation's items by using either of the following approaches:
The following example demonstrates how to set the cssClass and cssStyle properties of the BottomNavigation.
Displaying Icons
Depending on the configuration of the project, you can enhance the content of the BottomNavigation by displaying any of the following icon types:
As of R2 2023 (
v13.0.0) the default icon type in the Kendo UI for Angular components and Kendo UI themes is changed fromfonttosvg. Set thesvgIconproperty, or Continue Using Font Icons.
Displaying SVG Icons
To display an SVG icon inside the BottomNavigation, select the desired one from the list of SVG icons supported by Kendo UI for Angular, and set the svgIcon to the necessary icon name.
public home: SVGIcon = homeIcon;
public items = [
{ text: 'Home', svgIcon: this.home, selected: true },
];
The following example demonstrates how to set the svgIcon property of the BottomNavigation.
Displaying Font Icons
To display an icon inside the BottomNavigation:
- Use the
ICON_SETTINGStoken of the Icons package and set the icon type tofont. For more information, go to the topic abouticon settings. - Depending on the font icons library, you can set the:
iconproperty to a font icon in the Kendo UI theme. For details, go to the list of font icons supported by Kendo UI for Angular.tspublic items = [ { text: 'Home', icon: 'home' }, ];iconClassproperty to a third-party font icon like FontAwesome.tspublic items = [ { text: 'Home', iconClass: 'fa fa-home' }, ];
The following example demonstrates how to set the icon and iconClass properties of the BottomNavigation.