# LabelProps

**Kind:** Interface

Props for the `Label` component. Also accepts:
* `AllStylesProps`
* `AriaProps`

## Properties

### `children?`

Type: `React.ReactNode | string`

The contents of the label.

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

### `htmlFor?`

Type: `undefined | string`

The `for` attribute. Should contain the `id` of the input.

### `id?`

Type: `undefined | string`

The `id` attribute.

### `role?`

Type: `undefined | string`

The `role` attribute.

### `size?`

Type: `TextSizeProp`

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

### `style?`

Type: `React.CSSProperties`

Additional styles.

---

## Label

**Kind:** Component

A label component.

[[ Story id="label--example" title="Label example" ]]

**Parameters:**
- `props` (`LabelProps`)
- `ref` (`React.Ref<HTMLLabelElement>`)

**Returns:** `Element`
