Input, Textarea

Frond
Text entry. Always with a Label; errors via aria-invalid and a Note.

Usage

The import, then a use to start from. Both copy as they are.

Import
import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";import { TextArea } from "@/components/ui/textarea";
Example
<div className="flex flex-col gap-2">    <Label htmlFor="domain">Custom domain</Label>    <Input        id="domain"        placeholder="docs.acme.dev"        aria-invalid={error != null}        aria-describedby="domain-help"    />    <p id="domain-help" className={error ? "text-danger text-xs" : "text-muted text-xs"}>        {error ?? "Point a CNAME record at Fern before you add it."}    </p></div>

When to use

Use it for

  • Every field has a visible Label above it, tied by htmlFor and id. A placeholder shows an example, never the label.
  • size="sm" in toolbars and dense rows; the default everywhere else.
  • TextArea for anything that runs past one line: a description, a prompt, a note.
  • A field's error sets aria-invalid and replaces its help text. An error about the whole form goes in a Note above its actions.

Avoid

  • A raw <input> or <textarea>: they miss the border, the focus ring and the invalid state.
  • Picking from a known list: use Select or SearchableDropdown.
  • On and off settings: use Switch or Checkbox.

Accessibility

Checks

  • aria-describedby points at the help or error text, so it's read with the field.
  • Forms submit on Enter, and Tab moves through the fields in reading order.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

Input

PropValues
type"text""password""email""number""search""url"
size"default""sm"
disabledboolean
VariantsDefaultSmallWithValuePasswordNumberDisabledInvalid

TextArea

PropValues
disabledboolean
VariantsDefaultWithValueDisabledInvalid

Keep going

Patterns
How components come together into pages.
Content
Write plainly with sentence case. Follow these guidelines to ensure you do so.