Files
supabase/apps/design-system/content/docs/fragments/page-nav.mdx
Joshen LimandDanny White 51bd16d9ca Joshenlim/fe 5064 update database triggers to use new nav (#53356)
## Context

Update database triggers to use the new page components + add
deprecation notices to legacy components
There's no visual change here

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-11-16 10:51:14 +07:00

56 lines
1.8 KiB
Plaintext

---
title: Page Nav
description: Sub-navigation row for page chrome, placed below breadcrumbs and outside PageHeader.
fragment: true
---
<ComponentPreview
name="page-nav-demo"
description="Sub-navigation with NavMenu tabs"
align="start"
className="p-0"
padded={false}
peekCode
wide
/>
## Usage
```tsx
import { NavMenu, NavMenuItem } from 'ui'
import { PageNav } from 'ui-patterns/PageNav'
```
```tsx
<PageNav>
<NavMenu>
<NavMenuItem active>Overview</NavMenuItem>
<NavMenuItem>Logs</NavMenuItem>
</NavMenu>
</PageNav>
```
## Sub-components
- `PageNav` — container for `NavMenu` tab navigation. The bottom border always spans the full width.
## Props
| Prop | Type | Default | Description |
| ------ | ------------------------------------------- | -------- | -------------------------------------------------------------------- |
| `size` | `'small' \| 'default' \| 'large' \| 'full'` | `'full'` | Width and padding of the nav content, same values as `PageContainer` |
`PageNav` uses `PageContainer` for width and padding. It does not depend on `PageHeader`.
Set `size` to match the sibling `PageHeader` and page content so the tabs line up with the title and body. With `full` (the default), the tabs span edge to edge with the page chrome's `px-4` padding. Any other size uses `PageContainer`'s max-width and padding, so on wide viewports the tabs stay centered with the rest of the page.
```tsx
<PageHeader size="large">…</PageHeader>
<PageNav size="large">
<NavMenu>…</NavMenu>
</PageNav>
<PageContainer size="large">…</PageContainer>
```
Place it directly below `PageBreadcrumbs` and outside `PageHeader`. For legacy pages, `PageHeaderNavigationTabs` remains available on `PageHeader`.