Skip to content
Docs
Components
Primitives
Button

Button

The Button component can be used to trigger various kinds of user events such as submitting a form, opening a dialog, canceling an action, or performing a delete operation. It uses Reakit's button component internally.

Imports

import { Button, ButtonSpinner, CloseButton } from "@adaptui/react-tailwind";
  • Button: The button which has prefix/suffix icons support, variants & size.
  • CloseButton: Button which has accesibility to perform the close action

Usage

Button sizes

Sizes can be set using the size prop. The default size is md. The available sizes are: sm md lg xl

Button variants

Variants can be set using the variant prop. The default variant is solid. The available variants are: solid subtle outline ghost

💡

You can add extra variants & sizes via the theme file. Checkout theming guide.

Button prefix, suffix & iconOnly

You can pass iconOnly, prefix and suffix props to append or prepend any content inside of button.

Close Button

Component which comes with accessibility to close the dialogs or other actions

API Reference

Button

Prop

Type

Default

sizeunionmd
themeColorunionbase
variantunionsolid
loadingbooleanfalse
disabledbooleanfalse
prefixReact.ReactNode-
suffixReact.ReactNode-
iconOnlyReact.ReactNode-
spinnerReact.ReactNode-
Last updated on July 27, 2022