Button

Easily create nice looking buttons, which come in different styles.

Table of contents

Usage

To apply this component, add the .uk-button class and a modifier such as .uk-button-default to an <a> or <button> element. Add the disabled attribute to a <button> element to disable the button.

  • Link
PR

Style modifiers

There are several style modifiers available. Just add one of the following classes to apply a different look.

  • .uk-button-default
  • .uk-button-ghost
  • .uk-button-primary
  • .uk-button-secondary
  • .uk-button-success
  • .uk-button-warning
  • .uk-button-info
  • .uk-button-danger
  • .uk-button-text
PR

Customization

You can use CSS variables to customize this component in any way you prefer.

PR

Size modifiers

There are several size modifiers available. Just add one of the following classes to make the button smaller or larger.

ClassDescription
.uk-button-xsmallApplies extra small size.
.uk-button-smallApplies small size.
.uk-button-mediumApplies medium size.
.uk-button-largeApplies large size.
PR

Width modifiers

You can use Tailwind CSS utility classes alongside button classes and the it will follow its width.

PR

Icon

Use .uk-button-icon class to create an icon button, which can be used for social icons or toolbars.

Group

To create a button group, add the .uk-button-group class to a <div> element around the buttons. That’s it! No further markup is needed.

PR

Button with dropdowns

A button can be used to trigger a dropdown menu from the Dropdown component.

PR

Loading

You can use Frankenstyle utilities or the Spinner component to add a loading state.

PR