forms / stable
FieldLabel
The label, description and error rows every Kit form control shares: 12px medium label, 12px tertiary help, 12px destructive error.
LIVE PREVIEW
Loading preview…
When to use
- Building a custom field on a React Aria field component (TextField, ColorField…) so it matches Kit fields.
- Most of the time you don't: Select, ComboBox, NumberField, SearchField and DatePicker take `label`, `description` and `errorMessage` props.
Consider an alternative
- Section titles or headings — use a heading.
- Standalone captions — use text-foreground-tertiary text.
Import
import { FieldLabel } from '@revido-llc/kit';Props
Props documented by the Kit. Refer to the TypeScript types for the complete interface, including inherited props.
Related exports
FieldDescription, FieldError
Examples
Field anatomy
Label, control, description, error — wired with aria-labelledby/-describedby by React Aria.
<TextField className={fieldStyles.root} isInvalid>
<FieldLabel>Invoice reference</FieldLabel>
<div className={fieldControlVariants()}><Input className={fieldInputClassName} /></div>
<FieldDescription>Shown on the PDF.</FieldDescription>
<FieldError>Enter a full reference.</FieldError>
</TextField>Compact control
28px frame for filters and table cells.
<div className={fieldControlVariants({ size: "compact" })}>…</div>Literal anatomy 1
Static component anatomy; bind events in the consuming app.
<FieldLabel>Name</FieldLabel>Literal anatomy 2
Static component anatomy; bind events in the consuming app.
<FieldDescription>Use a short descriptive name.</FieldDescription>Static anatomy
A literal starting point; bind selection and validation in the consuming app.
<FieldError>Choose a value.</FieldError>Related components
- Label ↗
- TextField
- Select ↗
- NumberField ↗