> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <TextBlock />

> A block of text whose content can be aligned.

<img className="dark:hidden" width="720" height="440" noZoom src="https://mintcdn.com/attio/2EyaTyByKNPeSVcd/images/text-block.png?fit=max&auto=format&n=2EyaTyByKNPeSVcd&q=85&s=797ba4be527759d025d5fba2ab2e22db" data-path="images/text-block.png" />

<img className="hidden dark:block" width="720" height="440" noZoom src="https://mintcdn.com/attio/2EyaTyByKNPeSVcd/images/text-block-dark.png?fit=max&auto=format&n=2EyaTyByKNPeSVcd&q=85&s=d7376d9c3b6a940f93965e7b041122f1" data-path="images/text-block-dark.png" />

```js theme={"system"}
import {TextBlock} from "attio/client"
```

It can be thought of as a

```jsx theme={"system"}
<div style={{display: "flex", flexDirection: "row"}} />
```

<Tip>
  If you find yourself using `<TextBlock>Loading...</TextBlock>`, we recommend using [`<LoadingState />`](./loading-state) to manage loading states instead.
</Tip>

## Example

```tsx form-with-textblock-dialog.tsx theme={"system"}
import React from "react"
import {Forms, useForm, showToast, TextBlock} from "attio/client"

export function FormWithTextBlockDialog() {
  const {Form, SubmitButton, TextInput} = useForm(
    {
      firstName: Forms.string(),
      lastName: Forms.string(),
    },
    {
      firstName: "",
      lastName: "",
    },
  )
  return (
    <Form
      onSubmit={async (values) => {
        await showToast({
          title: "Form submitted",
          variant: "success",
          text: JSON.stringify(values),
        })
      }}
    >
      <TextBlock>Some additional information to understand the fields below</TextBlock>
      <TextInput label="First name" name="firstName" />
      <TextInput label="Last name" name="lastName" />
      <SubmitButton label="Submit" />
    </Form>
  )
}
```

## Props

<ParamField path="children" type="React.ReactNode" required>
  The text content of text block, usually text, but can be other components.
</ParamField>

<ParamField path="align" type="'left' | 'center' | 'right'">
  How to optionally align the content of the text block.

  Defaults to `"center"`.
</ParamField>
