@neynar/ui 1.0.1 → 1.0.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.
Files changed (68) hide show
  1. package/context7.json +17 -0
  2. package/llm/components/accordion.llm.md +205 -0
  3. package/llm/components/alert-dialog.llm.md +289 -0
  4. package/llm/components/alert.llm.md +310 -0
  5. package/llm/components/aspect-ratio.llm.md +110 -0
  6. package/llm/components/avatar.llm.md +282 -0
  7. package/llm/components/badge.llm.md +185 -0
  8. package/llm/components/blockquote.llm.md +86 -0
  9. package/llm/components/breadcrumb.llm.md +245 -0
  10. package/llm/components/button-group.llm.md +248 -0
  11. package/llm/components/button.llm.md +247 -0
  12. package/llm/components/calendar.llm.md +252 -0
  13. package/llm/components/card.llm.md +356 -0
  14. package/llm/components/carousel.llm.md +281 -0
  15. package/llm/components/chart.llm.md +278 -0
  16. package/llm/components/checkbox.llm.md +234 -0
  17. package/llm/components/code.llm.md +75 -0
  18. package/llm/components/collapsible.llm.md +271 -0
  19. package/llm/components/color-mode.llm.md +196 -0
  20. package/llm/components/combobox.llm.md +346 -0
  21. package/llm/components/command.llm.md +353 -0
  22. package/llm/components/context-menu.llm.md +368 -0
  23. package/llm/components/dialog.llm.md +283 -0
  24. package/llm/components/drawer.llm.md +326 -0
  25. package/llm/components/dropdown-menu.llm.md +404 -0
  26. package/llm/components/empty.llm.md +282 -0
  27. package/llm/components/field.llm.md +303 -0
  28. package/llm/components/first-light.llm.md +129 -0
  29. package/llm/components/hover-card.llm.md +278 -0
  30. package/llm/components/input-group.llm.md +334 -0
  31. package/llm/components/input-otp.llm.md +270 -0
  32. package/llm/components/input.llm.md +197 -0
  33. package/llm/components/item.llm.md +347 -0
  34. package/llm/components/kbd.llm.md +221 -0
  35. package/llm/components/label.llm.md +219 -0
  36. package/llm/components/menubar.llm.md +378 -0
  37. package/llm/components/navigation-menu.llm.md +320 -0
  38. package/llm/components/pagination.llm.md +337 -0
  39. package/llm/components/popover.llm.md +278 -0
  40. package/llm/components/progress.llm.md +259 -0
  41. package/llm/components/radio-group.llm.md +269 -0
  42. package/llm/components/resizable.llm.md +222 -0
  43. package/llm/components/scroll-area.llm.md +290 -0
  44. package/llm/components/select.llm.md +338 -0
  45. package/llm/components/separator.llm.md +129 -0
  46. package/llm/components/sheet.llm.md +275 -0
  47. package/llm/components/sidebar.llm.md +528 -0
  48. package/llm/components/skeleton.llm.md +140 -0
  49. package/llm/components/slider.llm.md +213 -0
  50. package/llm/components/sonner.llm.md +299 -0
  51. package/llm/components/spinner.llm.md +187 -0
  52. package/llm/components/switch.llm.md +258 -0
  53. package/llm/components/table.llm.md +334 -0
  54. package/llm/components/tabs.llm.md +245 -0
  55. package/llm/components/text.llm.md +108 -0
  56. package/llm/components/textarea.llm.md +236 -0
  57. package/llm/components/title.llm.md +88 -0
  58. package/llm/components/toggle-group.llm.md +228 -0
  59. package/llm/components/toggle.llm.md +235 -0
  60. package/llm/components/tooltip.llm.md +191 -0
  61. package/llm/contributing.llm.md +273 -0
  62. package/llm/hooks.llm.md +91 -0
  63. package/llm/index.llm.md +178 -0
  64. package/llm/theming.llm.md +381 -0
  65. package/llm/utilities.llm.md +97 -0
  66. package/llms-full.txt +15995 -0
  67. package/llms.txt +182 -0
  68. package/package.json +5 -1
@@ -0,0 +1,378 @@
1
+ # Menubar
2
+
3
+ Horizontal menubar for application-level navigation and actions, commonly seen in desktop applications with File, Edit, View, and Help menus.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import {
9
+ Menubar,
10
+ MenubarMenu,
11
+ MenubarTrigger,
12
+ MenubarContent,
13
+ MenubarItem,
14
+ MenubarSeparator,
15
+ MenubarShortcut,
16
+ MenubarCheckboxItem,
17
+ MenubarRadioGroup,
18
+ MenubarRadioItem,
19
+ MenubarSub,
20
+ MenubarSubTrigger,
21
+ MenubarSubContent,
22
+ MenubarLabel,
23
+ MenubarGroup,
24
+ } from "@neynar/ui/menubar"
25
+ ```
26
+
27
+ ## Anatomy
28
+
29
+ ```tsx
30
+ <Menubar>
31
+ <MenubarMenu>
32
+ <MenubarTrigger>File</MenubarTrigger>
33
+ <MenubarContent>
34
+ <MenubarItem>New</MenubarItem>
35
+ <MenubarItem>Open</MenubarItem>
36
+ <MenubarSeparator />
37
+ <MenubarSub>
38
+ <MenubarSubTrigger>Export</MenubarSubTrigger>
39
+ <MenubarSubContent>
40
+ <MenubarItem>PDF</MenubarItem>
41
+ <MenubarItem>CSV</MenubarItem>
42
+ </MenubarSubContent>
43
+ </MenubarSub>
44
+ </MenubarContent>
45
+ </MenubarMenu>
46
+ <MenubarMenu>
47
+ <MenubarTrigger>Edit</MenubarTrigger>
48
+ <MenubarContent>
49
+ <MenubarItem>Undo</MenubarItem>
50
+ <MenubarItem>Redo</MenubarItem>
51
+ </MenubarContent>
52
+ </MenubarMenu>
53
+ </Menubar>
54
+ ```
55
+
56
+ ## Components
57
+
58
+ | Component | Description |
59
+ |-----------|-------------|
60
+ | Menubar | Root container for the horizontal menubar |
61
+ | MenubarMenu | Individual menu within the menubar (manages open/close state) |
62
+ | MenubarTrigger | Button that opens the menu dropdown |
63
+ | MenubarContent | Dropdown panel containing menu items (auto-portals) |
64
+ | MenubarItem | Interactive menu item with optional variants |
65
+ | MenubarCheckboxItem | Menu item with checkbox for toggles |
66
+ | MenubarRadioGroup | Container for mutually exclusive radio items |
67
+ | MenubarRadioItem | Radio button menu item (use inside MenubarRadioGroup) |
68
+ | MenubarSub | Container for nested submenu |
69
+ | MenubarSubTrigger | Menu item that opens a submenu |
70
+ | MenubarSubContent | Dropdown panel for submenu items |
71
+ | MenubarGroup | Logical grouping of menu items |
72
+ | MenubarLabel | Non-interactive section label |
73
+ | MenubarSeparator | Visual divider between items |
74
+ | MenubarShortcut | Keyboard shortcut hint (display only) |
75
+
76
+ ## Props
77
+
78
+ ### Menubar
79
+
80
+ | Prop | Type | Default | Description |
81
+ |------|------|---------|-------------|
82
+ | loopFocus | boolean | true | Loop keyboard focus back to first item at end of list |
83
+ | modal | boolean | true | Whether menubar is modal |
84
+ | disabled | boolean | false | Disable entire menubar |
85
+ | orientation | "horizontal" \| "vertical" | "horizontal" | Menubar orientation |
86
+ | className | string | - | Additional CSS classes |
87
+
88
+ ### MenubarMenu
89
+
90
+ | Prop | Type | Default | Description |
91
+ |------|------|---------|-------------|
92
+ | open | boolean | - | Controlled open state |
93
+ | defaultOpen | boolean | - | Default open state (uncontrolled) |
94
+ | onOpenChange | (open: boolean) => void | - | Callback when open state changes |
95
+
96
+ ### MenubarContent
97
+
98
+ Automatically renders in a portal with backdrop blur (frosted glass effect).
99
+
100
+ | Prop | Type | Default | Description |
101
+ |------|------|---------|-------------|
102
+ | align | "start" \| "center" \| "end" | "start" | Alignment relative to trigger |
103
+ | alignOffset | number | -4 | Offset along alignment axis |
104
+ | side | "top" \| "right" \| "bottom" \| "left" | "bottom" | Preferred side of trigger |
105
+ | sideOffset | number | 8 | Distance from trigger |
106
+
107
+ ### MenubarItem
108
+
109
+ | Prop | Type | Default | Description |
110
+ |------|------|---------|-------------|
111
+ | disabled | boolean | false | Disable item |
112
+ | onClick | MouseEventHandler | - | Click handler |
113
+ | closeOnClick | boolean | true | Close menu on click |
114
+ | variant | "default" \| "destructive" \| "success" \| "warning" \| "info" | "default" | Visual variant |
115
+ | inset | boolean | false | Add left padding for alignment with icons/checkboxes |
116
+
117
+ ### MenubarCheckboxItem
118
+
119
+ | Prop | Type | Default | Description |
120
+ |------|------|---------|-------------|
121
+ | checked | boolean | - | Controlled checked state |
122
+ | defaultChecked | boolean | - | Default checked state (uncontrolled) |
123
+ | onCheckedChange | (checked: boolean) => void | - | Callback when checked state changes |
124
+ | disabled | boolean | false | Disable item |
125
+
126
+ ### MenubarRadioGroup
127
+
128
+ | Prop | Type | Default | Description |
129
+ |------|------|---------|-------------|
130
+ | value | any | - | Controlled selected value |
131
+ | defaultValue | any | - | Default selected value (uncontrolled) |
132
+ | onValueChange | (value: any) => void | - | Callback when value changes |
133
+
134
+ ### MenubarRadioItem
135
+
136
+ | Prop | Type | Default | Description |
137
+ |------|------|---------|-------------|
138
+ | value | any | **required** | Value when this item is selected |
139
+ | disabled | boolean | false | Disable item |
140
+
141
+ ### MenubarSubTrigger
142
+
143
+ | Prop | Type | Default | Description |
144
+ |------|------|---------|-------------|
145
+ | disabled | boolean | false | Disable submenu trigger |
146
+ | inset | boolean | false | Add left padding for alignment |
147
+
148
+ ## Data Attributes
149
+
150
+ ### MenubarTrigger
151
+ - `aria-expanded` - Present when menu is open
152
+
153
+ ### MenubarItem
154
+ - `data-highlighted` - Present when item is highlighted
155
+ - `data-disabled` - Present when item is disabled
156
+
157
+ ### MenubarCheckboxItem
158
+ - `data-checked` - Present when checked
159
+ - `data-disabled` - Present when disabled
160
+
161
+ ### MenubarRadioItem
162
+ - `data-checked` - Present when selected
163
+ - `data-disabled` - Present when disabled
164
+
165
+ ## Variants
166
+
167
+ MenubarItem supports semantic variants:
168
+
169
+ | Variant | Use Case |
170
+ |---------|----------|
171
+ | default | Standard menu actions |
172
+ | destructive | Dangerous actions (delete, sign out) |
173
+ | success | Positive actions (approve, confirm) |
174
+ | warning | Caution actions (mark for review) |
175
+ | info | Informational actions (view details) |
176
+
177
+ ## Examples
178
+
179
+ ### Basic Menubar
180
+
181
+ ```tsx
182
+ <Menubar>
183
+ <MenubarMenu>
184
+ <MenubarTrigger>File</MenubarTrigger>
185
+ <MenubarContent>
186
+ <MenubarItem>New</MenubarItem>
187
+ <MenubarItem>Open</MenubarItem>
188
+ <MenubarItem>Save</MenubarItem>
189
+ </MenubarContent>
190
+ </MenubarMenu>
191
+
192
+ <MenubarMenu>
193
+ <MenubarTrigger>Edit</MenubarTrigger>
194
+ <MenubarContent>
195
+ <MenubarItem>Undo</MenubarItem>
196
+ <MenubarItem>Redo</MenubarItem>
197
+ </MenubarContent>
198
+ </MenubarMenu>
199
+ </Menubar>
200
+ ```
201
+
202
+ ### With Icons and Shortcuts
203
+
204
+ ```tsx
205
+ <Menubar>
206
+ <MenubarMenu>
207
+ <MenubarTrigger>File</MenubarTrigger>
208
+ <MenubarContent>
209
+ <MenubarItem>
210
+ <FileIcon />
211
+ New File
212
+ <MenubarShortcut>⌘N</MenubarShortcut>
213
+ </MenubarItem>
214
+ <MenubarItem>
215
+ <FolderOpenIcon />
216
+ Open
217
+ <MenubarShortcut>⌘O</MenubarShortcut>
218
+ </MenubarItem>
219
+ <MenubarSeparator />
220
+ <MenubarItem>
221
+ <SaveIcon />
222
+ Save
223
+ <MenubarShortcut>⌘S</MenubarShortcut>
224
+ </MenubarItem>
225
+ </MenubarContent>
226
+ </MenubarMenu>
227
+ </Menubar>
228
+ ```
229
+
230
+ ### Checkbox Items (View Settings)
231
+
232
+ ```tsx
233
+ function ViewMenu() {
234
+ const [showSidebar, setShowSidebar] = useState(true)
235
+ const [showToolbar, setShowToolbar] = useState(true)
236
+
237
+ return (
238
+ <MenubarMenu>
239
+ <MenubarTrigger>View</MenubarTrigger>
240
+ <MenubarContent>
241
+ <MenubarGroup>
242
+ <MenubarLabel>Panels</MenubarLabel>
243
+ <MenubarCheckboxItem
244
+ checked={showSidebar}
245
+ onCheckedChange={setShowSidebar}
246
+ >
247
+ Sidebar
248
+ </MenubarCheckboxItem>
249
+ <MenubarCheckboxItem
250
+ checked={showToolbar}
251
+ onCheckedChange={setShowToolbar}
252
+ >
253
+ Toolbar
254
+ </MenubarCheckboxItem>
255
+ </MenubarGroup>
256
+ </MenubarContent>
257
+ </MenubarMenu>
258
+ )
259
+ }
260
+ ```
261
+
262
+ ### Radio Group (Theme Selection)
263
+
264
+ ```tsx
265
+ function ThemeMenu() {
266
+ const [theme, setTheme] = useState("system")
267
+
268
+ return (
269
+ <MenubarSub>
270
+ <MenubarSubTrigger>
271
+ <SunIcon />
272
+ Theme
273
+ </MenubarSubTrigger>
274
+ <MenubarSubContent>
275
+ <MenubarRadioGroup value={theme} onValueChange={setTheme}>
276
+ <MenubarRadioItem value="light">
277
+ <SunIcon />
278
+ Light
279
+ </MenubarRadioItem>
280
+ <MenubarRadioItem value="dark">
281
+ <MoonIcon />
282
+ Dark
283
+ </MenubarRadioItem>
284
+ <MenubarRadioItem value="system">
285
+ <MonitorIcon />
286
+ System
287
+ </MenubarRadioItem>
288
+ </MenubarRadioGroup>
289
+ </MenubarSubContent>
290
+ </MenubarSub>
291
+ )
292
+ }
293
+ ```
294
+
295
+ ### Nested Submenus
296
+
297
+ ```tsx
298
+ <MenubarMenu>
299
+ <MenubarTrigger>File</MenubarTrigger>
300
+ <MenubarContent>
301
+ <MenubarItem>New File</MenubarItem>
302
+ <MenubarSub>
303
+ <MenubarSubTrigger>
304
+ <DownloadIcon />
305
+ Export
306
+ </MenubarSubTrigger>
307
+ <MenubarSubContent>
308
+ <MenubarItem>Export as JSON</MenubarItem>
309
+ <MenubarItem>Export as CSV</MenubarItem>
310
+ <MenubarSeparator />
311
+ <MenubarSub>
312
+ <MenubarSubTrigger>More Formats</MenubarSubTrigger>
313
+ <MenubarSubContent>
314
+ <MenubarItem>YAML</MenubarItem>
315
+ <MenubarItem>TOML</MenubarItem>
316
+ </MenubarSubContent>
317
+ </MenubarSub>
318
+ </MenubarSubContent>
319
+ </MenubarSub>
320
+ </MenubarContent>
321
+ </MenubarMenu>
322
+ ```
323
+
324
+ ### Item Variants
325
+
326
+ ```tsx
327
+ <MenubarMenu>
328
+ <MenubarTrigger>Actions</MenubarTrigger>
329
+ <MenubarContent>
330
+ <MenubarItem variant="success">
331
+ <CheckCircleIcon />
332
+ Approve
333
+ </MenubarItem>
334
+ <MenubarItem variant="warning">
335
+ <AlertTriangleIcon />
336
+ Mark for Review
337
+ </MenubarItem>
338
+ <MenubarItem variant="info">
339
+ <InfoIcon />
340
+ View Details
341
+ </MenubarItem>
342
+ <MenubarSeparator />
343
+ <MenubarItem variant="destructive">
344
+ <LogOutIcon />
345
+ Sign Out
346
+ </MenubarItem>
347
+ </MenubarContent>
348
+ </MenubarMenu>
349
+ ```
350
+
351
+ ## Keyboard Navigation
352
+
353
+ | Key | Action |
354
+ |-----|--------|
355
+ | Tab | Move focus to next menubar trigger |
356
+ | Shift+Tab | Move focus to previous menubar trigger |
357
+ | Enter/Space | Open menu or activate item |
358
+ | Arrow Down | Open menu or move to next item |
359
+ | Arrow Up | Move to previous item |
360
+ | Arrow Right | Move to next menubar trigger (or open submenu) |
361
+ | Arrow Left | Move to previous menubar trigger (or close submenu) |
362
+ | Escape | Close open menu |
363
+ | Home | Focus first item |
364
+ | End | Focus last item |
365
+
366
+ ## Accessibility
367
+
368
+ - Full keyboard navigation with arrow keys and Tab
369
+ - ARIA attributes automatically managed (aria-expanded, aria-haspopup, role="menubar")
370
+ - Focus management with automatic focus trapping in open menus
371
+ - Screen reader announcements for menu state changes
372
+ - Supports `disabled` state with proper ARIA attributes
373
+
374
+ ## Related
375
+
376
+ - [DropdownMenu](./dropdown-menu.llm.md) - For single-menu dropdowns
377
+ - [ContextMenu](./context-menu.llm.md) - For right-click menus
378
+ - [NavigationMenu](./navigation-menu.llm.md) - For site navigation with links
@@ -0,0 +1,320 @@
1
+ # NavigationMenu
2
+
3
+ Horizontal navigation menu with mega menu support for main site navigation and dashboard headers.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import {
9
+ NavigationMenu,
10
+ NavigationMenuList,
11
+ NavigationMenuItem,
12
+ NavigationMenuTrigger,
13
+ NavigationMenuContent,
14
+ NavigationMenuLink,
15
+ } from "@neynar/ui/navigation-menu"
16
+ ```
17
+
18
+ ## Anatomy
19
+
20
+ ```tsx
21
+ <NavigationMenu>
22
+ <NavigationMenuList>
23
+ <NavigationMenuItem value="item-1">
24
+ <NavigationMenuTrigger>Products</NavigationMenuTrigger>
25
+ <NavigationMenuContent>
26
+ {/* Mega menu content */}
27
+ </NavigationMenuContent>
28
+ </NavigationMenuItem>
29
+
30
+ <NavigationMenuItem value="item-2">
31
+ <NavigationMenuLink href="/pricing">Pricing</NavigationMenuLink>
32
+ </NavigationMenuItem>
33
+ </NavigationMenuList>
34
+ </NavigationMenu>
35
+ ```
36
+
37
+ ## Components
38
+
39
+ | Component | Description |
40
+ |-----------|-------------|
41
+ | NavigationMenu | Root container, manages active state and keyboard navigation |
42
+ | NavigationMenuList | Container for navigation items, renders as horizontal list |
43
+ | NavigationMenuItem | Individual item, can contain Link or Trigger + Content |
44
+ | NavigationMenuTrigger | Button that opens content panel, includes chevron icon |
45
+ | NavigationMenuContent | Mega menu content panel with smooth transitions |
46
+ | NavigationMenuLink | Clickable link for direct navigation or panel content |
47
+ | NavigationMenuIndicator | Optional visual indicator (rarely used) |
48
+
49
+ ## Props
50
+
51
+ ### NavigationMenu
52
+
53
+ | Prop | Type | Default | Description |
54
+ |------|------|---------|-------------|
55
+ | value | string | - | Controlled active item value |
56
+ | defaultValue | string | - | Default active item (uncontrolled) |
57
+ | onValueChange | (value: string) => void | - | Called when active item changes |
58
+ | orientation | "horizontal" \| "vertical" | "horizontal" | Menu orientation |
59
+ | className | string | - | Additional CSS classes |
60
+
61
+ ### NavigationMenuItem
62
+
63
+ | Prop | Type | Default | Description |
64
+ |------|------|---------|-------------|
65
+ | value | string | - | Unique identifier for controlled state |
66
+ | className | string | - | Additional CSS classes |
67
+
68
+ ### NavigationMenuTrigger
69
+
70
+ Automatically includes a rotating chevron icon that animates on open/close.
71
+
72
+ | Prop | Type | Default | Description |
73
+ |------|------|---------|-------------|
74
+ | className | string | - | Additional CSS classes |
75
+ | render | ReactElement | - | Custom render element |
76
+
77
+ ### NavigationMenuContent
78
+
79
+ Automatically renders in a positioned portal with backdrop and smooth transitions.
80
+
81
+ | Prop | Type | Default | Description |
82
+ |------|------|---------|-------------|
83
+ | className | string | - | Additional CSS classes |
84
+
85
+ ### NavigationMenuLink
86
+
87
+ | Prop | Type | Default | Description |
88
+ |------|------|---------|-------------|
89
+ | href | string | - | Link destination |
90
+ | active | boolean | false | Highlights link as active/current page |
91
+ | closeOnClick | boolean | true | Whether to close menu on click |
92
+ | className | string | - | Additional CSS classes |
93
+
94
+ ### NavigationMenuList
95
+
96
+ | Prop | Type | Default | Description |
97
+ |------|------|---------|-------------|
98
+ | className | string | - | Additional CSS classes |
99
+
100
+ ## Data Attributes
101
+
102
+ ### NavigationMenuTrigger
103
+
104
+ | Attribute | When Present |
105
+ |-----------|--------------|
106
+ | data-open | Content panel is open |
107
+ | data-popup-open | Content panel is open |
108
+ | data-pressed | Trigger is pressed |
109
+
110
+ ### NavigationMenuContent
111
+
112
+ | Attribute | When Present |
113
+ |-----------|--------------|
114
+ | data-open | Content is visible |
115
+ | data-closed | Content is hidden |
116
+ | data-starting-style | During opening animation |
117
+ | data-ending-style | During closing animation |
118
+
119
+ ### NavigationMenuLink
120
+
121
+ | Attribute | When Present |
122
+ |-----------|--------------|
123
+ | data-active | Link is active/current page |
124
+
125
+ ## Examples
126
+
127
+ ### Basic Link Navigation
128
+
129
+ ```tsx
130
+ <NavigationMenu>
131
+ <NavigationMenuList>
132
+ <NavigationMenuItem value="home">
133
+ <NavigationMenuLink href="/">Home</NavigationMenuLink>
134
+ </NavigationMenuItem>
135
+ <NavigationMenuItem value="about">
136
+ <NavigationMenuLink href="/about">About</NavigationMenuLink>
137
+ </NavigationMenuItem>
138
+ <NavigationMenuItem value="contact">
139
+ <NavigationMenuLink href="/contact">Contact</NavigationMenuLink>
140
+ </NavigationMenuItem>
141
+ </NavigationMenuList>
142
+ </NavigationMenu>
143
+ ```
144
+
145
+ ### Mega Menu with Product Showcase
146
+
147
+ ```tsx
148
+ <NavigationMenu>
149
+ <NavigationMenuList>
150
+ <NavigationMenuItem value="products">
151
+ <NavigationMenuTrigger>Products</NavigationMenuTrigger>
152
+ <NavigationMenuContent>
153
+ <div className="w-[600px] p-4">
154
+ <div className="mb-4">
155
+ <h4 className="font-semibold">Our Products</h4>
156
+ <p className="text-muted-foreground text-sm">
157
+ Everything you need to build on Farcaster
158
+ </p>
159
+ </div>
160
+ <div className="grid grid-cols-2 gap-4">
161
+ <NavigationMenuLink href="/api" className="block rounded-md">
162
+ <div className="flex items-start gap-3">
163
+ <div className="bg-primary/10 text-primary rounded-md p-2">
164
+ <CodeIcon className="size-5" />
165
+ </div>
166
+ <div>
167
+ <div className="font-medium">Farcaster API</div>
168
+ <div className="text-muted-foreground text-xs">
169
+ REST APIs for casts, users, and feeds
170
+ </div>
171
+ </div>
172
+ </div>
173
+ </NavigationMenuLink>
174
+ {/* More product cards */}
175
+ </div>
176
+ </div>
177
+ </NavigationMenuContent>
178
+ </NavigationMenuItem>
179
+ </NavigationMenuList>
180
+ </NavigationMenu>
181
+ ```
182
+
183
+ ### Grouped Content Panels
184
+
185
+ ```tsx
186
+ <NavigationMenu>
187
+ <NavigationMenuList>
188
+ <NavigationMenuItem value="resources">
189
+ <NavigationMenuTrigger>Resources</NavigationMenuTrigger>
190
+ <NavigationMenuContent>
191
+ <div className="grid w-[400px] grid-cols-2 gap-4 p-4">
192
+ <div className="space-y-3">
193
+ <h4 className="text-muted-foreground text-xs font-semibold uppercase">
194
+ Documentation
195
+ </h4>
196
+ <div className="space-y-2">
197
+ <NavigationMenuLink href="/docs" className="block">
198
+ Getting Started
199
+ </NavigationMenuLink>
200
+ <NavigationMenuLink href="/api-reference" className="block">
201
+ API Reference
202
+ </NavigationMenuLink>
203
+ </div>
204
+ </div>
205
+ <div className="space-y-3">
206
+ <h4 className="text-muted-foreground text-xs font-semibold uppercase">
207
+ Community
208
+ </h4>
209
+ <div className="space-y-2">
210
+ <NavigationMenuLink href="/discord" className="block">
211
+ Discord
212
+ </NavigationMenuLink>
213
+ <NavigationMenuLink href="/github" className="block">
214
+ GitHub
215
+ </NavigationMenuLink>
216
+ </div>
217
+ </div>
218
+ </div>
219
+ </NavigationMenuContent>
220
+ </NavigationMenuItem>
221
+ </NavigationMenuList>
222
+ </NavigationMenu>
223
+ ```
224
+
225
+ ### With Icons
226
+
227
+ ```tsx
228
+ <NavigationMenu>
229
+ <NavigationMenuList>
230
+ <NavigationMenuItem value="home">
231
+ <NavigationMenuLink href="/" className="flex items-center gap-2">
232
+ <HomeIcon className="size-4" />
233
+ Home
234
+ </NavigationMenuLink>
235
+ </NavigationMenuItem>
236
+ <NavigationMenuItem value="apps">
237
+ <NavigationMenuTrigger>
238
+ <LayoutDashboardIcon className="mr-2 size-4" />
239
+ Apps
240
+ </NavigationMenuTrigger>
241
+ <NavigationMenuContent>
242
+ <div className="w-[280px] space-y-2 p-4">
243
+ <NavigationMenuLink href="/my-apps" className="flex items-center gap-2">
244
+ <RocketIcon className="size-4" />
245
+ My Apps
246
+ </NavigationMenuLink>
247
+ <NavigationMenuLink href="/templates" className="flex items-center gap-2">
248
+ <PackageIcon className="size-4" />
249
+ Templates
250
+ </NavigationMenuLink>
251
+ </div>
252
+ </NavigationMenuContent>
253
+ </NavigationMenuItem>
254
+ </NavigationMenuList>
255
+ </NavigationMenu>
256
+ ```
257
+
258
+ ### Active State
259
+
260
+ ```tsx
261
+ function Nav({ currentPath }: { currentPath: string }) {
262
+ return (
263
+ <NavigationMenu>
264
+ <NavigationMenuList>
265
+ <NavigationMenuItem value="dashboard">
266
+ <NavigationMenuLink
267
+ href="/dashboard"
268
+ active={currentPath === "/dashboard"}
269
+ >
270
+ Dashboard
271
+ </NavigationMenuLink>
272
+ </NavigationMenuItem>
273
+ <NavigationMenuItem value="analytics">
274
+ <NavigationMenuLink
275
+ href="/analytics"
276
+ active={currentPath === "/analytics"}
277
+ >
278
+ Analytics
279
+ </NavigationMenuLink>
280
+ </NavigationMenuItem>
281
+ </NavigationMenuList>
282
+ </NavigationMenu>
283
+ )
284
+ }
285
+ ```
286
+
287
+ ## Keyboard Navigation
288
+
289
+ | Key | Action |
290
+ |-----|--------|
291
+ | Tab | Move focus to next item |
292
+ | Shift + Tab | Move focus to previous item |
293
+ | Arrow Right | Focus next item (horizontal) |
294
+ | Arrow Left | Focus previous item (horizontal) |
295
+ | Enter / Space | Activate trigger or link |
296
+ | Escape | Close open content panel |
297
+ | Home | Focus first item |
298
+ | End | Focus last item |
299
+
300
+ ## Accessibility
301
+
302
+ - Implements ARIA navigation menu pattern with proper roles and states
303
+ - Keyboard navigation follows WAI-ARIA authoring practices
304
+ - Focus management automatically moves between items and panels
305
+ - Screen readers announce active states and panel open/close
306
+
307
+ ## Styling Notes
308
+
309
+ - Content panel width is controlled by content wrapper (e.g., `w-[600px]`)
310
+ - Use grid layouts for multi-column mega menus
311
+ - Icons automatically size to `size-4` when not explicitly sized
312
+ - Active links receive muted background by default
313
+ - Smooth transitions use cubic-bezier easing for polish
314
+
315
+ ## Related
316
+
317
+ - [Tabs](/components/tabs) - For tabbed content switching
318
+ - [DropdownMenu](/components/dropdown-menu) - For action menus
319
+ - [Command](/components/command) - For command palettes
320
+ - [Breadcrumb](/components/breadcrumb) - For hierarchical navigation