Fidely UI v1 beta is now available!. 🚀

Field

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

Usage

import { Field } from '@fidely-ui/react'
<Field.Root>
  <Field.Label>
    <Field.RequiredIndicator />
  </Field.Label>
  <Input />
  <Field.HelperText />
  <Field.ErrorText />
</Field.Root>

Examples

Pass the invalid prop to Field.Root and use the Field.Error to indicate that the field is invalid.

This is an error text

Helper Text

Use the Field.HelperText to add helper text to the field.

This is a helper text

Disable

You can use the disabled prop to disable the field.

Textarea

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

You can pass the autoresize prop to the Textarea component to enable automatic resizing as the user types.

On this page