All components

INPUTS / COMPONENTS

Text field

Collect one precise piece of information.

Live component19 documented props

About text field

Text fields are elements where users can input alphanumeric characters, commonly used in forms and search bars. They include features like labels, placeholders, and validation indicators to guide users in providing accurate information. Password fields provide secure entry, and multiline text fields accommodate longer passages of text.

01

Anatomy

Shared parts, named consistently.

  1. 1
    Text Field inputRequired

    The input for the Text Field.

  2. 2
    LabelRequired

    The label for the Text Field.

  3. 3
    Asterisk

    An asterisk is used to signify the field is required.

  4. 4
    Placeholder

    Placeholder text.

  5. 5
    Helper message

    A string below the input to provide additional context about the Text Field. When in an error state, the helper message will turn red.

  6. 6
    Before slot

    A fixed-size slot to place an icon or button.

  7. 7
    After slot

    A fixed-size slot to place an icon or button.

  8. 8
    Prefix slot

    A slot to place a prefix string like currency type.

  9. 9
    Suffix slot

    A slot to place a suffix string like a measurement unit.

Try the default

A working example with the shared V1 visual language.

Use a clear, recognizable value.

When to use

Use a persistent visible label. Reserve placeholders for examples; connect instructions and errors to the input.

Tab focuses; native editing, selection, and input-type behavior remain available.

Related components

Source & adaptation

V1 semantic colors, DM Sans typography, compact controls, and responsive layouts. The API table describes this implementation; source design notes may use earlier API terminology.

components/ui.tsx