Layout

Inline

Horizontal layout that wraps by default.

Server-renderable1 export

Arranges children in a row. Wrapping is on by default because a horizontal row that cannot wrap is the usual cause of overflow on narrow viewports.

Import

import { Inline } from "@abbainitiative/ui";

Also available from the subpath entry @abbainitiative/ui/inline.

This component has no state and no event handlers, so it renders inside a Server Component without a client boundary of your own.

Examples

Row of controls

<Inline gap={2}>
  <Button>Save</Button>
  <Button variant="outline">Cancel</Button>
</Inline>

Props

Inline props. All native attributes of the underlying element are also accepted and forwarded.
PropTypeDefaultDescription
gapSpaceTokenSpace between children.
wrapbooleantrueAllow children to wrap onto additional lines.
align"start" | "center" | "end" | "stretch" | "baseline""center"Cross-axis alignment.
justify"start" | "center" | "end" | "between" | "around" | "evenly"Main-axis distribution.

Accessibility

  • Purely presentational; contributes no semantics.