DropDownButton Icon Options
You can enhance the textual content of the DropDownButton by displaying SVG icons, font icons, or images.
The DropDownButton supports the following icon options:
svgIcon—Displays an SVG icon. For available icons, refer to the list of SVG icons.icon—Displays a font icon from the Kendo UI theme. For available icons, refer to the list of font icons.iconClass—Displays an icon from a CSS class, such as a FontAwesome icon.imageUrl—Displays an image from a URL.endSvgIconandendIcon—Displays an SVG or font icon after the DropDownButton text.
Starting with R2 2023 (
v13.0.0), Kendo UI for Angular components and themes use SVG icons by default. To use font icons with theiconinput, configureICON_SETTINGSfor font icons. For details, see Continue Using Font Icons.
SVG Icons
To display an SVG icon, set the svgIcon property to the necessary SVGIcon.
<kendo-dropdownbutton [svgIcon]="svgShare">Share</kendo-dropdownbutton>The following example demonstrates how to set an SVG icon inside the DropDownButton.
Font Icons
To display a Font icon inside the DropDownButton:
- Use the
ICON_SETTINGStoken of the Icons package and set the icon type tofont. For more information, go to the topic about icon settings. - Depending on the font icons library, you can set the:
iconproperty to a font icon in the Kendo UI theme.html<kendo-dropdownbutton icon="export">Export as</kendo-dropdownbutton>iconClassproperty to a third-party font icon library (such as FontAwesome).html<kendo-dropdownbutton iconClass="fa fa-suitcase">Travel by</kendo-dropdownbutton>
The following example demonstrates how to set the icon and iconClass properties of the DropDownButton.
Image URL
To display an image from a URL, set the imageUrl property of the DropDownButton.
<kendo-dropdownbutton
imageUrl="https://demos.telerik.com/kendo-ui/content/shared/icons/sports/golf.png">
Golf Courses
</kendo-dropdownbutton>
The following example demonstrates the imageUrl property of the DropDownButton in action.
End Icon
To display an icon after the DropDownButton text, use the following options:
endSvgIcon—Sets anSVGIconafter the DropDownButton text.endIcon—Sets a font icon from the Kendo UI theme after the DropDownButton text. To render font icons, set the icon type tofont.
<kendo-dropdownbutton
[data]="shareData"
[svgIcon]="svgShare"
[endSvgIcon]="svgNext">
Share
</kendo-dropdownbutton>
The end icon appears before the optional arrow configured through the arrowIcon property.
The following example demonstrates how to set an SVG icon after the text of the DropDownButton by setting the endSvgIcon property.