HStack
HStack is <Stack direction="row"> named at the call site. Reach for it when the row direction
is fixed — toolbars, avatar-and-name rows, button groups.
Loading playground…
What it is
A sugar wrapper. HStack renders <Stack direction="row" /> and accepts every other Stack prop
unchanged. Use it when the call site reads more clearly with the named primitive than with an
explicit direction="row".
Install
HStack is exported from usemotif. No separate install.
API
HStack
stablefunction HStack(props: Omit<StackProps, "direction">): JSX.Element
…StackPropsOmit<StackProps, "direction">
Every Stack prop except `direction`. `gap`, `alignItems`, `justifyContent`, and all Box style props apply normally.
Examples
Avatar-and-name row:
A toolbar with a Spacer pushing actions to the right: