Input holds the controls of a form: text fields, checkboxes, switches and sliders, and the frame they sit in.
Field gives a control its label, help text and error, and Select
picks one value from a list.
One-axis layout box: the primitive that replaces hand-written flex … wrapper divs.
gap is restricted to the named steps of the theme spacing ramp (see
Gap
), which is the
point of the prop — an off-ramp gap-2/gap-3 literal in a container is the drift it prevents.
Anything the props don't cover (padding, sizing, overflow, colour) goes through classNames; the
component deliberately grows no padding or colour props, since components own their own spacing.
There is no implicit align. Row-centering is the common case, but defaulting it would silently
restyle any consumer relying on the CSS stretch initial value.
Use asChild to project the layout onto a semantic element (<header>, <ul>, <a>).
@example
<Flex column gap='sm'>…</Flex>
<Flex gap='sm' justify='end'>…</Flex>
<Flex center classNames='h-full text-fg-subtle' role='status'>{t('empty.message')}</Flex>
Flex
column?: boolean | undefined
Stack on the block axis instead of the inline axis.
Names the control; while the root is required it ends with the required indicator, unless a
RequiredIndicator among its children places the mark itself.
Names the control; while the root is required it ends with the required indicator, unless a
RequiredIndicator among its children places the mark itself.
Text input at control size; inside a Field.Root it takes the field's id, label and description wiring. With
start or end it renders a ControlFrame holding the adornments and a bare input; data-testid and classes then
go to the frame, the ref to the input.
Names the control; while the root is required it ends with the required indicator, unless a
RequiredIndicator among its children places the mark itself.
Names the control; while the root is required it ends with the required indicator, unless a
RequiredIndicator among its children places the mark itself.
Text input at control size; inside a Field.Root it takes the field's id, label and description wiring. With
start or end it renders a ControlFrame holding the adornments and a bare input; data-testid and classes then
go to the frame, the ref to the input.
Root
16
type?: React.HTMLInputTypeAttribute | undefined
type='email'
17
'start'?: React.ReactNode
Leading content inside the control row (an Icon, or short text such as a currency).
Names the control; while the root is required it ends with the required indicator, unless a
RequiredIndicator among its children places the mark itself.
Names the control; while the root is required it ends with the required indicator, unless a
RequiredIndicator among its children places the mark itself.
Ark select over a flat option list (grouped in the popup with ItemGroup); the root takes no box so its trigger is
laid out as the parent's child. multiple keeps the popup open while choosing. The popup is at least as wide as
the trigger and grows to fit its widest option, up to the viewport's width.
Calls a defined callback function on each element of an array, and returns an array that contains the results.
@param ― callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
@param ― thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Ark select over a flat option list (grouped in the popup with ItemGroup); the root takes no box so its trigger is
laid out as the parent's child. multiple keeps the popup open while choosing. The popup is at least as wide as
the trigger and grows to fit its widest option, up to the viewport's width.
One-axis layout box: the primitive that replaces hand-written flex … wrapper divs.
gap is restricted to the named steps of the theme spacing ramp (see
Gap
), which is the
point of the prop — an off-ramp gap-2/gap-3 literal in a container is the drift it prevents.
Anything the props don't cover (padding, sizing, overflow, colour) goes through classNames; the
component deliberately grows no padding or colour props, since components own their own spacing.
There is no implicit align. Row-centering is the common case, but defaulting it would silently
restyle any consumer relying on the CSS stretch initial value.
Use asChild to project the layout onto a semantic element (<header>, <ul>, <a>).
@example
<Flex column gap='sm'>…</Flex>
<Flex gap='sm' justify='end'>…</Flex>
<Flex center classNames='h-full text-fg-subtle' role='status'>{t('empty.message')}</Flex>