New to Kendo UI for jQuery? Start a free 30-day trial

Icon

configuration

Defines a name of an existing icon in the Kendo UI theme sprite. The icon will be applied as background image of a span element inside the Button. The span element can be added automatically by the widget, or an existing element can be used, if it has a k-icon CSS class applied. For a list of available icon names, please refer to the Icon Button article.

Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

icon

String|Object
<button id="button" type="button">Cancel</button>
<script>
$("#button").kendoButton({
    icon: "cancel"
});
</script>
<button id="button" type="button">
    <span class="k-icon"></span> Cancel
</button>
<script>
$("#button").kendoButton({
    icon: "cancel"
});
</script>

icon.name

String

The name of the SVG icon.

<button id="button" type="button">Cancel</button>
<script>
$("#button").kendoButton({
    icon: {
        name: "cancel"
    }
});
</script>
<button id="button" type="button">
    <span class="k-icon"></span> Cancel
</button>
<script>
$("#button").kendoButton({
    icon: {
        name: "cancel"
    }
});
</script>

The SVG icon variant. Supported values are outline, solid, and duotone. The variant applies to SVG rendering and is ignored for font icons.

<button id="button" type="button">Cancel</button>
<script>
$("#button").kendoButton({
    icon: {
        name: "cancel",
        variant: "outline"
    }
});
</script>
<button id="button" type="button">
    <span class="k-icon"></span> Cancel
</button>
<script>
$("#button").kendoButton({
    icon: {
        name: "cancel",
        variant: "outline"
    }
});
</script>