components

Tailwind CSS 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.

Class Name
Type
Description
btnComponentBase class for the button component.
btn-neutralModifierButton with ’neutral’ color.
btn-primaryModifierButton with ‘primary’ color.
btn-secondaryModifierButton with ‘secondary’ color.
btn-accentModifierButton with ‘accent’ color.
btn-infoModifierButton with ‘info’ color.
btn-successModifierButton with ‘success’ color.
btn-warningModifierButton with ‘warning’ color.
btn-errorModifierButton with ’error’ color.
btn-softModifierSoft colored button.
btn-outlineModifierTransparent button with colored border.
btn-gradientModifierGradient button
btn-activeModifierForce button to show active state.
btn-disabledModifierForce button to show disabled state.
glassModifierButton with a glass effect.
btn-xsResponsiveButton with extra small size.
btn-smResponsiveButton with small size.
btn-lgResponsiveButton with large size.
btn-wideResponsiveWide button (more horizontal padding).
btn-blockResponsiveFull width button.
btn-circleResponsiveCircle button with a 1:1 ratio.
btn-squareResponsiveSquare button with a 1:1 ratio.
no-animationModifierDisables click animation.
rounded-fullUtilityUtility class for rounded buttons.

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

Add modifier class btn-soft for soft colored buttons.

Add modifier class btn-outline for outline colored buttons.

Add modifier class btn-text for text colored buttons.

Add modifier class btn-gradient for gradient colored buttons.

Add modifier class waves for wave effect in buttons.

Use the rounded-full utility class to make buttons circular. The default shape of the button but can be altered by using TailwindCSS Border Radius utility classes.

This is the default shape of button.

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.

Use state classes with any button variants.

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

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

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

This button will have different sizes on different browser viewpoints by using thw following classes max-sm:btn-sm and lg:btn-lg.

Use any icons at start/end the button.

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

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

Create custom Social, Payment, and other buttons as per the following example code.

Use btn-square or btn-circle to create circle/square buttons.

Use loading component to add a loader to the button.

Use class glass to create a button with glass effect.

Use class no-animation to disable button click animation.

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