> ## 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.

# <TextInput />

> A string input field.

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

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

<Note>
  This component is returned by
  [`useWorkspaceSettingsForm()`](../../settings/use-workspace-settings-form).
</Note>

Unlike with [`useForm()`](../../forms/use-form) where validation is defined in the schema, workspace settings validation is specified directly on the input components using props like `minLength`, `maxLength`, `multiline`, and `url`.

## Example

```tsx workspace-settings.tsx theme={"system"}
import React from "react"
import {useWorkspaceSettingsForm} from "attio/client"
import type {App} from "attio"

export const workspaceSettings: App.Settings.Workspace = {
  Page,
}

function Page() {
  const {Form, TextInput} = useWorkspaceSettingsForm()

  return (
    <Form>
      <TextInput label="Display name" name="display_name" minLength={3} maxLength={50} />
      <TextInput label="Webhook URL" name="webhook_url" type="url" url />
      <TextInput label="Description" name="description" multiline maxLength={500} />
    </Form>
  )
}
```

## Props

<ParamField path="label" type="string" required>
  The label of the input field.
</ParamField>

<ParamField path="name" type="string" required>
  The path to the `string` value of the input field in your [settings schema](../../settings/app-settings-schema).

  e.g. `"display_name"`, `"integration.webhook_url"`
</ParamField>

<ParamField path="type" type="'text' | 'email' | 'password' | 'tel' | 'url'">
  The type of the input field.

  They roughly correspond to the HTML types
  [`text`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text),
  [`email`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email),
  [`password`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password),
  [`tel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/tel), and
  [`url`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url).

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

<Tip>Useful on mobile devices with virtual keyboards.</Tip>

<ParamField path="placeholder" type="string">
  An optional placeholder text for your input.
</ParamField>

<ParamField path="minLength" type="number">
  The minimum length (number of characters) required. Validation will fail if the user inputs a
  string shorter than this value.
</ParamField>

<ParamField path="maxLength" type="number">
  The maximum length (number of characters) allowed. Validation will fail if the user inputs a
  string longer than this value.
</ParamField>

<ParamField path="multiline" type="boolean">
  If true, the input will be rendered as a multiline textarea instead of a single-line input.

  Defaults to `false`.
</ParamField>

<ParamField path="url" type="boolean | { protocol?: RegExp; message?: string }">
  If true, validates that the string is a valid URL with an allowed protocol (default http/https) and a valid top-level domain.

  You can pass an object with `protocol` to override the allowed protocol pattern, and `message` to customize the validation error message.

  Defaults to `false`.
</ParamField>

<ParamField path="disabled" type="boolean">
  Whether or not the field should be disabled.

  Defaults to `false` (not disabled).
</ParamField>
