Stack

A row or column of children with a gap from the theme's spacing scale.

Example

tsx
<Stack direction="row" gap="sm" wrap align="center">
  <Button>Save</Button>
  <Button variant="outline">Preview</Button>
  <Button variant="ghost">Cancel</Button>
</Stack>

Usage

Pages are built on the server: import the tags from @dash/server and return the tree. The browser runtime draws it.
tsx
import { Stack, Button } from "@dash/server";

Props

StackProps

Also takes everything LayoutProps does.
Prop
Type
Description
direction"row" | "column"
gapSpacing | (string & {}) | numberNamed gaps use client theme tokens; CSS lengths remain an escape hatch.
wrapboolean
fullWidthboolean
distribution"equal"
align"start" | "center" | "end" | "stretch"
justify"start" | "center" | "end" | "between" | "around"

LayoutProps

Prop
Type
Description
surface"background" | "card" | "muted"Theme surface used behind the content.
paddingSpacing
fill"viewport" | "parent"Fill the viewport or the height of a sized parent.
scroll"auto" | "hidden"
growboolean
NextGrid
On this page