nav.item
The title of an item in a collection, opening its page. The link covers the item, so the whole item can be pressed; give the item position: relative
Read https://www.prongs.dev/docs/intents/nav/item.md and tell me whether nav.item fits what I am building.Navigation intents
Example
<Layout intent="layout.item" className="relative">
<Text intent="heading.item">
<Action intent="nav.item" href="/somewhere">{post.title}</Action>
</Text>
<Text intent="text.caption">{post.summary}</Text>
</Layout>Connections
Choosing between neighbours
If it is
Use
The title of an item in a collection, opening its page. The link covers the item, so the whole item can be pressed; give the item position: relative
nav.itemA link in site navigation
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.item 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.linkInline 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
nav.itemThe title of an item in a collection, opening its page. The link covers the item, so the whole item can be pressed; give the item position: relative
text-foreground no-underline after:absolute after:inset-0 after:rounded-lg after:content-['']
font-medium 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 text-foreground no-underline after:absolute after:inset-0 after:rounded-lg after:content-['']
'nav.item': {
kind: 'semantic',
description: 'The title of an item in a collection, opening its page. The link covers the item, so the whole item can be pressed; give the item position: relative',
refs: ['control.link'],
binding: {
classes: 'text-foreground no-underline after:absolute after:inset-0 after:rounded-lg after:content-[\'\']',
},
notFor: [{ context: 'a link in site navigation', instead: 'nav.page' }],
},