> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gavai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# KanbanBoard

> Drag-drop workflow board — records become cards, grouped into columns by a status field.

export const Def = ({term, type, defaultValue, required, children}) => <>
    <dt className="gv-def-list__term">
      <span className="gv-def-list__name">{term}</span>
      {type && <span className="gv-def-list__type">{type}</span>}
      {required && <span className="gv-def-list__required">required</span>}
      {defaultValue !== undefined && <span className="gv-def-list__default">
          default <code>{defaultValue}</code>
        </span>}
    </dt>
    <dd className="gv-def-list__description">{children}</dd>
  </>;

export const DefList = ({children}) => <dl className="gv-def-list">{children}</dl>;

export const BrandCard = ({eyebrow, title, href, icon, badge, cta, featured = false, horizontal = false, children}) => {
  const classes = ["gv-card", featured && "gv-card--featured", horizontal && "gv-card--horizontal"].filter(Boolean).join(" ");
  const inner = <>
      {icon && <span className="gv-card__icon" aria-hidden="true">
          <Icon icon={icon} />
        </span>}
      <div className="gv-card__main">
        {(eyebrow || badge) && <div className="gv-card__meta">
            {eyebrow && <Eyebrow label={eyebrow} tone="muted" />}
            {badge && <span className="gv-card__badge">{badge}</span>}
          </div>}
        <h3 className="gv-card__title">{title}</h3>
        {children && <div className="gv-card__body">{children}</div>}
        {cta && <span className="gv-card__cta">
            {cta}
            <svg className="gv-card__cta-arrow" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
              <line x1="7" y1="17" x2="17" y2="7" />
              <polyline points="7 7 17 7 17 17" />
            </svg>
          </span>}
      </div>
    </>;
  return href ? <a className={classes} href={href}>
      {inner}
    </a> : <div className={classes}>{inner}</div>;
};

export const FeatureTable = ({columns, rows, featuredRow, caption, variant}) => <div className={`gv-feature-table ${variant ? `gv-feature-table--${variant}` : ""}`}>
    <table>
      {caption && <caption className="gv-feature-table__caption">{caption}</caption>}
      <thead>
        <tr>
          {columns.map(col => <th key={col.key} scope="col">
              <span className="gv-feature-table__header">{col.label}</span>
            </th>)}
        </tr>
      </thead>
      <tbody>
        {rows.map((row, i) => {
  const rowClass = [i === featuredRow ? "gv-feature-table__row--featured" : "", row.chosen ? "gv-feature-table__row--chosen" : ""].filter(Boolean).join(" ");
  return <tr key={i} className={rowClass}>
              {columns.map(col => {
    const v = row[col.key];
    if (variant === "tradeoff" && Array.isArray(v)) {
      const pill = col.key === "pros" ? "gv-feature-table__pill--pro" : col.key === "cons" ? "gv-feature-table__pill--con" : "";
      return <td key={col.key}>
                      {v.map((item, j) => <span key={j} className={`gv-feature-table__pill ${pill}`}>{item}</span>)}
                    </td>;
    }
    return <td key={col.key}>{v}</td>;
  })}
            </tr>;
})}
      </tbody>
    </table>
  </div>;

export const Eyebrow = ({label, tone = "default"}) => <div className={`gv-eyebrow gv-eyebrow--${tone}`}>
    <span className="gv-eyebrow__bar" aria-hidden="true" />
    <span className="gv-eyebrow__label">{label}</span>
  </div>;

<Eyebrow label="BLOCK" />

`KanbanBoard` turns any schema table into a drag-drop workflow board. This page explains the props, how rows are grouped into columns, and what happens when a user drags a card. Records become cards; cards are grouped into columns by the value of a single field. You declare which field defines the columns and which fields appear on each card. Dragging a card between columns updates that field on the underlying record. Reach for it whenever you have a workflow with discrete states — task tracking, sales pipelines, content workflows.

## Example

```json kanban-board.json theme={null}
{
  "block": "KanbanBoard",
  "props": {
    "schema_table": "tasks",
    "group_by": "status",
    "columns": ["todo", "in_progress", "done"],
    "card_fields": ["title", "owner", "due_at"]
  }
}
```

## Props

<DefList>
  <Def term="schema_table" type="string" required>
    Name of the workspace schema table whose rows become cards.
  </Def>

  <Def term="group_by" type="string" required>
    Column name whose value determines which board column a card belongs to.
  </Def>

  <Def term="columns" type="string[]" required>
    Ordered list of values for the `group_by` field. Each value becomes a board column, left to right.
  </Def>

  <Def term="card_fields" type="string[]" required>
    Fields to display on each card. Keep short — typically 2–4 fields.
  </Def>
</DefList>

## How it binds to data

On render, the runtime issues a `runQuery` against `schema_table` and groups the returned rows by `group_by`. Each distinct value in `columns` becomes a swimlane header. Cards whose `group_by` value is not listed in `columns` are filtered out — pin every state you want visible to a `columns` entry.

When a user drags a card from one column to another, the runtime writes the new value back to the `group_by` field on that record.

<Note>
  The drag-write behavior is not fully specified in the available source. Treat the field update as automatic for prototyping, but check the live block schema via the [Builder MCP](/mcp/builder-mcp) `get_block_schema` tool before shipping a production board.
</Note>

## Patterns

<FeatureTable
  columns={[
{ key: "use", label: "Use case" },
{ key: "config", label: "Typical config" }
]}
  rows={[
{ use: "Task tracking", config: "`group_by: status`, columns `[todo, in_progress, done]`, cards show `title, owner, due_at`." },
{ use: "Sales pipeline", config: "`group_by: stage`, columns `[lead, qualified, won, lost]`, cards show `company, value, owner`." },
{ use: "Content workflow", config: "`group_by: state`, columns `[draft, review, published]`, cards show `title, author, publish_date`." }
]}
/>

## Common props

In addition to the KanbanBoard-specific props, every block accepts `id`, `class_overrides`, `visible_if`, and `analytics_event`. See [common props on the PageBlocks overview](/pageblocks/overview#common-props).

## Where to go next

<Columns cols={2}>
  <BrandCard eyebrow="BLOCK" title="Table" href="/pageblocks/blocks/table">
    Same data, list view — when grouping by state isn't what you want.
  </BrandCard>

  <BrandCard eyebrow="PAGEBLOCKS" title="PageBlocks overview" href="/pageblocks/overview">
    Back to the full block catalogue.
  </BrandCard>
</Columns>
