Components

Button

Browse and customize beautiful Tailwind CSS buttons in various styles and states, from active to disabled, allowing users to take actions or make choices.

Variants

Solid buttons

The standard format for button is component class `btn`, accompanied by modifier class `btn-{semantic-color}`.

Soft buttons

Add modifier class `btn-soft` for soft colored buttons.

Outline buttons

Add modifier class `btn-outline` for outline colored buttons.

Text buttons

Add modifier class `btn-text` for text colored buttons.

Gradient buttons

Add modifier class `btn-gradient` for gradient colored buttons.

Wave effect button

Add modifier class `waves` for wave effect in buttons.

Shapes

Pilled buttons

Use the `rounded-full` utility class to make buttons circular. The default shape of the button but can be altered by using TailwindCSS <a href="https://tailwindcss.com/docs/border-radius" target="_blank" class="link link-primary">Border Radius</a> utility classes.

Rounded buttons

This is the default shape of button.

States

States variants

Use the `btn-active` class to force the button to show the active state and the `btn-disabled` class to force the button to show the disabled state.

Size

Size variants

Add responsive class `btn-{size}` where `{size} = xs|sm|md|lg|xl` for button of different sizes.

Wide button

To create a wide button, add the `btn-wide` class which provides additional horizontal padding.

Block button

To create a wide button, add the `btn-block` class which occupies the full width of the parent container.

Responsive button

This button will have different sizes on different browser viewpoints.

Icon buttons

Icon at start/end

Use any icons at start/end the button.

Icon only

Use `btn-square` or `btn-circle` to create circle/square button with a 1:1 ratio.

Input tags

Buttons with input tags

You can use `btn` class on `<button>`, `<input>`, `<a>`, etc...

Link

Illustrations

Social buttons

Use the following sample code to build custom Social, Payment, and other types of buttons. This example also demonstrates how to create a custom button using two variables: `--btn-color` and `--btn-fg`.

Loading buttons

Use loading component to add a loader to the button.

Glass button

Use class `glass` to create a button with glass effect.

Dashed buttons

You can achieve this style by combining the `border-dashed` utility class with the `btn-outline` modifier class.

Button group

Group a series of buttons together on a single line or stack them in a vertical/horizontal column

Class referenceThe component, style, color, state, size and modifier classes available for this component.
ClassTypeDescription
btncomponentBase class for the button component.
btn-softstyleSoft colored button.
btn-outlinestyleTransparent button with colored border.
btn-gradientstyleGradient button
btn-primarycolorButton with 'primary' color.
btn-secondarycolorButton with 'secondary' color.
btn-accentcolorButton with 'accent' color.
btn-infocolorButton with 'info' color.
btn-successcolorButton with 'success' color.
btn-warningcolorButton with 'warning' color.
btn-errorcolorButton with 'error' color.
btn-activestateForce button to show active state.
btn-disabledstateForce button to show disabled state.
btn-xssizeButton with extra small size.
btn-smsizeButton with small size.
btn-mdsizeButton with medium(Default) size.
btn-lgsizeButton with large size.
btn-xlsizeButton with extra large size.
glassmodifierButton with a glass effect.
btn-widemodifierWide button (max-w-64).
btn-blockmodifierFull width button.
btn-circlemodifierCircle button with a 1:1 ratio.
btn-squaremodifierSquare button with a 1:1 ratio.