prongs
GitHub

action.navigate

Goes to another page or place, from inside a sentence or on its own: an inline link, Learn more, Terms, Forgot password?

Component

Renders

<a>

Profile

Comes from

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

Example

Preview

Read the privacy policy before you sign up.

<Text intent="text.body">
Read the <Action intent="action.navigate" href="/privacy">privacy policy</Action> before you sign up.
</Text>

Code that says visit, go, home points here. prongs check warns when an element with this intent has a handler or label that points somewhere else.

Connections

Choosing between neighbours

  • If it is

    Use

  • Goes to another page or place, from inside a sentence or on its own: an inline link, Learn more, Terms, Forgot password?

    action.navigate
  • Going back to a step of a flow

    action.command
  • Secondary links to other pages

    rather than action.start
    action.navigate
  • A link inside a sentence

    rather than action.more
    action.navigate

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 action.navigate 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.link

    Inline text link

    font-medium text-primary underline-offset-4 hover:underline
    focus-visible:underline focus-visible:outline-none
    aria-disabled:pointer-events-none aria-disabled:opacity-50
    data-[tone=danger]:text-destructive
  • action.navigate

    Goes to another page or place, from inside a sentence or on its own: an inline link, Learn more, Terms, Forgot password?

Final classes
font-medium text-primary underline-offset-4 hover:underline
focus-visible:underline focus-visible:outline-none
aria-disabled:pointer-events-none aria-disabled:opacity-50
data-[tone=danger]:text-destructive
Definition
TS
'action.navigate': {
kind: 'semantic',
description: 'Goes to another page or place, from inside a sentence or on its own: an inline link, Learn more, Terms, Forgot password?',
refs: ['control.link'],
keywords: ['visit', 'go', 'home'],
notFor: [
{ context: 'going back to a step of a flow', instead: 'action.command' },
],
},