Row
Row creates guttered horizontal grid layouts.
@duskmoon-dev/components/row Usage
When to use
- Use it to build predictable page, toolbar, panel, or grid structure.
- Keep layout primitives responsible for geometry and let child components own behavior.
Implementation notes
Features
Documents spacing, responsive behavior, and nested regions used to build larger screens.
Examples keep predictable dimensions so the surrounding UI does not jump while content changes.
Row is most often configured through `align`, `justify`, `gutter`, `wrap`.
Renders flex row with gutter, align, justify, and wrap classes
Feature Demos
Feature demos are authored for the component page, then supplemented with behavior scenarios from the component test coverage.
Basic usage
Import the component stylesheet and Row from its package subpath, then render it with the core props.
import "@duskmoon-dev/components/styles.css";
import { Row } from "@duskmoon-dev/components/row";
export function Example() {
return (<Row gutter={[12, 12]} align="middle" justify="space-between">
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
</Row>);
} Renders flex row with gutter, align, justify, and wrap classes
test-backedRow scenario from the component test coverage: renders flex row with gutter, align, justify, and wrap classes.
import "@duskmoon-dev/components/styles.css";
import { Row } from "@duskmoon-dev/components/row";
export function RowRendersFlexRowWithDemo() {
return (<Row gutter={[12, 12]} align="middle" justify="space-between">
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
</Row>);
} Theme aware
Docs previews inherit the DuskMoon data-theme value. Use the header switch to compare light and dark rendering.
<div data-theme="sunshine">
<Row gutter={[12, 12]} align="middle" justify="space-between">
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
</Row>
</div>
<div data-theme="moonlight">
<Row gutter={[12, 12]} align="middle" justify="space-between">
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
<div style={{ flex: "0 0 29.167%" }}>span 7</div>
</Row>
</div> API
The API reference below lists every parsed exported type or interface for Row. Start with `align`, `justify`, `gutter`, `wrap` for common usage.
packages/components/src/components/row/Row.types.ts
Scenarios: packages/components/src/components/row/Row.test.tsx | Prop | Type | Required | Description |
|---|---|---|---|
align | RowAlign | No | align configures Row. |
justify | RowJustify | No | justify configures Row. |
gutter | RowGutter | No | gutter configures Row. |
wrap | boolean | No | wrap configures Row. |
children | ReactNode | No | children configures Row. |
"top" | "middle" | "bottom" | "stretch" | "start" | "end" | "center" | "space-around" | "space-between" | "space-evenly" number | [number, number]