Field

Label, control, description and error as one unit.

Shown to freelancers on every project you publish.

Optional
<Field.Group>
	<Field.Root>
		<Field.Label htmlFor="workspace-name">Client name</Field.Label>
		<Input id="workspace-name" />
		<Field.Description>Shown to freelancers on every project.</Field.Description>
	</Field.Root>
	<Field.Root data-invalid>
		<Field.Label htmlFor="contact-email">Contact email</Field.Label>
		<Input id="contact-email" aria-invalid />
		<Field.Error>Enter a complete email address.</Field.Error>
	</Field.Root>
</Field.Group>

Field.Set and Field.Legend wrap a group of related fields in the right semantics; Field.Separator takes a label for an "Optional" divider.

API

Field.Root

PropTypeDefault
invalidboolean
orientation"horizontal" | "responsive" | "vertical""vertical"
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <div> prop. Source: field/components/field-root.tsx.

Field.Content

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <div> prop. Source: field/components/field-content.tsx.

Field.Description

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <p> prop. Source: field/components/field-description.tsx.

Field.Error

PropTypeDefault
errors({ message?: string | undefined; } | undefined)[]

Plus every <div> prop. Source: field/components/field-error.tsx.

Field.Group

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <div> prop. Source: field/components/field-group.tsx.

Field.Label

Plus the DOM props of the element it renders. Source: field/components/field-label.tsx.

Field.Legend

PropTypeDefault
variant"label" | "legend""legend"

Plus every <legend> prop. Source: field/components/field-legend.tsx.

Field.Separator

PropTypeDefault
childrenReactNode

Plus every <div> prop. Source: field/components/field-separator.tsx.

Field.Set

Plus every <fieldset> prop. Source: field/components/field-set.tsx.

Field.Title

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <div> prop. Source: field/components/field-title.tsx.