# TextButtonProps

**Kind:** Interface

Props for the `TextButton` component. Also supports:
* `AriaProps`
* `TextButtonStyleProps`

## Properties

### `aria-selected?`

Type: `undefined | false | true`

The `aria-selected` attribute.

### `children?`

Type: `React.ReactNode | string`

The contents of the button.

### `className?`

Type: `undefined | string`

Additional class names to apply, separated by spaces.

### `dataAttributes?`

Type: `DataAttributesProp`

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

### `disabled?`

Type: `undefined | false | true`

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

### `icon?`

Type: `IconName | ReactElement`

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

### `id?`

Type: `undefined | string`

The `id` attribute.

### `onClick?`

Type: `undefined | object`

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

### `size?`

Type: `TextSizeProp`

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

### `style?`

Type: `React.CSSProperties`

Additional styles.

### `tabIndex?`

Type: `undefined | number`

The `tabIndex` attribute.

### `variant?`

Type: `TextButtonVariant`

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

---

## TextButton

**Kind:** Component

A text button component with sizes and variants.

[[ Story id="textbutton--example" title="Text button example" ]]

**Parameters:**
- `props` (`TextButtonProps`)
- `ref` (`React.Ref<HTMLSpanElement>`)

**Returns:** `Element`
