# Code

## API

This component extends the native label tag props. This means this component can receive the native html label tag attributes, for example, the `htmlFor` attribute (which is why it's not included in the table). See for reference: [label tag props](https://developer.mozilla.org/es/docs/Web/HTML/Element/label).

| Props        | Type                                                        | Required |
| ------------ | ----------------------------------------------------------- | -------- |
| `children`   | `string`                                                    | ✅        |
| `className`  | `string`                                                    | ❌        |
| `info`       | `string`                                                    | :x:      |
| `infoIcon`   | [`availableTelicon`](https://2600hz.github.io/sds-telicon/) | :x:      |
| `isRequired` | `boolean`                                                   | ❌        |

<details>

<summary>children</summary>

This children prop can receive a string as children. The element passed here will be rendered.

</details>

<details>

<summary>info</summary>

A string that renders a tooltip that when hovered renders the passed string.

</details>

<details>

<summary>infoIcon</summary>

This is an icon that is rendered next to the label, that acts as a tooltip and when hovered displays the info message.

</details>

<details>

<summary>isRequired</summary>

Adds an \* as a required indicator.

</details>

## Example

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td>Live Code</td><td><a href="https://codesandbox.io/s/label-fm2v7m">Code Sandbox</a></td><td></td></tr></tbody></table>

