Skip to Content
DocsResourcesShowcase

Field

Used to add labels, help text, and error messages to form fields.

SourceStorybookRecipeArk

import { Field } from '@saas-ui/react/field'
<Field.Root>
  <Field.Label />
  <Field.Control />
  <Field.HelperText />
  <Field.ErrorText />
</Field.Root>

Use the helperText prop to add helper text to the field.

This is a helper text

Use the invalid and errorText to indicate that the field is invalid.

This is an error text

Use the disabled prop to disable the field.

Here's how to use the field component with a textarea.

Here's how to use the field component with a native select.

PropDefaultType
asChild
boolean

Use the provided child element as the default rendered element, combining their props and behavior.

For more details, read our Composition guide.
disabled
boolean

Indicates whether the field is disabled.

ids
ElementIds

The ids of the field parts.

invalid
boolean

Indicates whether the field is invalid.

readOnly
boolean

Indicates whether the field is read-only.

required
boolean

Indicates whether the field is required.

as
React.ElementType

The underlying element to render.

unstyled
boolean

Whether to remove the component's style.

Previous

Empty State

Next

File Upload