Views.buttonIcon
configurationThe icon name of the Toolbar button rendered for the view.
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.
views.buttonIcon
String|Object<div id="aiprompt"></div>
<script>
$("#aiprompt").kendoAIPrompt({
views: [
{
type: 'prompt',
promptSuggestions: [
"Act as [actor] and write [format] about [subject] in [100 words]",
"Suggest post about [subject] that will be used in [social media].",
],
},
"output",
{
type: 'commands',
promptCommands: [
{ id: "1", text: "Simplify", icon: "min-width" },
{ id: "2", text: "Extend", icon: "arrows-left-right" },
]
},
{
name: "custom",
type: "custom",
buttonIcon: "pencil",
buttonText: "Custom View from Options",
viewTemplate: () => "<div class='custom-view'>Custom View</div>",
footerTemplate: () => `<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
<button ref-custom-button>Click me</button>
</div>`,
initializeComponents: function() {
var that = this;
that.element.find("[ref-custom-button]").kendoButton({
click: function(e) {
console.log("Custom button clicked", e);
}
});
}
}]
})
</script>
views.buttonIcon.name
StringThe name of the SVG icon.
<div id="aiprompt"></div>
<script>
$("#aiprompt").kendoAIPrompt({
views: [
{
type: 'prompt',
promptSuggestions: [
"Act as [actor] and write [format] about [subject] in [100 words]",
"Suggest post about [subject] that will be used in [social media].",
],
},
"output",
{
type: 'commands',
promptCommands: [
{ id: "1", text: "Simplify", icon: "min-width" },
{ id: "2", text: "Extend", icon: "arrows-left-right" },
]
},
{
name: "custom",
type: "custom",
buttonIcon: "pencil",
buttonText: "Custom View from Options",
viewTemplate: () => "<div class='custom-view'>Custom View</div>",
footerTemplate: () => `<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
<button ref-custom-button>Click me</button>
</div>`,
initializeComponents: function() {
var that = this;
that.element.find("[ref-custom-button]").kendoButton({
click: function(e) {
console.log("Custom button clicked", e);
}
});
}
}]
})
</script>
views.buttonIcon.variant
StringThe SVG icon variant. Supported values are outline, solid, and duotone. The variant applies to SVG rendering and is ignored for font icons.
<div id="aiprompt"></div>
<script>
$("#aiprompt").kendoAIPrompt({
views: [
{
type: 'prompt',
promptSuggestions: [
"Act as [actor] and write [format] about [subject] in [100 words]",
"Suggest post about [subject] that will be used in [social media].",
],
},
"output",
{
type: 'commands',
promptCommands: [
{ id: "1", text: "Simplify", icon: "min-width" },
{ id: "2", text: "Extend", icon: "arrows-left-right" },
]
},
{
name: "custom",
type: "custom",
buttonIcon: "pencil",
buttonText: "Custom View from Options",
viewTemplate: () => "<div class='custom-view'>Custom View</div>",
footerTemplate: () => `<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
<button ref-custom-button>Click me</button>
</div>`,
initializeComponents: function() {
var that = this;
that.element.find("[ref-custom-button]").kendoButton({
click: function(e) {
console.log("Custom button clicked", e);
}
});
}
}]
})
</script>