Columns

Put 2–3 components side by side for comparison.

Primitive

≈ 615 tokens per use (tool 291 · guidance 150 · typical payload 174)How token costs are estimated

Example: Columns

Should we move from Starter to Team?

Starter

Current
Price
$12 / seat / mo
Seats
Up to 10
SSO
No
Support
Email

Team

Price
$20 / seat / mo
Seats
Unlimited
SSO
Yes
Support
Priority chat

When to use

  • The user is comparing 2–3 options, and seeing them side by side helps: two plans, three flights.

When not to use

  • You're comparing many items across many fields. Use a Data Table.
  • The items are long. Long content side by side is hard to read, so stack it instead.

How it works

items lists 2–6 GenUI components by catalog name. They sit in 2 or 3 columns on wide screens and stack into one column on phones. Like every layout, Columns renders through the Renderer, may hold one more layout inside, and passes each interactive child's result up as { child, result }. For mixed items or items of different widths, use a Grid.

How the agent should use it

  • Give every item the same component and the same fields, in the same order, so the columns line up.
  • Keep the columns to the same kind of item, so they line up.

Installation

npx shadcn@latest add https://your-site.com/r/layout-columns.json

Usage

lib/genui-catalog.ts
import { LayoutColumns } from "@/components/genui/layout-columns"

export const catalog = {
  show_columns: LayoutColumns,
  show_summary: SummaryCard,
} satisfies GenUICatalog

With LangGraph

Push it with ui.push({ name: "show_columns", props: { toolCallId, ...args } }, { message }), and render it with the Renderer.

Schema

PropTypeNotes
columns2 | 3Default 2. Always one column on phones
items{ component, props, id? }[]2–6 components

Host props: status and className. renderChild is injected by the Renderer.

Source

On this page