> ## 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.

# NavShell

> The outermost block — sidebar or topbar navigation chrome that wraps every other section.

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" />

`NavShell` is the root block of every gavAI page. This page explains what NavShell renders, when to choose `topbar` versus `sidebar`, and how it wraps every other section in the tree. Reach for it whenever you need a page with persistent navigation — almost every public marketing page and every authenticated dashboard. Only one NavShell exists per page, and it must sit at the root of `tree`.

## Example

```json nav-shell.json theme={null}
{
  "block": "NavShell",
  "props": {
    "logo_url": "https://cdn.acme.co/logo.svg",
    "brand_name": "Acme Co.",
    "items": [
      { "label": "Home", "href": "/" },
      { "label": "Pricing", "href": "/pricing" }
    ],
    "variant": "topbar"
  },
  "children": [
    { "block": "Hero", "props": { "headline": "Welcome to Acme" } },
    { "block": "Footer", "props": { "copyright": "© 2026 Acme Co.", "groups": [] } }
  ]
}
```

## Props

<DefList>
  <Def term="logo_url" type="string (URL)" required>
    URL of the workspace logo displayed in the nav chrome.
  </Def>

  <Def term="brand_name" type="string" required>
    Text name of the brand, shown next to the logo or used as an accessible label.
  </Def>

  <Def term="items" type="{ label, href }[]" required>
    Ordered list of navigation links rendered in the topbar or sidebar.
  </Def>

  <Def term="variant" type="&#x22;topbar&#x22; | &#x22;sidebar&#x22;" required>
    Layout of the nav chrome. `topbar` spans the full width at the top; `sidebar` is a fixed left panel.
  </Def>

  <Def term="children" type="Block[]" required>
    The page sections nested inside the layout shell.
  </Def>
</DefList>

## Variants

Two variants cover the bulk of layouts:

<FeatureTable
  columns={[
{ key: "variant", label: "Variant" },
{ key: "when", label: "When to use" }
]}
  rows={[
{ variant: "`topbar`", when: "Public marketing pages — keeps content wide so Hero, FeaturesGrid, and Footer can stack full-width underneath." },
{ variant: "`sidebar`", when: "Authenticated portals and dashboards where users need persistent navigation across dense, tabular content like Table and KanbanBoard." }
]}
/>

## Common props

In addition to the props above, NavShell accepts the four common props every block supports: `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="Hero" href="/pageblocks/blocks/hero">
    Add a banner with headline and CTA as the first child of NavShell.
  </BrandCard>

  <BrandCard eyebrow="BLOCK" title="Footer" href="/pageblocks/blocks/footer">
    Close the page with link groups and a copyright line.
  </BrandCard>
</Columns>
