Button

Discover how to use our buttons in your forms, dialogs and more with our versatile classes - including various sizes, colors and states.

Usage

The mesh button should be prefixed with the .btn class which will give you access to all of the classes outlined below.

They are designed to be used with the <button> element but you can also use them on <a> tags, <input type="submit"> and <input type="reset"> tags for ease of use.

You can have any combination of the classes listed below.

<button class="btn">Default</button>
<button class="btn btn-light">Light</button>
<button class="btn btn-dark">Dark</button>
<button class="btn btn-black">Black</button>
<button class="btn btn-simple">Simple</button>Copy iconSuccess icon

Colored

You can add color classes to brighten up the buttons by prefixing it with .btn-{color} class which will give you access to all of the classes outlined below.

<button class="btn btn-primary">Light</button>
<button class="btn btn-success">Dark</button>
<button class="btn btn-info">Black</button>
<button class="btn btn-warning">Simple</button>
<button class="btn btn-danger">Simple</button>
<button class="btn btn-link">Simple</button>Copy iconSuccess icon

Disabled

You can make buttons appear inactive by adding the disabled attribute to the end of the elements tag.

<button class="btn btn-primary" disabled>Primary</button>
<button class="btn btn-light" disabled>Success</button>
<button class="btn btn-dark" disabled>Info</button>
<button class="btn btn-black" disabled>Warning</button>
<button class="btn btn-danger" disabled>Danger</button>
<button class="btn btn-link" disabled>Link</button>Copy iconSuccess icon

Outlined

For an outlined appearance add the classbtn-outline attribute to the end of the elements tag. This will give the button a transparent background with a 1px border.
Note: Colors .btn-{color} need to be prefixed with this class in order to achieve the desired effect.

<button class="btn btn-primary btn-outline">Primary</button>
<button class="btn btn-light btn-outline">Success</button>
<button class="btn btn-dark btn-outline">Info</button>
<button class="btn btn-black btn-outline">Warning</button>
<button class="btn btn-danger btn-outline">Danger</button>
<button class="btn btn-link btn-outline">Link</button>Copy iconSuccess icon

Sizes

mesh Buttons come in three different sizes - small, default & large, simply add btn-small or btn-large classes to achieve the desired effect.

<button class="btn btn-small">Small</button>
<button class="btn">Default</button>
<button class="btn btn-large">Large</button>
Copy iconSuccess icon

Blocks

Button blocks extend the full width of the container that they are in. Add them by using the btn-block class. If multiple block buttons are present, a slight margin bottom will separate them.

<button class="btn btn-block">Default Block</button>
<button class="btn btn-block btn-primary">Primary Block</button>
<button class="btn btn-block btn-primary btn-rounded">Rounded Block</button>
Copy iconSuccess icon

Icons

You are able to add font-awesome icons to any button by adding the <i> tag inside the <button>.
A <span> tag is required for the text inside the button. This will give a slight margin around the icon.
Icon buttons are available in large, default and small.

<button class="btn btn-icon btn-primary">
    <i class="far fa-hashtag"></i>
    <span>With Icon</span>
</button>
<button class="btn btn-icon btn-primary">
    <span>With Icon</span>
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-icon btn-outline primary">
    <span>With Icon</span>
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-icon btn-primary btn-large">
    <span>With Icon</span>
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-icon btn-primary btn-small">
    <span>With Icon</span>
    <i class="far fa-hashtag"></i>
</button>
Copy iconSuccess icon

Just Icons

You can also just use icons within a button by adding the<btn-justicon> class. To make the button circular, add one of our border radius classes <br-circle>.

<button class="btn btn-primary btn-justicon">
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-primary btn-justicon btn-large">
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-primary btn-justicon br-circle">
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-primary btn-justicon btn-large br-circle">
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-primary btn-justicon br-circle btn-outline">
    <i class="far fa-hashtag"></i>
</button>
<button class="btn btn-primary btn-justicon btn-large br-circle btn-outline">
    <i class="far fa-hashtag"></i>
</button>Copy iconSuccess icon

Rounded

Buttons can also be rounded with the <btn-rounded>

<button class="btn btn-primary btn-rounded">Rounded</button>
<button class="btn btn-primary btn-rounded btn-outline">Outline</button>
<button class="btn btn-primary btn-rounded" disabled>Disabled</button>
Copy iconSuccess icon

Loading

A loading class can be used with any button to add an animated spinner to the button using the :after pseudo selector.
Typically this class will be used with Javascript. You just simply add the btn-loading class, which will in turn, make the text transparent and add the spinner. The size of the button will remain the same.
Note: Any color classes can be added to the loading buttons.

<button class="btn btn-primary btn-loading">Loading</button>
<button class="btn btn-primary btn-loading btn-outline">Loading</button>
<button class="btn btn-primary btn-loading btn-small">Loading</button>
<button class="btn btn-primary btn-loading btn-large">Loading</button>
Copy iconSuccess icon

Variables

Enable and disable a wide variety of button features as well as change the appearance of the default mesh button via padding, font adjustments & shadows.

Variable Value Description
$button-enable-colored: true;
Boolean Enables/disables the default colored mesh buttons.
$button-enable-disabled: true;
Boolean Enables/disables the disabled button.
$button-enable-outline: true;
Boolean Enables/disables the outlined button.
$button-enable-sizes: true;
Boolean Enables/disables large & small buttons.
$button-enable-rounded: true;
Boolean Enables/disables rounded buttons.
$button-enable-icons: true;
Boolean Enables/disables icons and just icon buttons.
$button-enable-block: true;
Boolean Enables/disables block buttons (width 100%).
$button-enable-loading: true;
Boolean Enables/disables loading buttons (spinners).
$button-enable-shadows: true;
Boolean Enables/disables shadows for buttons in their normal state and hover.
$button-padding-small: 8px 20px;
Pixel/em/rem Padding amount for small sized buttons in pixels, em's or rem's.
$button-padding-medium: 14px 30px;
Pixel/em/rem Padding amount for medium sized buttons in pixels, em's or rem's.
$button-padding-large: 20px 40px;
Pixel/em/rem Padding amount for large sized buttons in pixels, em's or rem's.
$button-padding-round: 14px 40px;
Pixel/em/rem Padding amount for round sized buttons in pixels, em's or rem's.