Components
Field
Fields group form controls with labels, descriptions, and validation messages to provide clear context and accessibility.
Enter your full name.
Anatomy
Anatomy
import {Field, TextField} from '@staffbase/design';
<Field.Root>
<Field.Label />
<Field.Description />
{/* Form control goes here */}
<Field.Error />
</Field.Root> Examples
Required label
Invalid state
Password must be at least 8 characters.
API reference
Root
Inherits props fromBase UI Field Root
| Name | Type | Description |
|---|---|---|
children | ReactNode | The field content, usually a label, control, optional description, and optional error. |
Label
Inherits props fromBase UI Field Label
| Name | Type | Description |
|---|---|---|
children | ReactNode | The visible label text for the associated control. |
requiredLabel | string | Optional text rendered in parentheses after the label to indicate required input. |
Description
Inherits props fromBase UI Field Description
| Name | Type | Description |
|---|---|---|
children | ReactNode | Supplementary helper text that is announced with the associated control. |
Error
Inherits props fromBase UI Field Error
| Name | Type | Description |
|---|---|---|
children | ReactNode | The error message content. |
Anatomy




Properties

Behaviour


Content Guidelines
Field Label
- Use Title Case with nouns or noun phrases.
- Do not use a colon or ending punctuation.
- For required inputs, use (Required) consistently.
- Use (Optional) only when optional fields are the exception.

Placeholder Text

Description Text

Error Message
