Button

Classes Information

ClassNameDescription
btnBase Class
btn-loadingAdd button loading spinner
btn-roundedSet button full rounded
btn-circleSet Button Circle
btn-blockSet button full width
btn-no-animationRemove animaton on press
btn-primarySet button primary color
btn-secondarySet button secondary color
btn-successSet button success color
btn-warningSet button warning color
btn-errorSet button error color
btn-ghostTransparent background with no border and hover effect
btn-outline-primaryTransparent background with border primary and hover effect
btn-outline-secondaryTransparent background with border secondary and hover effect
btn-outline-successTransparent background with border success and hover effect
btn-outline-warningTransparent background with border warning and hover effect
btn-outline-errorTransparent background with border error and hover effect
btn-solid-primarySet low primary background and high contrast text color
btn-solid-secondarySet low secondary background and high contrast text color
btn-solid-successSet low success background and high contrast text color
btn-solid-warningSet low warning background and high contrast text color
btn-solid-errorSet low error background and high contrast text color
btn-2xsSet button 2extra small size
btn-xsSet button extra small size
btn-smSet button small size
btn-mdSet button medium size
btn-lgSet button large size
btn-xlSet button extra large size

Basic Usage

Example Code

html
<button class="btn">Basic</button>

Rounded

Example Code

html
<button class="btn btn-rounded btn-primary">Basic</button>

Icon

Example Code

html
<button class="btn btn-circle">
  <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
  </svg>
</button>

Loading

Example Code

html
<button class="btn btn-loading">Basic</button>

No Animation

Example Code

html
<button class="btn btn-primary btn-no-animation">No Animation</button>

Block

Example Code

html
<button class="btn btn-primary btn-block">Block</button>

Disabled

Example Code

html
<button class="btn" disabled>Disabled</button>

Colors

Example Code

html
<button class="btn btn-primary">Primary</button>
<button class="btn btn-secondary">Secondary</button>
<button class="btn btn-success">Success</button>
<button class="btn btn-warning">Warning</button>
<button class="btn btn-error">Error</button>
<button class="btn btn-ghost">Ghost</button>

Outline

Example Code

html
<button class="btn btn-outline-primary">Primary</button>
<button class="btn btn-outline-secondary">Secondary</button>
<button class="btn btn-outline-success">Success</button>
<button class="btn btn-outline-warning">Warning</button>
<button class="btn btn-outline-error">Error</button>

solid

Example Code

html
<button class="btn btn-solid-primary">Primary</button>
<button class="btn btn-solid-secondary">Secondary</button>
<button class="btn btn-solid-success">Success</button>
<button class="btn btn-solid-warning">Warning</button>
<button class="btn btn-solid-error">Error</button>

Sizes

Example Code

html
<button class="btn btn-primary btn-xl">Extra Large</button>
<button class="btn btn-primary btn-lg">Large</button>
<button class="btn btn-primary btn-md">Base</button>
<button class="btn btn-primary btn-sm">Small</button>
<button class="btn btn-primary btn-xs">Extra Small</button>
<button class="btn btn-primary btn-2xs">Extra Small</button>