# 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: [`<Action>`](https://www.prongs.dev/docs/components/action.md) · Renders: `<a>` · Profile: [UI](https://www.prongs.dev/docs/intents/ui.md) · Comes from: [SaaS pack](https://www.prongs.dev/docs/intents/packs/saas.md)

## Example

```tsx
<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>
```

## Choosing between neighbours

Find the row that describes your element, and use the intent on the right.

| If it is for… | 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` (this page) |
| Pages in site or app navigation | [`nav.page`](https://www.prongs.dev/docs/intents/nav/page.md) |

## Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

- Built from: [`control.menu`](https://www.prongs.dev/docs/intents/ui.md#control-menu)

## 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`](https://www.prongs.dev/docs/intents/ui.md#control-menu) — Plain navigation link; strong while current

  ```
  text-sm font-medium text-surface-muted hover:text-foreground
  aria-[current]:text-foreground
  ```

- `nav.trail` (this page) — 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' }],
},
```
