prongs
GitHub

nav.page

A link to a page in site or app navigation, including Sign in. Pass current on the page you are on

Component

Renders

<a>

Profile

Comes from

starter
Read https://www.prongs.dev/docs/intents/nav/page.md and tell me whether nav.page fits what I am building.

Example

Preview
{pages.map((page) => (
<Action key={page.href} intent="nav.page" href={page.href} current={page.href === pathname}>
{page.title}
</Action>
))}

Connections

Choosing between neighbours

  • If it is

    Use

  • A link to a page in site or app navigation, including Sign in. Pass current on the page you are on

    nav.page
  • Switching between views of the same content

    nav.view
  • Other pages in the site navigation

    rather than nav.home
    nav.page
  • A link in site navigation

    rather than nav.item
    nav.page
  • Pages in site navigation

    rather than nav.step
    nav.page
  • Pages in site navigation

    rather than nav.paging
    nav.page
  • Pages in site or app navigation

    rather than nav.trail
    nav.page

For registry authors

Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.

What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.

How nav.page resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

  • control.menu

    Plain navigation link; strong while current

    text-sm font-medium text-surface-muted hover:text-foreground
    aria-[current]:text-foreground
  • nav.page

    A link to a page in site or app navigation, including Sign in. Pass current on the page you are on

Final classes
text-sm font-medium text-surface-muted hover:text-foreground
aria-[current]:text-foreground
Definition
TS
'nav.page': {
kind: 'semantic',
description: 'A link to a page in site or app navigation, including Sign in. Pass current on the page you are on',
refs: ['control.menu'],
notFor: [
{
context: 'switching between views of the same content',
instead: 'nav.view',
},
],
},