Ark Logo
Undefined
Components
Field

Field

Provides a flexible container for form inputs, labels, and helper text.

Please enter your E-Mail

Examples

The Field component provides contexts such as invalid, disabled, required, and readOnly for form elements. While most Ark UI components natively support these contexts, you can also use the Field component with standard HTML form elements.

Input

This example shows how to use the Field component with a standard input field.

Textarea

This example illustrates how to use the Field component with a textarea element.

Select

This example demonstrates how to integrate the Field component with a select dropdown.

Using Ark Components

This example demonstrates how to integrate the Field and Checkbox components. For more examples of using the Field component with various Ark UI elements, refer to their respective documentation.

Using the Root Provider

The RootProvider component provides a context for the field. It accepts the value of the useField hook. You can leverage it to access the component state and methods from outside the field.

If you're using the RootProvider component, you don't need to use the Root component.

API Reference