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