> From the [Strife developer docs](https://strife.app/docs/reference/field-reference/fields.text). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# fields.text()

Single-line text input. The most commonly used field — stores a plain string.

Single-line text field. Maps to editor `{ name: 'str-input', type: 'text' }` — the same wire shape documented in Text.

## Example

```ts
fields.text({
  label: 'Heading',
  localizable: true,
  placeholder: 'Enter a heading…',
  spellcheck: true,
})
```

## Options

| Option         | Type             | Required | Description                                                                                 |
| -------------- | ---------------- | -------- | ------------------------------------------------------------------------------------------- |
| `label`        | `string`         | Yes      | Label shown to editors in Strife Studio.                                                    |
| `description`  | `string`         | No       | Tooltip shown to editors.                                                                   |
| `localizable`  | `boolean`        | No       | When `true`, output is `Record<string, string>` (one value per locale) instead of `string`. |
| `searchable`   | `boolean`        | No       | Include in the team's search index.                                                         |
| `filterable`   | `boolean`        | No       | Allow filtering content lists by this value.                                                |
| `protected`    | `boolean`        | No       | Restrict editing to users with the appropriate permission.                                  |
| `propertyName` | `string`         | No       | Override the stored property name. Defaults to the field's key.                             |
| `placeholder`  | `string \| null` | No       | Hint text shown in the empty input.                                                         |
| `spellcheck`   | `boolean`        | No       | Enable/disable browser spellcheck on the input.                                             |

## Output type

`string`, or `Record<string, string>` when `localizable: true`.

## See also

* [Text](https://strife.app/docs/reference/fields/text.md) — the same editor, documented from the Strife Studio UI side.
