prongs
GitHub

nav.trail

One link in a breadcrumb trail of the pages above this one. Put them in a nav with aria-label="Breadcrumb" and pass current on the last

Component

Renders

<a>

Profile

Comes from

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

Example

Preview
<Layout intent="layout.actions" aria-label="Breadcrumb">
<Action intent="nav.trail" href="/projects">Projects</Action>
<Text intent="text.meta">/</Text>
<Action intent="nav.trail" href="/projects/acme" current>Acme</Action>
</Layout>

Connections

Choosing between neighbours

  • If it is

    Use

  • One link in a breadcrumb trail of the pages above this one. Put them in a nav with aria-label="Breadcrumb" and pass current on the last

    nav.trail
  • Pages in site or app navigation

    nav.page

For registry authors

Pack intent. prongs add saas puts the saas pack’s intents in your registry. They are then yours like the starter intents: 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.trail 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.trail

    One link in a breadcrumb trail of the pages above this one. Put them in a nav with aria-label="Breadcrumb" and pass current on the last

Final classes
text-sm font-medium text-surface-muted hover:text-foreground
aria-[current]:text-foreground
Definition
TS
'nav.trail': {
kind: 'semantic',
description: 'One link in a breadcrumb trail of the pages above this one. Put them in a nav with aria-label="Breadcrumb" and pass current on the last',
refs: ['control.menu'],
notFor: [{ context: 'pages in site or app navigation', instead: 'nav.page' }],
},