@neynar/ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/accordion.d.ts +1 -25
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +240 -46
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert.d.ts +73 -11
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +44 -10
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/avatar.d.ts +117 -33
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +50 -71
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +231 -49
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +189 -71
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/calendar.d.ts +197 -40
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +7 -22
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/carousel.d.ts +369 -99
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +110 -38
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/collapsible.d.ts +246 -61
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts +207 -159
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/command.d.ts +336 -67
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/container.d.ts +159 -64
- package/dist/components/ui/container.d.ts.map +1 -1
- package/dist/components/ui/context-menu.d.ts +321 -39
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/date-picker.d.ts +113 -86
- package/dist/components/ui/date-picker.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +106 -25
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/drawer.d.ts +388 -59
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +521 -74
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/empty-state.d.ts +148 -76
- package/dist/components/ui/empty-state.d.ts.map +1 -1
- package/dist/components/ui/hover-card.d.ts +253 -34
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +143 -44
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +0 -8
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/menubar.d.ts +288 -46
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +444 -127
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/pagination.d.ts +342 -66
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/popover.d.ts +0 -8
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/progress.d.ts +88 -30
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/radio-group.d.ts +189 -45
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/resizable.d.ts +178 -62
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +180 -21
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +382 -60
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/separator.d.ts +52 -39
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +144 -27
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +81 -31
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/skeleton.d.ts +94 -32
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts +37 -31
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +280 -46
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/stack.d.ts +289 -148
- package/dist/components/ui/stack.d.ts.map +1 -1
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts +1 -2
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/container.stories.d.ts +2 -3
- package/dist/components/ui/stories/container.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/empty-state.stories.d.ts +2 -2
- package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -2
- package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/stack.stories.d.ts +1 -1
- package/dist/components/ui/stories/text-field.stories.d.ts +7 -1
- package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -1
- package/dist/components/ui/switch.d.ts +44 -38
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts +33 -0
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -22
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/text-field.d.ts +170 -84
- package/dist/components/ui/text-field.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +106 -29
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/theme-toggle.d.ts +190 -65
- package/dist/components/ui/theme-toggle.d.ts.map +1 -1
- package/dist/components/ui/theme.d.ts +107 -23
- package/dist/components/ui/theme.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +143 -67
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +118 -30
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +152 -28
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/typography.d.ts +452 -134
- package/dist/components/ui/typography.d.ts.map +1 -1
- package/dist/index.js +9388 -8281
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/llms.txt +173 -3
- package/package.json +5 -2
- package/src/components/ui/accordion.tsx +112 -27
- package/src/components/ui/alert-dialog.tsx +401 -46
- package/src/components/ui/alert.tsx +114 -11
- package/src/components/ui/aspect-ratio.tsx +69 -14
- package/src/components/ui/avatar.tsx +179 -33
- package/src/components/ui/badge.tsx +74 -75
- package/src/components/ui/breadcrumb.tsx +335 -50
- package/src/components/ui/button.tsx +198 -90
- package/src/components/ui/calendar.tsx +867 -43
- package/src/components/ui/card.tsx +140 -33
- package/src/components/ui/carousel.tsx +529 -98
- package/src/components/ui/chart.tsx +222 -1
- package/src/components/ui/checkbox.tsx +176 -38
- package/src/components/ui/collapsible.tsx +321 -67
- package/src/components/ui/combobox.tsx +284 -83
- package/src/components/ui/command.tsx +527 -67
- package/src/components/ui/container.tsx +217 -65
- package/src/components/ui/context-menu.tsx +716 -51
- package/src/components/ui/date-picker.tsx +228 -38
- package/src/components/ui/dialog.tsx +270 -33
- package/src/components/ui/drawer.tsx +546 -67
- package/src/components/ui/dropdown-menu.tsx +657 -74
- package/src/components/ui/empty-state.tsx +241 -82
- package/src/components/ui/hover-card.tsx +328 -39
- package/src/components/ui/input.tsx +207 -44
- package/src/components/ui/label.tsx +98 -8
- package/src/components/ui/menubar.tsx +587 -54
- package/src/components/ui/navigation-menu.tsx +557 -128
- package/src/components/ui/pagination.tsx +561 -79
- package/src/components/ui/popover.tsx +119 -8
- package/src/components/ui/progress.tsx +131 -29
- package/src/components/ui/radio-group.tsx +260 -51
- package/src/components/ui/resizable.tsx +289 -63
- package/src/components/ui/scroll-area.tsx +377 -66
- package/src/components/ui/select.tsx +545 -60
- package/src/components/ui/separator.tsx +146 -40
- package/src/components/ui/sheet.tsx +348 -31
- package/src/components/ui/sidebar.tsx +471 -29
- package/src/components/ui/skeleton.tsx +114 -32
- package/src/components/ui/slider.tsx +77 -31
- package/src/components/ui/sonner.tsx +574 -46
- package/src/components/ui/stack.tsx +423 -101
- package/src/components/ui/switch.tsx +78 -39
- package/src/components/ui/table.tsx +170 -4
- package/src/components/ui/tabs.tsx +108 -22
- package/src/components/ui/text-field.tsx +226 -81
- package/src/components/ui/textarea.tsx +180 -29
- package/src/components/ui/theme-toggle.tsx +313 -65
- package/src/components/ui/theme.tsx +117 -23
- package/src/components/ui/toggle-group.tsx +280 -69
- package/src/components/ui/toggle.tsx +124 -35
- package/src/components/ui/tooltip.tsx +239 -29
- package/src/components/ui/typography.tsx +1115 -165
|
@@ -3,20 +3,40 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
|
3
3
|
/**
|
|
4
4
|
* NavigationMenu - A collection of links for navigating websites
|
|
5
5
|
*
|
|
6
|
-
* A
|
|
7
|
-
*
|
|
8
|
-
* keyboard navigation, accessibility compliance,
|
|
6
|
+
* A flexible navigation component built on Radix UI primitives that provides
|
|
7
|
+
* sophisticated navigation patterns with dropdown content support. Features full
|
|
8
|
+
* keyboard navigation, accessibility compliance, controlled/uncontrolled states,
|
|
9
|
+
* and responsive design. Supports both horizontal and vertical orientations.
|
|
9
10
|
*
|
|
10
|
-
* @component
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
13
13
|
* // Basic navigation with dropdown
|
|
14
14
|
* <NavigationMenu>
|
|
15
15
|
* <NavigationMenuList>
|
|
16
|
-
* <NavigationMenuItem>
|
|
16
|
+
* <NavigationMenuItem value="products">
|
|
17
17
|
* <NavigationMenuTrigger>Products</NavigationMenuTrigger>
|
|
18
18
|
* <NavigationMenuContent>
|
|
19
|
-
* <
|
|
19
|
+
* <div className="grid gap-3 p-6 w-[400px]">
|
|
20
|
+
* <NavigationMenuLink href="/products/analytics">Analytics</NavigationMenuLink>
|
|
21
|
+
* <NavigationMenuLink href="/products/dashboard">Dashboard</NavigationMenuLink>
|
|
22
|
+
* </div>
|
|
23
|
+
* </NavigationMenuContent>
|
|
24
|
+
* </NavigationMenuItem>
|
|
25
|
+
* </NavigationMenuList>
|
|
26
|
+
* </NavigationMenu>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* // Controlled navigation with state
|
|
32
|
+
* const [value, setValue] = React.useState<string | undefined>();
|
|
33
|
+
*
|
|
34
|
+
* <NavigationMenu value={value} onValueChange={setValue}>
|
|
35
|
+
* <NavigationMenuList>
|
|
36
|
+
* <NavigationMenuItem value="features">
|
|
37
|
+
* <NavigationMenuTrigger>Features</NavigationMenuTrigger>
|
|
38
|
+
* <NavigationMenuContent>
|
|
39
|
+
* <NavigationMenuLink href="/features">All Features</NavigationMenuLink>
|
|
20
40
|
* </NavigationMenuContent>
|
|
21
41
|
* </NavigationMenuItem>
|
|
22
42
|
* </NavigationMenuList>
|
|
@@ -25,14 +45,18 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
|
25
45
|
*
|
|
26
46
|
* @example
|
|
27
47
|
* ```tsx
|
|
28
|
-
* // Simple navigation links
|
|
48
|
+
* // Simple navigation links without dropdowns
|
|
29
49
|
* <NavigationMenu>
|
|
30
50
|
* <NavigationMenuList>
|
|
31
51
|
* <NavigationMenuItem>
|
|
32
|
-
* <NavigationMenuLink href="/about">
|
|
52
|
+
* <NavigationMenuLink href="/about" className={navigationMenuTriggerStyle()}>
|
|
53
|
+
* About
|
|
54
|
+
* </NavigationMenuLink>
|
|
33
55
|
* </NavigationMenuItem>
|
|
34
56
|
* <NavigationMenuItem>
|
|
35
|
-
* <NavigationMenuLink href="/contact">
|
|
57
|
+
* <NavigationMenuLink href="/contact" className={navigationMenuTriggerStyle()}>
|
|
58
|
+
* Contact
|
|
59
|
+
* </NavigationMenuLink>
|
|
36
60
|
* </NavigationMenuItem>
|
|
37
61
|
* </NavigationMenuList>
|
|
38
62
|
* </NavigationMenu>
|
|
@@ -40,11 +64,11 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
|
40
64
|
*
|
|
41
65
|
* @example
|
|
42
66
|
* ```tsx
|
|
43
|
-
* // With Next.js Link using asChild
|
|
67
|
+
* // With Next.js Link integration using asChild
|
|
44
68
|
* <NavigationMenu>
|
|
45
69
|
* <NavigationMenuList>
|
|
46
70
|
* <NavigationMenuItem>
|
|
47
|
-
* <NavigationMenuLink asChild>
|
|
71
|
+
* <NavigationMenuLink asChild className={navigationMenuTriggerStyle()}>
|
|
48
72
|
* <Link href="/dashboard">Dashboard</Link>
|
|
49
73
|
* </NavigationMenuLink>
|
|
50
74
|
* </NavigationMenuItem>
|
|
@@ -54,14 +78,32 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
|
54
78
|
*
|
|
55
79
|
* @example
|
|
56
80
|
* ```tsx
|
|
57
|
-
* //
|
|
81
|
+
* // Vertical navigation menu
|
|
82
|
+
* <NavigationMenu orientation="vertical">
|
|
83
|
+
* <NavigationMenuList>
|
|
84
|
+
* <NavigationMenuItem value="settings">
|
|
85
|
+
* <NavigationMenuTrigger>Settings</NavigationMenuTrigger>
|
|
86
|
+
* <NavigationMenuContent>
|
|
87
|
+
* <div className="p-4 w-[200px]">
|
|
88
|
+
* <NavigationMenuLink href="/settings/profile">Profile</NavigationMenuLink>
|
|
89
|
+
* <NavigationMenuLink href="/settings/account">Account</NavigationMenuLink>
|
|
90
|
+
* </div>
|
|
91
|
+
* </NavigationMenuContent>
|
|
92
|
+
* </NavigationMenuItem>
|
|
93
|
+
* </NavigationMenuList>
|
|
94
|
+
* </NavigationMenu>
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```tsx
|
|
99
|
+
* // Without viewport for custom dropdown styling
|
|
58
100
|
* <NavigationMenu viewport={false}>
|
|
59
101
|
* <NavigationMenuList>
|
|
60
|
-
* <NavigationMenuItem>
|
|
61
|
-
* <NavigationMenuTrigger>
|
|
102
|
+
* <NavigationMenuItem value="docs">
|
|
103
|
+
* <NavigationMenuTrigger>Documentation</NavigationMenuTrigger>
|
|
62
104
|
* <NavigationMenuContent>
|
|
63
|
-
* <div className="p-
|
|
64
|
-
* <NavigationMenuLink href="/
|
|
105
|
+
* <div className="bg-white border rounded-lg shadow-lg p-6 w-[500px]">
|
|
106
|
+
* <NavigationMenuLink href="/docs/getting-started">Getting Started</NavigationMenuLink>
|
|
65
107
|
* </div>
|
|
66
108
|
* </NavigationMenuContent>
|
|
67
109
|
* </NavigationMenuItem>
|
|
@@ -69,248 +111,523 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
|
69
111
|
* </NavigationMenu>
|
|
70
112
|
* ```
|
|
71
113
|
*
|
|
72
|
-
* @
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* // With custom timing and active indicator
|
|
117
|
+
* <NavigationMenu
|
|
118
|
+
* delayDuration={100}
|
|
119
|
+
* skipDelayDuration={200}
|
|
120
|
+
* defaultValue="home"
|
|
121
|
+
* >
|
|
122
|
+
* <NavigationMenuList>
|
|
123
|
+
* <NavigationMenuItem value="home">
|
|
124
|
+
* <NavigationMenuTrigger>Home</NavigationMenuTrigger>
|
|
125
|
+
* <NavigationMenuContent>
|
|
126
|
+
* <NavigationMenuLink href="/">Homepage</NavigationMenuLink>
|
|
127
|
+
* </NavigationMenuContent>
|
|
128
|
+
* </NavigationMenuItem>
|
|
129
|
+
* <NavigationMenuIndicator />
|
|
130
|
+
* </NavigationMenuList>
|
|
131
|
+
* </NavigationMenu>
|
|
132
|
+
* ```
|
|
80
133
|
*
|
|
134
|
+
* @accessibility
|
|
135
|
+
* - Full keyboard navigation with arrow keys for horizontal/vertical menu traversal
|
|
136
|
+
* - Tab key moves between focusable menu items and maintains logical tab sequence
|
|
137
|
+
* - Escape key closes open dropdown menus and returns focus to trigger
|
|
138
|
+
* - Enter and Space keys activate triggers and follow links
|
|
139
|
+
* - Home/End keys jump to first/last menu items
|
|
140
|
+
* - ARIA expanded/collapsed states automatically managed for triggers
|
|
141
|
+
* - ARIA current="page" support through active prop on links
|
|
142
|
+
* - Focus management with automatic focus trapping in dropdown content
|
|
143
|
+
* - Screen reader announcements for state changes and navigation
|
|
144
|
+
* - Semantic HTML nav structure for navigation landmarks
|
|
145
|
+
* - Proper ARIA labeling and relationships between triggers and content
|
|
146
|
+
*
|
|
147
|
+
* @see {@link NavigationMenuList} Container for menu items
|
|
148
|
+
* @see {@link NavigationMenuItem} Individual menu item wrapper
|
|
149
|
+
* @see {@link NavigationMenuTrigger} Dropdown trigger button
|
|
150
|
+
* @see {@link NavigationMenuContent} Dropdown content panel
|
|
151
|
+
* @see {@link NavigationMenuLink} Navigation link component
|
|
81
152
|
* @see {@link https://ui.shadcn.com/docs/components/navigation-menu} shadcn/ui Navigation Menu
|
|
82
153
|
* @see {@link https://www.radix-ui.com/primitives/docs/components/navigation-menu} Radix UI Navigation Menu
|
|
83
154
|
* @since 1.0.0
|
|
84
155
|
*/
|
|
85
|
-
/**
|
|
86
|
-
* Main NavigationMenu component props
|
|
87
|
-
*
|
|
88
|
-
* @param viewport - Whether to render the navigation viewport container. Defaults to true.
|
|
89
|
-
* Set to false for simpler dropdown styling without viewport positioning.
|
|
90
|
-
* @param className - Additional CSS classes to apply to the navigation menu root
|
|
91
|
-
* @param children - NavigationMenuList and NavigationMenuViewport components
|
|
92
|
-
*/
|
|
93
156
|
declare function NavigationMenu({ className, children, viewport, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
94
|
-
/** Whether to render the navigation viewport container for dropdown positioning */
|
|
157
|
+
/** Whether to render the navigation viewport container for dropdown content positioning. @default true */
|
|
95
158
|
viewport?: boolean;
|
|
96
159
|
}): import("react/jsx-runtime").JSX.Element;
|
|
97
160
|
/**
|
|
98
161
|
* NavigationMenuList - Container for navigation menu items
|
|
99
162
|
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
163
|
+
* The list container that groups NavigationMenuItem components within a NavigationMenu.
|
|
164
|
+
* Renders as an unordered list (ul) by default and provides the foundational layout
|
|
165
|
+
* structure for the navigation menu. Supports both horizontal and vertical orientations
|
|
166
|
+
* based on the parent NavigationMenu orientation prop.
|
|
102
167
|
*
|
|
103
|
-
* @component
|
|
104
168
|
* @example
|
|
105
169
|
* ```tsx
|
|
106
170
|
* <NavigationMenuList>
|
|
107
|
-
* <NavigationMenuItem>
|
|
108
|
-
* <
|
|
171
|
+
* <NavigationMenuItem value="products">
|
|
172
|
+
* <NavigationMenuTrigger>Products</NavigationMenuTrigger>
|
|
173
|
+
* <NavigationMenuContent>
|
|
174
|
+
* <NavigationMenuLink href="/products">All Products</NavigationMenuLink>
|
|
175
|
+
* </NavigationMenuContent>
|
|
109
176
|
* </NavigationMenuItem>
|
|
110
177
|
* <NavigationMenuItem>
|
|
111
|
-
* <NavigationMenuLink href="/about">
|
|
178
|
+
* <NavigationMenuLink href="/about" className={navigationMenuTriggerStyle()}>
|
|
179
|
+
* About
|
|
180
|
+
* </NavigationMenuLink>
|
|
112
181
|
* </NavigationMenuItem>
|
|
113
182
|
* </NavigationMenuList>
|
|
114
183
|
* ```
|
|
115
184
|
*
|
|
116
|
-
* @
|
|
185
|
+
* @example
|
|
186
|
+
* ```tsx
|
|
187
|
+
* // Custom list element using asChild
|
|
188
|
+
* <NavigationMenuList asChild>
|
|
189
|
+
* <div className="custom-nav-container">
|
|
190
|
+
* <NavigationMenuItem>
|
|
191
|
+
* <NavigationMenuLink href="/home">Home</NavigationMenuLink>
|
|
192
|
+
* </NavigationMenuItem>
|
|
193
|
+
* </div>
|
|
194
|
+
* </NavigationMenuList>
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* @accessibility
|
|
198
|
+
* - Renders as semantic ul element by default for proper list structure
|
|
199
|
+
* - Maintains proper ARIA relationships with contained NavigationMenuItem elements
|
|
200
|
+
* - Supports keyboard navigation between contained items
|
|
201
|
+
*
|
|
202
|
+
* @see {@link NavigationMenuItem} Individual menu item containers
|
|
203
|
+
* @see {@link NavigationMenu} Parent navigation menu component
|
|
117
204
|
* @since 1.0.0
|
|
118
205
|
*/
|
|
119
206
|
declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
120
207
|
/**
|
|
121
208
|
* NavigationMenuItem - Individual navigation menu item container
|
|
122
209
|
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
210
|
+
* A list item container that wraps a single navigation element within a NavigationMenuList.
|
|
211
|
+
* Each item can contain either a NavigationMenuTrigger with NavigationMenuContent for dropdown
|
|
212
|
+
* functionality, or a NavigationMenuLink for direct navigation. The value prop is used for
|
|
213
|
+
* controlled state management and active item tracking.
|
|
126
214
|
*
|
|
127
|
-
* @component
|
|
128
215
|
* @example
|
|
129
216
|
* ```tsx
|
|
130
|
-
* //
|
|
131
|
-
* <NavigationMenuItem>
|
|
217
|
+
* // Dropdown navigation item with controlled value
|
|
218
|
+
* <NavigationMenuItem value="products">
|
|
132
219
|
* <NavigationMenuTrigger>Products</NavigationMenuTrigger>
|
|
133
220
|
* <NavigationMenuContent>
|
|
134
|
-
* <
|
|
221
|
+
* <div className="grid gap-3 p-6 w-[400px] grid-cols-2">
|
|
222
|
+
* <NavigationMenuLink href="/products/analytics">Analytics</NavigationMenuLink>
|
|
223
|
+
* <NavigationMenuLink href="/products/dashboard">Dashboard</NavigationMenuLink>
|
|
224
|
+
* </div>
|
|
135
225
|
* </NavigationMenuContent>
|
|
136
226
|
* </NavigationMenuItem>
|
|
137
227
|
* ```
|
|
138
228
|
*
|
|
139
229
|
* @example
|
|
140
230
|
* ```tsx
|
|
141
|
-
* // Simple link
|
|
231
|
+
* // Simple navigation link item
|
|
142
232
|
* <NavigationMenuItem>
|
|
143
|
-
* <NavigationMenuLink href="/contact">
|
|
233
|
+
* <NavigationMenuLink href="/contact" className={navigationMenuTriggerStyle()}>
|
|
234
|
+
* Contact Us
|
|
235
|
+
* </NavigationMenuLink>
|
|
236
|
+
* </NavigationMenuItem>
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* ```tsx
|
|
241
|
+
* // With custom container element using asChild
|
|
242
|
+
* <NavigationMenuItem asChild>
|
|
243
|
+
* <div className="custom-menu-item">
|
|
244
|
+
* <NavigationMenuLink href="/about">About</NavigationMenuLink>
|
|
245
|
+
* </div>
|
|
144
246
|
* </NavigationMenuItem>
|
|
145
247
|
* ```
|
|
146
248
|
*
|
|
147
|
-
* @
|
|
249
|
+
* @accessibility
|
|
250
|
+
* - Renders as semantic li element by default for proper list item structure
|
|
251
|
+
* - Associates with parent NavigationMenu state through value prop
|
|
252
|
+
* - Maintains focus management within navigation sequences
|
|
253
|
+
* - Supports both direct links and trigger/content dropdown patterns
|
|
254
|
+
*
|
|
255
|
+
* @see {@link NavigationMenuTrigger} Dropdown trigger button
|
|
256
|
+
* @see {@link NavigationMenuContent} Dropdown content panel
|
|
257
|
+
* @see {@link NavigationMenuLink} Navigation link component
|
|
258
|
+
* @see {@link NavigationMenuList} Parent list container
|
|
148
259
|
* @since 1.0.0
|
|
149
260
|
*/
|
|
150
261
|
declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
262
|
+
/**
|
|
263
|
+
* Navigation menu trigger styling configuration using CVA (Class Variance Authority)
|
|
264
|
+
*
|
|
265
|
+
* Provides consistent button styling for navigation triggers with interactive states.
|
|
266
|
+
* Can be applied to NavigationMenuLink components for uniform trigger-style appearance.
|
|
267
|
+
*
|
|
268
|
+
* @variant base - Default trigger button styling with hover, focus, and disabled states
|
|
269
|
+
* - Interactive states: hover (accent background), focus (accent + ring), disabled (opacity + pointer-events)
|
|
270
|
+
* - Open state: Special styling when dropdown is open (accent background with opacity)
|
|
271
|
+
* - Focus visible: Ring indicator for keyboard navigation accessibility
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* ```tsx
|
|
275
|
+
* // Apply to NavigationMenuLink for consistent button styling
|
|
276
|
+
* <NavigationMenuLink href="/docs" className={navigationMenuTriggerStyle()}>
|
|
277
|
+
* Documentation
|
|
278
|
+
* </NavigationMenuLink>
|
|
279
|
+
* ```
|
|
280
|
+
*
|
|
281
|
+
* @see {@link NavigationMenuTrigger} Uses this styling automatically
|
|
282
|
+
* @see {@link NavigationMenuLink} Can use this for consistent trigger appearance
|
|
283
|
+
*/
|
|
151
284
|
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
152
285
|
/**
|
|
153
|
-
* NavigationMenuTrigger -
|
|
286
|
+
* NavigationMenuTrigger - Interactive button that opens dropdown navigation content
|
|
154
287
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
288
|
+
* A button component that toggles NavigationMenuContent visibility when activated.
|
|
289
|
+
* Automatically includes a chevron down icon that rotates when the dropdown is open.
|
|
290
|
+
* Features comprehensive keyboard and mouse interaction support with proper ARIA
|
|
291
|
+
* state management. The asChild prop allows composition with custom button components.
|
|
158
292
|
*
|
|
159
|
-
* @component
|
|
160
293
|
* @example
|
|
161
294
|
* ```tsx
|
|
162
|
-
*
|
|
295
|
+
* // Basic trigger with dropdown content
|
|
296
|
+
* <NavigationMenuItem value="products">
|
|
297
|
+
* <NavigationMenuTrigger>Products</NavigationMenuTrigger>
|
|
298
|
+
* <NavigationMenuContent>
|
|
299
|
+
* <div className="p-6 w-[400px]">
|
|
300
|
+
* <NavigationMenuLink href="/products/analytics">Analytics</NavigationMenuLink>
|
|
301
|
+
* <NavigationMenuLink href="/products/dashboard">Dashboard</NavigationMenuLink>
|
|
302
|
+
* </div>
|
|
303
|
+
* </NavigationMenuContent>
|
|
304
|
+
* </NavigationMenuItem>
|
|
163
305
|
* ```
|
|
164
306
|
*
|
|
165
307
|
* @example
|
|
166
308
|
* ```tsx
|
|
167
|
-
* //
|
|
309
|
+
* // Custom trigger styling with asChild
|
|
168
310
|
* <NavigationMenuTrigger asChild>
|
|
169
|
-
* <Button variant="outline"
|
|
311
|
+
* <Button variant="outline" size="lg">
|
|
312
|
+
* Custom Features Button
|
|
313
|
+
* </Button>
|
|
170
314
|
* </NavigationMenuTrigger>
|
|
171
315
|
* ```
|
|
172
316
|
*
|
|
173
|
-
* @
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* -
|
|
177
|
-
* -
|
|
317
|
+
* @example
|
|
318
|
+
* ```tsx
|
|
319
|
+
* // Trigger with additional icons
|
|
320
|
+
* <NavigationMenuTrigger className="gap-2">
|
|
321
|
+
* <StarIcon className="size-4" />
|
|
322
|
+
* Featured Items
|
|
323
|
+
* </NavigationMenuTrigger>
|
|
324
|
+
* ```
|
|
178
325
|
*
|
|
179
|
-
* @
|
|
180
|
-
*
|
|
326
|
+
* @accessibility
|
|
327
|
+
* - Automatic ARIA expanded state management (expanded="true/false")
|
|
328
|
+
* - Button role with proper keyboard activation (Enter/Space keys)
|
|
329
|
+
* - Focus visible ring indicator for keyboard navigation
|
|
330
|
+
* - Screen reader accessible button semantics and state announcements
|
|
331
|
+
* - Disabled state handling with pointer-events and opacity
|
|
332
|
+
* - Chevron icon marked as aria-hidden for screen reader exclusion
|
|
333
|
+
*
|
|
334
|
+
* @see {@link NavigationMenuContent} Content panel this trigger controls
|
|
335
|
+
* @see {@link NavigationMenuItem} Required parent container
|
|
336
|
+
* @see {@link navigationMenuTriggerStyle} Styling function used internally
|
|
181
337
|
* @since 1.0.0
|
|
182
338
|
*/
|
|
183
339
|
declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
184
340
|
/**
|
|
185
|
-
* NavigationMenuContent - Dropdown content panel for navigation
|
|
341
|
+
* NavigationMenuContent - Dropdown content panel for navigation items
|
|
186
342
|
*
|
|
187
|
-
* The content container that appears when a NavigationMenuTrigger is activated.
|
|
188
|
-
* Supports enter/exit animations,
|
|
189
|
-
*
|
|
343
|
+
* The collapsible content container that appears when a NavigationMenuTrigger is activated.
|
|
344
|
+
* Supports smooth enter/exit animations, flexible positioning (with or without viewport),
|
|
345
|
+
* and comprehensive interaction handling. The content automatically manages focus and
|
|
346
|
+
* provides multiple ways to dismiss the dropdown (Escape key, outside clicks, etc.).
|
|
190
347
|
*
|
|
191
|
-
* @component
|
|
192
348
|
* @example
|
|
193
349
|
* ```tsx
|
|
350
|
+
* // Grid layout with navigation links
|
|
194
351
|
* <NavigationMenuContent>
|
|
195
|
-
* <div className="grid gap-3 p-6 w-[
|
|
196
|
-
* <NavigationMenuLink href="/
|
|
197
|
-
*
|
|
352
|
+
* <div className="grid gap-3 p-6 w-[500px] grid-cols-2">
|
|
353
|
+
* <NavigationMenuLink href="/products/analytics">
|
|
354
|
+
* <div className="text-sm font-medium">Analytics</div>
|
|
355
|
+
* <p className="text-sm text-muted-foreground">Track your performance</p>
|
|
356
|
+
* </NavigationMenuLink>
|
|
357
|
+
* <NavigationMenuLink href="/products/dashboard">
|
|
358
|
+
* <div className="text-sm font-medium">Dashboard</div>
|
|
359
|
+
* <p className="text-sm text-muted-foreground">Manage your data</p>
|
|
360
|
+
* </NavigationMenuLink>
|
|
198
361
|
* </div>
|
|
199
362
|
* </NavigationMenuContent>
|
|
200
363
|
* ```
|
|
201
364
|
*
|
|
202
365
|
* @example
|
|
203
366
|
* ```tsx
|
|
204
|
-
* // Complex layout
|
|
367
|
+
* // Complex multi-column layout
|
|
205
368
|
* <NavigationMenuContent>
|
|
206
|
-
* <div className="grid gap-6 p-
|
|
207
|
-
* <div>
|
|
208
|
-
* <h4>
|
|
209
|
-
* <NavigationMenuLink href="/
|
|
369
|
+
* <div className="grid gap-6 p-8 w-[800px] grid-cols-3">
|
|
370
|
+
* <div className="space-y-2">
|
|
371
|
+
* <h4 className="text-sm font-medium">Features</h4>
|
|
372
|
+
* <NavigationMenuLink href="/features/auth">Authentication</NavigationMenuLink>
|
|
373
|
+
* <NavigationMenuLink href="/features/api">API Management</NavigationMenuLink>
|
|
374
|
+
* </div>
|
|
375
|
+
* <div className="space-y-2">
|
|
376
|
+
* <h4 className="text-sm font-medium">Tools</h4>
|
|
377
|
+
* <NavigationMenuLink href="/tools/cli">Command Line</NavigationMenuLink>
|
|
378
|
+
* <NavigationMenuLink href="/tools/sdk">SDK</NavigationMenuLink>
|
|
210
379
|
* </div>
|
|
211
380
|
* </div>
|
|
212
381
|
* </NavigationMenuContent>
|
|
213
382
|
* ```
|
|
214
383
|
*
|
|
215
|
-
* @
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```tsx
|
|
386
|
+
* // With custom interaction handlers
|
|
387
|
+
* <NavigationMenuContent
|
|
388
|
+
* onEscapeKeyDown={(e) => {
|
|
389
|
+
* console.log('Escape pressed');
|
|
390
|
+
* // Don't prevent default to allow normal closing behavior
|
|
391
|
+
* }}
|
|
392
|
+
* onPointerDownOutside={(e) => {
|
|
393
|
+
* console.log('Clicked outside');
|
|
394
|
+
* // e.preventDefault() would prevent closing
|
|
395
|
+
* }}
|
|
396
|
+
* >
|
|
397
|
+
* <div className="p-6 w-[300px]">
|
|
398
|
+
* <NavigationMenuLink href="/help">Help Center</NavigationMenuLink>
|
|
399
|
+
* </div>
|
|
400
|
+
* </NavigationMenuContent>
|
|
401
|
+
* ```
|
|
402
|
+
*
|
|
403
|
+
* @example
|
|
404
|
+
* ```tsx
|
|
405
|
+
* // Force mounted for animation control
|
|
406
|
+
* <NavigationMenuContent forceMount>
|
|
407
|
+
* <div className="p-4 w-[250px] animate-in slide-in-from-top">
|
|
408
|
+
* <NavigationMenuLink href="/docs">Documentation</NavigationMenuLink>
|
|
409
|
+
* </div>
|
|
410
|
+
* </NavigationMenuContent>
|
|
411
|
+
* ```
|
|
219
412
|
*
|
|
220
|
-
* @
|
|
221
|
-
*
|
|
413
|
+
* @accessibility
|
|
414
|
+
* - Automatic focus management when content opens and closes
|
|
415
|
+
* - Escape key support for dismissing dropdown (can be customized via onEscapeKeyDown)
|
|
416
|
+
* - Outside interaction handling for dismissing (clicks and focus outside)
|
|
417
|
+
* - Proper ARIA relationships with trigger button
|
|
418
|
+
* - Content is accessible via keyboard navigation within the dropdown
|
|
419
|
+
* - Screen reader announcements for state changes
|
|
420
|
+
*
|
|
421
|
+
* @see {@link NavigationMenuTrigger} Button that controls this content
|
|
422
|
+
* @see {@link NavigationMenuLink} Links typically used within content
|
|
423
|
+
* @see {@link NavigationMenuViewport} Viewport container for positioning
|
|
222
424
|
* @since 1.0.0
|
|
223
425
|
*/
|
|
224
426
|
declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
225
427
|
/**
|
|
226
|
-
* NavigationMenuViewport -
|
|
428
|
+
* NavigationMenuViewport - Positioned container for dropdown content
|
|
227
429
|
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
* enter/exit animations.
|
|
430
|
+
* The viewport container that manages positioning, sizing, and animation of NavigationMenuContent
|
|
431
|
+
* panels. It automatically calculates dimensions based on content size and provides smooth
|
|
432
|
+
* enter/exit animations. The viewport uses CSS custom properties for dynamic sizing and
|
|
433
|
+
* positioning. Only rendered when the viewport prop is true (default) on NavigationMenu.
|
|
231
434
|
*
|
|
232
|
-
* @
|
|
233
|
-
*
|
|
435
|
+
* @example
|
|
436
|
+
* ```tsx
|
|
437
|
+
* // Typically used automatically by NavigationMenu
|
|
438
|
+
* <NavigationMenu>
|
|
439
|
+
* <NavigationMenuList>
|
|
440
|
+
* // menu items
|
|
441
|
+
* </NavigationMenuList>
|
|
442
|
+
* // NavigationMenuViewport is rendered automatically
|
|
443
|
+
* </NavigationMenu>
|
|
444
|
+
* ```
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* ```tsx
|
|
448
|
+
* // Custom viewport styling
|
|
449
|
+
* <NavigationMenuViewport className="border-2 border-primary shadow-xl" />
|
|
450
|
+
* ```
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```tsx
|
|
454
|
+
* // Force mounted viewport for animation control
|
|
455
|
+
* <NavigationMenuViewport forceMount className="custom-animation" />
|
|
456
|
+
* ```
|
|
234
457
|
*
|
|
235
458
|
* @accessibility
|
|
236
|
-
* - Handles focus containment for dropdown content
|
|
237
|
-
* - Manages viewport announcements for screen readers
|
|
459
|
+
* - Handles focus containment for dropdown content within the viewport
|
|
460
|
+
* - Manages viewport size announcements for screen readers
|
|
461
|
+
* - Provides proper z-index layering for dropdown content
|
|
462
|
+
* - Maintains content visibility and accessibility during animations
|
|
238
463
|
*
|
|
239
|
-
* @
|
|
464
|
+
* @see {@link NavigationMenu} Parent component that controls viewport rendering
|
|
465
|
+
* @see {@link NavigationMenuContent} Content rendered within this viewport
|
|
240
466
|
* @since 1.0.0
|
|
241
467
|
*/
|
|
242
468
|
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
|
|
243
469
|
/**
|
|
244
470
|
* NavigationMenuLink - Styled link component for navigation menus
|
|
245
471
|
*
|
|
246
|
-
* A link component designed specifically for navigation menus
|
|
247
|
-
* states, hover effects, and
|
|
248
|
-
* Can be used both within dropdown
|
|
472
|
+
* A versatile link component designed specifically for navigation menus with comprehensive
|
|
473
|
+
* styling and state management. Supports active states, hover/focus effects, and seamless
|
|
474
|
+
* framework integration through the asChild pattern. Can be used both within dropdown
|
|
475
|
+
* content and as direct navigation items. Features proper keyboard navigation and
|
|
476
|
+
* accessibility support.
|
|
249
477
|
*
|
|
250
|
-
* @component
|
|
251
478
|
* @example
|
|
252
479
|
* ```tsx
|
|
253
|
-
* //
|
|
480
|
+
* // Basic navigation link
|
|
254
481
|
* <NavigationMenuLink href="/about">About Us</NavigationMenuLink>
|
|
255
482
|
* ```
|
|
256
483
|
*
|
|
257
484
|
* @example
|
|
258
485
|
* ```tsx
|
|
259
|
-
* //
|
|
486
|
+
* // Active link with current page styling
|
|
487
|
+
* <NavigationMenuLink href="/dashboard" active>
|
|
488
|
+
* Dashboard
|
|
489
|
+
* </NavigationMenuLink>
|
|
490
|
+
* ```
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* ```tsx
|
|
494
|
+
* // Rich content link in dropdown with description
|
|
495
|
+
* <NavigationMenuLink href="/features/analytics">
|
|
496
|
+
* <div className="text-sm font-medium leading-none">Analytics</div>
|
|
497
|
+
* <p className="text-sm text-muted-foreground mt-1">
|
|
498
|
+
* View detailed insights and performance metrics
|
|
499
|
+
* </p>
|
|
500
|
+
* </NavigationMenuLink>
|
|
501
|
+
* ```
|
|
502
|
+
*
|
|
503
|
+
* @example
|
|
504
|
+
* ```tsx
|
|
505
|
+
* // With Next.js Link using asChild pattern
|
|
260
506
|
* <NavigationMenuLink asChild>
|
|
261
|
-
* <Link href="/products">
|
|
507
|
+
* <Link href="/products" prefetch={false}>
|
|
508
|
+
* Products
|
|
509
|
+
* </Link>
|
|
262
510
|
* </NavigationMenuLink>
|
|
263
511
|
* ```
|
|
264
512
|
*
|
|
265
513
|
* @example
|
|
266
514
|
* ```tsx
|
|
267
|
-
* //
|
|
268
|
-
* <NavigationMenuLink
|
|
269
|
-
* <
|
|
270
|
-
*
|
|
515
|
+
* // With Remix Link using asChild pattern
|
|
516
|
+
* <NavigationMenuLink asChild>
|
|
517
|
+
* <RemixLink to="/docs" prefetch="intent">
|
|
518
|
+
* Documentation
|
|
519
|
+
* </RemixLink>
|
|
271
520
|
* </NavigationMenuLink>
|
|
272
521
|
* ```
|
|
273
522
|
*
|
|
274
523
|
* @example
|
|
275
524
|
* ```tsx
|
|
276
|
-
* //
|
|
277
|
-
* <NavigationMenuLink
|
|
278
|
-
*
|
|
525
|
+
* // Direct navigation with trigger button styling
|
|
526
|
+
* <NavigationMenuLink
|
|
527
|
+
* href="/contact"
|
|
528
|
+
* className={navigationMenuTriggerStyle()}
|
|
529
|
+
* >
|
|
530
|
+
* Contact Us
|
|
531
|
+
* </NavigationMenuLink>
|
|
532
|
+
* ```
|
|
533
|
+
*
|
|
534
|
+
* @example
|
|
535
|
+
* ```tsx
|
|
536
|
+
* // With custom selection handler
|
|
537
|
+
* <NavigationMenuLink
|
|
538
|
+
* href="/logout"
|
|
539
|
+
* onSelect={(event) => {
|
|
540
|
+
* event.preventDefault();
|
|
541
|
+
* handleLogout();
|
|
542
|
+
* }}
|
|
543
|
+
* >
|
|
544
|
+
* Sign Out
|
|
545
|
+
* </NavigationMenuLink>
|
|
546
|
+
* ```
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* ```tsx
|
|
550
|
+
* // External link with icon
|
|
551
|
+
* <NavigationMenuLink href="https://github.com" target="_blank" rel="noopener">
|
|
552
|
+
* <GitHubIcon className="size-4" />
|
|
553
|
+
* GitHub
|
|
554
|
+
* <ExternalLinkIcon className="size-3 ml-auto" />
|
|
279
555
|
* </NavigationMenuLink>
|
|
280
556
|
* ```
|
|
281
557
|
*
|
|
282
558
|
* @accessibility
|
|
283
|
-
* - Focus visible ring for keyboard navigation
|
|
284
|
-
* - Active state styling for current page indication
|
|
285
|
-
* - Proper link semantics and ARIA attributes
|
|
286
|
-
* - Keyboard activation support (Enter key)
|
|
287
|
-
* - Screen reader compatible text content
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
559
|
+
* - Focus visible ring indicator for keyboard navigation (3px ring with outline)
|
|
560
|
+
* - Active state styling with proper contrast for current page indication
|
|
561
|
+
* - Proper link semantics and ARIA attributes (including aria-current when active)
|
|
562
|
+
* - Keyboard activation support (Enter key) and tab navigation
|
|
563
|
+
* - Screen reader compatible text content and descriptions
|
|
564
|
+
* - Icon sizing and color inheritance for consistent visual hierarchy
|
|
565
|
+
* - External link indicators and proper rel attributes for security
|
|
566
|
+
*
|
|
567
|
+
* @see {@link NavigationMenuContent} Content container where links are often used
|
|
568
|
+
* @see {@link NavigationMenuItem} Item container for direct navigation links
|
|
569
|
+
* @see {@link navigationMenuTriggerStyle} Styling function for button-like appearance
|
|
291
570
|
* @since 1.0.0
|
|
292
571
|
*/
|
|
293
572
|
declare function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): import("react/jsx-runtime").JSX.Element;
|
|
294
573
|
/**
|
|
295
|
-
* NavigationMenuIndicator -
|
|
574
|
+
* NavigationMenuIndicator - Animated visual indicator for active menu items
|
|
296
575
|
*
|
|
297
|
-
*
|
|
298
|
-
* or
|
|
299
|
-
*
|
|
576
|
+
* An optional visual indicator that displays an animated arrow pointing to the currently
|
|
577
|
+
* active or focused navigation menu item. Automatically transitions between positions as
|
|
578
|
+
* users navigate through menu items, providing clear visual feedback about the current
|
|
579
|
+
* selection. The indicator appears below the active item and includes smooth fade and
|
|
580
|
+
* position animations.
|
|
300
581
|
*
|
|
301
|
-
* @component
|
|
302
582
|
* @example
|
|
303
583
|
* ```tsx
|
|
304
|
-
* //
|
|
305
|
-
* <
|
|
584
|
+
* // Basic usage within NavigationMenuList
|
|
585
|
+
* <NavigationMenuList>
|
|
586
|
+
* <NavigationMenuItem value="home">
|
|
587
|
+
* <NavigationMenuTrigger>Home</NavigationMenuTrigger>
|
|
588
|
+
* <NavigationMenuContent>
|
|
589
|
+
* <NavigationMenuLink href="/">Homepage</NavigationMenuLink>
|
|
590
|
+
* </NavigationMenuContent>
|
|
591
|
+
* </NavigationMenuItem>
|
|
592
|
+
* <NavigationMenuItem value="about">
|
|
593
|
+
* <NavigationMenuTrigger>About</NavigationMenuTrigger>
|
|
594
|
+
* <NavigationMenuContent>
|
|
595
|
+
* <NavigationMenuLink href="/about">About Us</NavigationMenuLink>
|
|
596
|
+
* </NavigationMenuContent>
|
|
597
|
+
* </NavigationMenuItem>
|
|
598
|
+
* <NavigationMenuIndicator className="data-[state=visible]:bg-primary" />
|
|
599
|
+
* </NavigationMenuList>
|
|
306
600
|
* ```
|
|
307
601
|
*
|
|
308
|
-
* @
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```tsx
|
|
604
|
+
* // Custom styled indicator
|
|
605
|
+
* <NavigationMenuIndicator className="
|
|
606
|
+
* data-[state=visible]:animate-pulse
|
|
607
|
+
* data-[state=visible]:bg-gradient-to-r
|
|
608
|
+
* data-[state=visible]:from-blue-500
|
|
609
|
+
* data-[state=visible]:to-purple-500
|
|
610
|
+
* " />
|
|
611
|
+
* ```
|
|
312
612
|
*
|
|
313
|
-
* @
|
|
613
|
+
* @example
|
|
614
|
+
* ```tsx
|
|
615
|
+
* // Force mounted indicator for custom animations
|
|
616
|
+
* <NavigationMenuIndicator
|
|
617
|
+
* forceMount
|
|
618
|
+
* className="custom-indicator-animation"
|
|
619
|
+
* />
|
|
620
|
+
* ```
|
|
621
|
+
*
|
|
622
|
+
* @accessibility
|
|
623
|
+
* - Purely decorative visual element that enhances UX
|
|
624
|
+
* - Does not interfere with keyboard or screen reader navigation
|
|
625
|
+
* - Arrow element is properly hidden from assistive technologies
|
|
626
|
+
* - Does not affect focus management or navigation behavior
|
|
627
|
+
* - Provides visual feedback that complements accessible navigation patterns
|
|
628
|
+
*
|
|
629
|
+
* @see {@link NavigationMenuList} Container where indicator is typically placed
|
|
630
|
+
* @see {@link NavigationMenuItem} Items that the indicator highlights
|
|
314
631
|
* @since 1.0.0
|
|
315
632
|
*/
|
|
316
633
|
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): import("react/jsx-runtime").JSX.Element;
|