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.
Imports
import { Button, 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 |
|---|---|---|
size | union | md |
themeColor | union | base |
variant | union | solid |
loading | boolean | false |
disabled | boolean | false |
prefix | React.ReactNode | - |
suffix | React.ReactNode | - |
iconOnly | React.ReactNode | - |
spinner | React.ReactNode | - |
Last updated on July 25, 2022