Button

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

FrankenstyleKit (aka Franken UI 3.0) is now available. Support for the current version will gradually wind down. It will continue to work, but using the latest version is recommended for new projects so you can benefit from future updates and enhancements.

Table of contents

Usage

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

  • Link

Style modifiers

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

ClassDescription
.uk-btn-defaultDefault button style.
.uk-btn-ghostApplies a ghost style.
.uk-btn-primaryIndicates the primary action.
.uk-btn-secondaryIndicates an important action.
.uk-btn-destructiveIndicates a dangerous or negative action.
.uk-btn-textApplies an typographic style.
.uk-btn-linkApplies an plain link style.

Size modifiers

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

ClassDescription
.uk-btn-xsApplies extra small size.
.uk-btn-smApplies small size.
.uk-btn-mdApplies medium size.
.uk-btn-lgApplies large size.

Width modifiers

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

Icon

Use .uk-btn-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-btn-group class to a <div> element around the buttons. That’s it! No further markup is needed.

Button with dropdowns

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

Customize

Customize your Franken UI experience.