Extensions

Press shift + S to search API reference.

React component

TextButton

View source

Props

interface TextButtonProps extends TooltipAnchorProps<HTMLSpanElement>, AriaProps, TextButtonStyleProps
aria-selectedundefined | false | true

The aria-selected attribute.

childrenReact.ReactNode | string

The contents of the button.

classNameundefined | string

Additional class names to apply, separated by spaces.

dataAttributesDataAttributesProp

Data attributes that are spread onto the element, e.g. dataAttributes={{'data-*': '...'}}.

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: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>) => unknown

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

sizeTextSizeProp

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

styleReact.CSSProperties

Additional styles.

tabIndexundefined | number

The tabIndex attribute.

variantTextButtonVariant

The variant of the button, which defines the color. Defaults to default.