BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/nexvyn/nav-menu

Nav Menu

nexvyn/nav-menu
FreeComponent

A vertical navigation list with two-layer proximity highlight (active route + hover), weight-shift labels, and status dots for new/updated items.

Live preview

live · rendered by the registry
Rendered by nexvyn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.nexvyn.dev/r/nav-menu.json

Source

components/ui/nav-menu.tsxui.nexvyn.dev/r/nav-menu.json · first 6 KB
1'use client'
2
3import {
4 cloneElement,
5 createContext,
6 forwardRef,
7 isValidElement,
8 useCallback,
9 useContext,
10 useEffect,
11 useMemo,
12 useRef,
13 type HTMLAttributes,
14 type ReactNode,
15} from 'react'
16import { Slot } from '@radix-ui/react-slot'
17import { motion, useMotionValue, useReducedMotion, useSpring, type MotionValue } from 'motion/react'
18import { cn } from '@/lib/utils'
19import { springs } from '@/lib/motion-tokens'
20import {
21 useProximityHighlight,
22 ProximityHighlight,
23 type ItemRect,
24} from '@/lib/hooks/use-proximity-highlight'
25import { WeightShiftText } from '@/components/ui/weight-shift-text'
26
27interface NavMenuContextValue {
28 activeSlug: string | null
29 nextIndex: () => number
30 registerItem: (index: number, el: HTMLElement | null) => void
31}
32
33const NavMenuContext = createContext<NavMenuContextValue | null>(null)
34
35function useNavMenuCtx(componentName: string) {
36 const ctx = useContext(NavMenuContext)
37 if (!ctx) throw new Error(`${componentName} must be used within NavMenu`)
38 return ctx
39}
40
41interface NavMenuContentContextValue {
42 activeIndex: number | null
43 setActiveIndex: (i: number | null) => void
44 highlightX: ReturnType<typeof import('motion/react').useSpring>
45 highlightSize: MotionValue<number>
46 highlightOpacity: ReturnType<typeof import('motion/react').useSpring>
47 axis: 'x' | 'y'
48 registerItem: (index: number, el: HTMLElement | null) => void
49}
50
51const NavMenuContentContext = createContext<NavMenuContentContextValue | null>(null)
52
53function useNavMenuContentCtx(componentName: string) {
54 const ctx = useContext(NavMenuContentContext)
55 if (!ctx) throw new Error(`${componentName} must be used within NavMenuContent`)
56 return ctx
57}
58
59export interface NavMenuProps extends HTMLAttributes<HTMLElement> {
60 children: ReactNode
61 activeSlug: string | null
62 'aria-label'?: string
63}
64
65export const NavMenu = forwardRef<HTMLElement, NavMenuProps>(
66 ({ children, activeSlug, 'aria-label': ariaLabel = 'Main', className, ...props }, ref) => {
67 const navRef = useRef<HTMLElement>(null)
68 const activeItemRectRef = useRef<ItemRect | null>(null)
69
70 const {
71 activeIndex,
72 setActiveIndex,
73 registerItem,
74 handlers,
75 highlightX,
76 highlightSize,
77 highlightOpacity,
78 axis,
79 } = useProximityHighlight(navRef, { axis: 'y' })
80
81 const indexRef = useRef(0)
82 const nextIndex = useCallback(() => {
83 const idx = indexRef.current
84 indexRef.current += 1
85 return idx
86 }, [])
87
88// … truncated

What it pulls in

npm packages

  • motion
  • @radix-ui/react-slot

Files it writes

  • components/ui/nav-menu.tsx
  • components/ui/weight-shift-text.tsx
  • lib/hooks/use-proximity-highlight.tsx
  • lib/motion-tokens.ts

Facts

Registry
nexvyn
Type
registry:ui
Access
Free
Files written
4
Licence
MIT
In the index
at or before 2026-08-10
Last confirmed
today

Go to the source

Docs on nexvyn ui.nexvyn.dev Nexvyn/Nexvyn-ui on GitHub Raw registry item This item as JSON

More from nexvyn

All 40 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionnexvynComponentsFree1 dep
Action Buttonaction-buttonnexvynComponentsFree3 deps · 4 files
Adaptive Actionsadaptive-actionsnexvynComponentsFree1 dep
AI Inputai-inputnexvynComponentsFree1 dep · 2 files
BadgebadgenexvynComponentsFree2 deps · 2 files
Bars Themebars-themenexvynComponentsFree1 dep · 3 files
Bounce Sidebarbounce-sidebarnexvynComponentsFree1 dep · 2 files
BreadcrumbsbreadcrumbsnexvynComponentsFree1 dep · 2 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex