Skip to main content

Introduction

The button component is used to render a clickable button that can perform an action:
By default, a button’s underlying HTML tag is <button>. You can change it to be an <a> tag by using the tag attribute:

Setting the size of a button

By default, the size of a button is “medium”. You can make it “extra small”, “small”, “large” or “extra large” by using the size attribute:

Changing the color of a button

By default, the color of a button is “primary”. You can change it to be danger, gray, info, success or warning by using the color attribute:

Adding an icon to a button

You can add an icon to a button by using the icon attribute:
You can also change the icon’s position to be after the text instead of before it, using the icon-position attribute:

Making a button outlined

You can make a button use an “outlined” design using the outlined attribute:
You can combine the outlined attribute with any color:

Adding a tooltip to a button

You can add a tooltip to a button by using the tooltip attribute:

Adding a badge to a button

You can render a badge on top of a button by using the badge slot:
You can change the color of the badge using the badge-color attribute: