---
title: "Short text"
description: "Collect one line of text with an optional character limit."
group: "Build forms"
order: 0
type: "reference"
parent: "fields"
keywords:
  - "short_text"
  - "text input"
  - "maxLength"
updated: "2026-07-14"
---

The short-text field collects one line of text and stores it as a string.

## Options

| Option | Type | Default | Behavior |
| --- | --- | --- | --- |
| `maxLength` | `number` | 2,000 character hard cap | Sets a smaller explicit character limit |
| `placeholder` | `string` | none | Shows a hint inside the empty input |
| `required` | `boolean` | `false` | Rejects blank or whitespace-only text |

Fillo trims leading and trailing whitespace when it validates a response. There's no `minLength` in the current schema — use `required` for a non-empty answer, or a custom field for a richer rule.

## Add a short-text field

In the dashboard, select **Add block**, choose **Short text**, then set the label, placeholder, required state, and character limit.

```ts
const nameField = {
  id: "name",
  kind: "short_text",
  label: "Your name",
  required: true,
  maxLength: 120,
  placeholder: "Ada Lovelace",
} as const;
```

## Related

- [Long text](/docs/fields/long-text): Collect an answer that needs several lines.
- [Fields](/docs/fields): Compare every field kind and shared option.
- [Custom UI](/docs/custom-ui): Add host-owned validation and rendering when the built-in rule isn't enough.
