Button

RippleUI comes with a button component that can be used to trigger actions.

Default

Simple example of button.

HTML
JSX
<button class="btn">Default</button>

Colors

Button colors.

HTML
JSX
<button class="btn btn-primary">Default</button>
<button class="btn btn-secondary">Default</button>
<button class="btn btn-success">Default</button>
<button class="btn btn-error">Default</button>
<button class="btn btn-warning">Default</button>

Outline

Button outline.

HTML
JSX
<button class="btn btn-outline-primary">Default</button>
<button class="btn btn-outline-secondary">Default</button>
<button class="btn btn-outline-success">Default</button>
<button class="btn btn-outline-error">Default</button>
<button class="btn btn-outline-warning">Default</button>

Ghost

Button ghost.

HTML
JSX
<button class="btn btn-ghost">Default</button>

Button Sizes

Button sizes.

HTML
JSX
<button class="btn btn-primary btn-xs">Small</button>
<button class="btn btn-primary btn-sm">Small</button>
<button class="btn btn-primary btn-md">Medium</button>
<button class="btn btn-primary btn-lg">Large</button>
<button class="btn btn-primary btn-xl">Large</button>

Button Rounded

Button rounded.

HTML
JSX
<button class="btn-rounded btn btn-primary">Default</button>
<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>

Button Block

Button block.

HTML
JSX
<button class="btn btn-primary btn-block">Default</button>

Loading

Button loading.

HTML
JSX
<button class="btn btn-loading">Default</button>

Button No Animation

Button No Animation

HTML
JSX
<button class="btn btn-primary btn-no-animation">Default</button>

Disabled

Button disabled.

HTML
JSX
<button class="btn" disabled>Default</button>

API

classDescription
btnButton base class
btn-primarySet primary color
btn-secondarySet secondary color
btn-successSet success color
btn-errorSet error color
btn-warningSet warning color
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-errorTransparent background with border error and hover effect
btn-outline-warningTransparent background with border warning and hover effect
btn-ghostTransparent background with no border and hover effect
btn-loadingAdd Loading spinner
btn-roundedSet full rounded
btn-circleSet circle
btn-blockMake button takes full width
btn-no-animationRemove animation on press
btn-xsSet extra small size
btn-smSet small size
btn-mdSet medium size
btn-lgSet large size
btn-xlSet extra large size