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>
The icon at this size's scale instead of its scope's (one icon in a denser or roomier control).
size='lg'
spin?: boolean | undefined
Rotates continuously, as a busy indicator; still under prefers-reduced-motion. Spinners share one phase (the
animation starts at the wall clock's second), so several in a list turn together.
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>