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

Accordion

Collapsible panels. Give one items entry per child: child N is the body of item N.

ExamplesLink to this section

Questions and answers

Accessible primitives without Radix, with a small API.

Show JSONHide JSON
{
  "version": 1,
  "root": "accordion",
  "elements": {
    "accordion": {
      "type": "Accordion",
      "props": {
        "items": [{ "title": "Why Base UI?" }, { "title": "Why Neon?" }],
        "openFirst": true
      },
      "children": ["base-ui", "neon"]
    },
    "base-ui": {
      "type": "Text",
      "props": {
        "text": "Accessible primitives without Radix, with a small API."
      }
    },
    "neon": {
      "type": "Text",
      "props": {
        "text": "Serverless Postgres with branching and scale to zero."
      }
    }
  }
}

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
itemsrequiredobject[]1–50 items
items[].titlerequiredstringmax 160 chars
openFirstboolean—

RulesLink to this section

  • Give exactly one child per entry in items: child N is the body of item N.
  • Do not give an Accordion repeat: the bodies pair with the items by their place in the spec, so write each body out. An Accordion with repeat still draws, with a warning.

ChildrenLink to this section

Accordion shows its children, in order.

It emits no events.

Edit this page on GitHub
PreviousTabsNextSeparator

On this page

  • Examples
  • Props
  • Rules
  • Children