Skip to main content

Button

To trigger an operation.

When To Use#

A button means an operation (or a series of operations). Clicking a button will trigger corresponding business logic.

Examples#

import { Button } from 'tailor-ui';

Basic#

Variant#





Rounded#





Icon#

import { MdArrowForward } from 'react-icons/md';




import { MdCheck } from 'react-icons/md';

Disabled#





Loading#







Sizes#

API#

PropertyDescriptionTypeDefault
variantset different variant to display other colors of button'primary' 'primary-invert' 'danger' 'danger-invert' 'regular' 'normal'
sizethe size of button'sm' | 'md' | 'lg''md'
loadingset the loading status of buttonbooleanfalse
roundedset the button is rounded or notbooleanfalse
disableddisabled state of buttonbooleanfalse
iconset the icon of button, see: Icon componentIconType
onClickset the handler to handle click event(event: MouseEvent) => void