Button
Displays consistent, accessible buttons and anchor links.
The button component allows you to style elements as buttons using a combination of three Tailwind classes: a base class for structural rules, a variant for visual style, and a size for dimensions.
Reference
The button component relies on the following CSS class categories:
Variants
- variant-default
- variant-destructive
- variant-outline
- variant-secondary
- variant-ghost
- variant-link
Sizes
- size-default
- size-sm
- size-lg
- size-icon
- size-icon-sm
- size-icon-lg
Usage
Add the btn, variant-* and size-*, classes to buttons or links.
You can define additional or edit the existing classes in the file: assets/css/components/_button.css.
Since the component is rendered exclusively from CSS, there is no visual difference between a <button> and an <a>.
Tips & tricks
Icon Combinations
You can use the Icon component
with any variant to combine icons and text.
Group Animations
Create complex effects using Tailwind’s group modifiers.
Manual Installation
Create the file assets/components/_button.css, paste the following content:
Import it in your main Tailwind file: