Extensions

Press shift + S to search API reference.

React component

Props

interface ButtonProps extends AriaProps, ButtonStyleProps, TooltipAnchorProps<HTMLButtonElement>
aria-selectedundefined | false | true

The aria-selected attribute.

childrenReact.ReactNode | string

The contents of the button.

classNameundefined | string

Extra classNames to apply to the button, separated by spaces.

disabledundefined | false | true

Indicates whether or not the user can interact with the button.

iconIconName | ReactElement

The name of the icon or a React node. For more details, see the list of supported icons.

idundefined | string

The id attribute.

onClickundefined | function (e?: React.MouseEvent<HTMLButtonElement>) => unknown

Click event handler. Also handles Space and Enter keypress events.

sizeControlSizeProp

The size of the button. Defaults to default. Can be a responsive prop object.

styleReact.CSSProperties

Extra styles to apply to the button.

tabIndexundefined | number

Indicates if the button can be focused and if/where it participates in sequential keyboard navigation.

type"button" | "submit" | "reset"

The type of the button. Defaults to button.

variantButtonVariant

The variant of the button. Defaults to default.