All You Could Ever Want to Know about the Kendo UI Button
Tags: javascript, angular, kendoui
Published: 2018-11-20 09:33:24

---
title: All You Could Ever Want to Know about the Kendo UI Button
published: true
tags: javascript, angular, kendoui 
canonical_url: https://www.telerik.com/blogs/all-you-could-ever-want-to-know-kendo-ui-button
---

How can you create and design a beautiful custom button in Kendo UI? Learn how you can easily build the perfect button for your web apps.

Hello and welcome back to the Angular and Kendo UI Unite Video Series. If you are new to the series, I suggest checking out [the first post](https://dev.to/progresstelerik/getting-started-with-angular--kendo-ui-1o08-temp-slug-3696551) or watching the [video series](https://www.youtube.com/playlist?list=PLLGlTD7u3kMrqsgmFXe1IUuD_bJgHxSeK) these posts are based on. This is post number two, and we're going to talk all about buttons.

If you want to watch the video, you can dive in right here:

<iframe width="560" height="315" src="https://www.youtube.com/embed/wKnrjbhAzgE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>

In the [first post](https://dev.to/progresstelerik/getting-started-with-angular--kendo-ui-1o08-temp-slug-3696551) we were able to get our Angular app created, and we were able to install Kendo UI and start using our very first component, which was the button. However, we didn't have time to cover everything there is because there's so many, many more options. This article will show the black belt ways of the button, so let’s get started!

Find the code to follow along, [here on my Github!](https://github.com/alyssamichelle/angular-kendo-unite/tree/video-2)

So here we have our app with the buttons we built last time in the button control panel component. We have a `k-block` (a Kendo block) and inside that we've got our list of buttons with different appearances:

```
<div class="k-block">
    <button kendoButton [look]="'default'">Default Button</button>
    <button kendoButton [look]="'outline'">Outline Button</button>
    <button kendoButton [look]="'bare'">Bare Button</button>
    <button kendoButton>Button</button>
  </div>
```

![screenshot showing all the different buttons with their different appearance options](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-1/image_4.png?sfvrsn=6b00f1d_2)

Next I want to show that you can actually add a couple of other things to your Kendo UI Button. Right now we are controlling the appearance with this `[look]` property binding, but you can actually do multiple things like disable, set a button as a primary button, make a button togglable or give it an icon. So let's get started and I'll show you those things! It’s good to know though that all of them are using property binding, which is with the square brackets. If you need a Angular binding refresher, check out [this post I wrote](https://dev.to/progresstelerik/all-about-angular-bindings-260h-temp-slug-3753248)!

Property Binding to Customize Buttons

| Disabled Button  | [disabled]="true" |
| Primary Button | [primary]="true" |
| Toggleable Button | [toggleable]="true" |
| Icon Button | [icon]=" 'check' " |

 

As you would probably anticipate, to disable a button, we will go ahead and set disabled equal to true: `[disabled]="true"`.

![gif showing what the disabled button looks like and behaves like when clicked](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/image-1.gif?sfvrsn=dcc5bff3_2)

Now that final button in the list is disabled. Pretty easy peasy. Let's go ahead and create another button, but this one will be a primary button. I’m giving it the text of `Primary Action`, but this would really be something like the Submit button on the bottom of a form or a Checkout button on a shopping cart. The primary action button should be the primary goal of the page.

```
<button kendoButton [primary]="true">Primary Action</button>
```
 ![gif showing what the primary kendo ui button looks like](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/image-2.gif?sfvrsn=cf0372ca_2)

Next up, toggleable. We are going to make the next button we create toggle, simply by setting `[toggleable]="true"`.

```
<button kendoButton [toggleable]="true">Toggleable</button>
```
 ![gif showing what the toggleable kendo ui button looks like](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/toggleable.gif?sfvrsn=4e45cbd1_2)

WARNING: If you are using Kendo UI Buttons older than 4.1.3, you will need to spell the toggleable attribute `togglable`.

So the last and final feature we're going to talk about right now is icons. You can actually set icon equal to a string with the icon name. Let's look at calendar. That one is pretty scandalous. :D

```
<button kendoButton [icon]="'calendar'" [toggleable]="true">Icon Button</button>
```

![kendo ui icon button with calendar icon on the left and text on the right](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/image-3.png?sfvrsn=da0092ac_2)

You can see we've got the icon button, super sexy, with the calendar icon. And you might be pondering to yourself, how do I know what other icons I have available to me? Well let’s explore the docs together to find more about icons. From our [button icons docs](https://www.telerik.com/kendo-angular-ui/components/buttons/button/icons/) you can [navigate here](https://www.telerik.com/kendo-angular-ui-develop/components/styling/icons/#toc-list-of-font-icons) to a full list of the built in icons we provide!

![screenshot of kendo ui docs showing a list of icons available](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/image-4.png?sfvrsn=c4aad7d0_2)

So that is how we know which icons are available to us.

In this next section, I’m going to comment out some of our earlier buttons so we can play around more with our beautiful icon buttons.

## Button Group

We have something called a [Kendo Button Group](https://www.telerik.com/kendo-angular-ui-develop/components/buttons/buttongroup/) which you can actually wrap your buttons in. It groups them nicely together, and the outer button edges have a nice rounded corner whereas the middle button is squared off, so it looks like they are one cohesive group, which is super nice. There is a neat combo of being in the `kendo-buttongroup` element as well as having `toggleable` set that gives this distinct look:

```
<kendo-buttongroup>
  <button kendoButton [icon]="'user'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'check'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'calendar'" [toggleable]="true">Icon Button</button>
</kendo-buttongroup>
```

![image showing what a kendo ui button group looks like with 3 toggleable icon buttons in a row inside](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/image-5.png?sfvrsn=4f575c2e_2)

## Giving a Button Group Full Width

You can also have this Button Group responsively span the full width, by setting `width` to `100%`.

```
<kendo-buttongroup [width]="100">
  <button kendoButton [icon]="'user'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'check'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'calendar'" [toggleable]="true">Icon Button</button>
</kendo-buttongroup>
```

![gif showing how the full width kendo ui button group grows and shrinks with window size](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/image-6.gif?sfvrsn=39e3fb19_2)

## Giving Button Group a Disabled or Bare Appearance

There are a couple other features I wanted to talk about. We already talked about how we can change the individual appearance of each button, and you can also do that to all the buttons within a Kendo UI Button Group quite easily as well. So inside the Kendo UI Button Group you can just say "look equals" and then things like default, outlines, etc. Let's go ahead and try outline.

```
<kendo-buttongroup [width]="100" look="outline">
  <button kendoButton [icon]="'user'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'check'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'calendar'" [toggleable]="true">Icon Button</button>
</kendo-buttongroup>
```
 ![image showing the cool styles of the outline look on a kendo ui button group of icon buttons](https://www.telerik.com/sfimages/default-source/blogs/2018/2018-11/angular-kendo-unite-post-1/post-2/image-7.png?sfvrsn=d6ff5ca6_2)

Just as with individual buttons, you can change the disabled property or the appearance to outline, flat, or bare by setting them to true on the button group itself.

## The End Product

```
<button kendoButton [disabled]="true">Disabled Button</button>
<button kendoButton [primary]="true">Primary Action</button>
<button kendoButton [toggleable]="true">Toggleable</button>

<kendo-buttongroup [width]="100" look="outline">
  <button kendoButton [icon]="'user'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'check'" [toggleable]="true">Icon Button</button>
  <button kendoButton [icon]="'calendar'" [toggleable]="true">Icon Button</button>
</kendo-buttongroup>
```

I hope you've enjoyed learning more about Kendo UI buttons. There's actually two extra components, the [dropdown button](https://www.telerik.com/kendo-angular-ui-develop/components/buttons/dropdownbutton/) and the [split button](https://www.telerik.com/kendo-angular-ui-develop/components/buttons/splitbutton/), that we don't have time to dive fully into in this blog series, but our docs talk all about them and we have amazing examples. Please do check those out if you're curious, they're great! I'll see you back here for the next part of Angular and Kendo UI Unite.

If you're new to Kendo UI for Angular, you can learn more [here](https://www.telerik.com/kendo-angular-ui) or just jump into a [free 30 day trial](https://www.telerik.com/download-trial-file/v2/kendo-angular-ui) today.