# TextProps

**Kind:** Interface

Props for the `Text` component. Also supports:
* `AriaProps`
* `AllStylesProps`

## Properties

### `as?`

Type: `"p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "li" | "em" | "strong" | "kbd" | "mark" | "q" | "s" | "samp" | "small" | "sub" | "sup" | "time" | "var" | "blockquote"`

The element that is rendered. Defaults to `p`.

### `children?`

Type: `React.ReactNode | string`

The contents of the text.

### `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-*': '...'}}`.

### `id?`

Type: `undefined | string`

The `id` attribute.

### `role?`

Type: `undefined | string`

The `role` attribute.

### `size?`

Type: `TextSizeProp`

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

### `style?`

Type: `React.CSSProperties`

Additional styles.

### `variant?`

Type: `TextVariant`

The variant of the text. Defaults to `default`.

---

## Text

**Kind:** Component

A text component with sizes and variants.

[[ Story id="text--example" title="Text example" ]]

**Parameters:**
- `props` (`TextProps`)
- `ref` (`React.Ref<HTMLElement>`)

**Returns:** `Element`
