> For the complete documentation index, see [llms.txt](https://2600hz.gitbook.io/sds/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://2600hz.gitbook.io/sds/sds-components/simple-components/text/code.md).

# Code

## Props

<table><thead><tr><th>Props</th><th width="353.66666666666663">Data Type</th><th>Required</th></tr></thead><tbody><tr><td>children</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td>className</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>align</td><td>string<br>(Left, Right, Center, Justify)</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>textStyle</td><td>string<br>(Mouse, SmCaps, Body, BodyLg, Heading2, Heading1, Title2, Title2)</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>muted</td><td>boolean</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>contrast</td><td>boolean</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr></tbody></table>

## How to Use

Text is a dynamic component that allows developer to have controll over the HTML tag to be inserted in the application, at the same time it facilitates basic text styles, siptser typests and it is connected by default to the sds-theme css tokens.

The available text HTML tags are the fokllowings:

* h1, h2, h3, h4, h5, h6
* p
* span

```tsx
import React from 'react';
import {Text} from '@2600hz/sds-react-components';

const Example = ()=>{
    return(
        <div className='container'>
            <Text.h1 textStyle='Title1' >This is a title</Text.h1>
            <Text.p textStyle='Body'>
                This is a random text for a paragraph
            </Text.p>
        </div>
    )
}

export default Example;

```

The previous code is going to look like the following once it is rendered

```html
<div className='container'>
    <h1 class='sds_Text sds_Text_TextStyle_Title1'>This is a title</h1>
    <p class='sds_Text sds_Text_TextStyle_Body'>
        This is a random text for a paragraph.
    </p>
</div>
```

{% hint style="info" %}
This component is just facilitating standard HTML text tags with already included sds-theme tokens. Its use is not mandatory but it can result as a very useful tool for developers at facilitating sds typeset styles by default.
{% endhint %}

## Live Demo

For detailed code usage documentation, see the Storybooks for each framework below.

### React

{% embed url="<https://sipster-react-component-storybook.netlify.app/?path=%2Fstory%2Fgeneral-components-text--text>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://2600hz.gitbook.io/sds/sds-components/simple-components/text/code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
