- Docs
- Components
- Layout
Inline
A horizontal flow with a gap from the space scale, that wraps when space runs out.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<div>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Import
// From the package: a build keeps only what it uses.
import { Inline } from "@qeetrix/react";
// Or from its own path.
import { Inline } from "@qeetrix/react/inline";02
Props
And every native attribute of the element it renders.
| Prop | Type | Default | What it does |
|---|---|---|---|
gap | "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "sm" | Space between children: 0 · 4 · 8 · 12 · 16 · 24 · 32 · 48 · 64px. |
align | "start" | "center" | "end" | "baseline" | "stretch" | "center" | Across. |
justify | "start" | "center" | "end" | "between" | — | Along the row. |
wrap | boolean | true | Onto new lines when space runs out. |
render | ReactElement | a <div> | A <ul> around <li>: bullets go, the list stays. |
03
Parts
Each part carries a data-slot, for tests and placement.
| data-slot | Element | What it is |
|---|---|---|
inline | <div> | data-gap, data-align, data-justify; data-wrap="false". |
04
A header row
A title at the start and its action at the end.
<Inline justify="between">
<Heading level={2} size="title-sm">Recent sign-ins</Heading>
<Button variant="ghost">View all</Button>
</Inline>