artifacts.space/Docs
Sign in

Get started

  • Introduction
  • Quickstart
  • Client setup

Reference

  • MCP reference
  • Formats
  • Themes

Work together

  • Sharing, teams, and agents

Run it

  • Limits and quotas
  • Self-hosting

Earlier formats

  • JSON Render
  • Components

    Layout

    • Section
    • Stack
    • Grid
    • Card
    • Tabs
    • Accordion
    • Separator
    • Box

    Content

    • Heading
    • Text
    • Markdown
    • Code
    • Callout
    • Badge
    • List
    • Steps
    • Link
    • Quote
    • Icon
    • Avatar
    • AvatarGroup
    • Kbd
    • Rating

    Data

    • Table
    • Metric
    • Chart
    • KeyValue
    • Progress
    • Timeline
    • Diagram

    Planning

    • Board
    • Calendar

    Inputs

    • Checklist
    • Checkbox
    • Select
    • Switch
    • Slider
    • Button
    • Input
    • Textarea

    Media

    • Image
    • File
    • Placeholder
  • Dynamic props and actions
  • Charts
  • Section templates
  • Validation
  • Stout guarantees
  • Playground
  • Prompting your agent
artifacts.space
DocsSourceSign inCreate accountSupportPrivacyTerms

© 2026 Webrenew LLC

Components · Layout

Stack

Lays children out vertically (default) or horizontally. Horizontal stacks wrap on narrow screens.

ExamplesLink to this section

Horizontal, small gap
apiwebbreaking
Show JSONHide JSON
{
  "version": 1,
  "root": "stack",
  "elements": {
    "stack": {
      "type": "Stack",
      "props": { "direction": "horizontal", "gap": "sm" },
      "children": ["api", "web", "breaking"]
    },
    "api": { "type": "Badge", "props": { "label": "api" } },
    "web": { "type": "Badge", "props": { "label": "web", "tone": "info" } },
    "breaking": {
      "type": "Badge",
      "props": { "label": "breaking", "tone": "danger" }
    }
  }
}
Vertical, large gap

Stacks lay children out top to bottom by default.

Use gap to set the space between them.

Show JSONHide JSON
{
  "version": 1,
  "root": "stack",
  "elements": {
    "stack": {
      "type": "Stack",
      "props": { "gap": "lg" },
      "children": ["first", "second"]
    },
    "first": {
      "type": "Text",
      "props": { "text": "Stacks lay children out top to bottom by default." }
    },
    "second": {
      "type": "Text",
      "props": {
        "text": "Use gap to set the space between them.",
        "tone": "muted"
      }
    }
  }
}

PropsLink to this section

Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.

PropTypeLimits and defaults
direction"vertical" | "horizontal"—
gap"none" | "sm" | "md" | "lg"—
align"start" | "center" | "end" | "stretch"—

RulesLink to this section

  • Horizontal stacks wrap on narrow screens.

ChildrenLink to this section

Stack shows its children, in order.

It emits no events.

Edit this page on GitHub
PreviousSectionNextGrid

On this page

  • Examples
  • Props
  • Rules
  • Children