Skip to main content

Field

A form field wrapper that provides accessible labeling, error handling, and state management for form inputs.

Choose a unique username for your account.

Features

Installation

typo3 ui:add field

Read more about installing Components and Primitives.

Examples

Required Field

Mark a field as required.

With Description

Add helpful description text below the input.

Must be at least 8 characters long.

Invalid State

Indicate that the field has an error and display an error message.

The password must be at least 8 characters long.

Disabled Field

Disable the entire field.

With Checkbox

Use with the Checkbox component.

Anatomy

<primitives:field.root>
    <primitives:field.label />
    <primitives:field.control asChild="{true}">
        <!-- Your form input here -->
    </primitives:field.control>
    <primitives:field.description />
    <primitives:field.error />
</primitives:field.root>