Files
supabase/apps/design-system/content/docs/components/nav-menu.mdx
2e3e10826f docs(design-system): deprecate legacy Studio page chrome (#53571)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Problem

Legacy Studio page chrome (`PageLayout`, `Scaffold*`, in-header
breadcrumbs/tabs) is still easy to reach for new work. #53356 deprecated
a few of those APIs; the rest still lacked `@deprecated` notices.

## Solution

Add `@deprecated` JSDoc on the remaining Studio page-chrome helpers and
strengthen the existing `PageHeaderBreadcrumb` /
`PageHeaderNavigationTabs` notices, with site-relative
`/design-system/docs/...` links. Also point Nav Menu docs at `PageNav`
instead of `PageLayout`.

## Review instructions

1. Skim JSDoc on `apps/studio/components/layouts/Scaffold.tsx` and
`PageLayout/PageHeader.tsx`.
2. Confirm `PageHeaderBreadcrumb` and `PageHeaderNavigationTabs` in
`packages/ui-patterns/src/PageHeader/index.tsx` point at
`/design-system/docs/fragments/...`.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-1c9eee9e-93f6-4914-9d1d-76a7bbd511be?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-1c9eee9e-93f6-4914-9d1d-76a7bbd511be&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Danny White <dnywh@users.noreply.github.com>
2026-11-18 16:42:04 +07:00

59 lines
1.4 KiB
Plaintext

---
title: NavMenu
description: A horizontal list of related views within a consistent context.
component: true
---
<Admonition type="warning" title="Consider renaming">
This component is titled very similarly to the [Navigation Menu](../components/navigation-menu)
component. Consider renaming it to something like TabMenu or
[UnderlineNav](https://primer.style/product/components/underline-nav/).
</Admonition>
<ComponentPreview
name="nav-menu-demo"
className="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"
peekCode
wide
/>
## Usage
Use `NavMenu` as sub-navigation inside [Page Nav](../fragments/page-nav). See
[Layout patterns](../ui-patterns/layout).
```tsx
import { NavMenu, NavMenuItem } from 'ui'
```
```tsx
<NavMenu>
<NavMenuItem active={true}>
<Link href="#">Overview</Link>
</NavMenuItem>
<NavMenuItem active={false}>
<Link href="#">Documentation</Link>
</NavMenuItem>
</NavMenu>
```
## Examples
### With counter badges
You may include counter badges to indicate the number of items within a tab, for example the amount of buckets in storage.
<ComponentPreview
name="nav-menu-badges"
className="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"
/>
### With icons
You may include icons to more clearly represent the content of each tab. Every tab should have an icon (or no icon).
<ComponentPreview
name="nav-menu-icons"
className="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"
/>