x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<div class="min-h-screen bg-background"> <header class="sticky top-0 z-40 border-b bg-background/95 backdrop-blur"> <div class="mx-auto flex h-14 max-w-6xl items-center gap-6 px-4"> <a href="#" class="flex items-center gap-2 font-semibold"><span class="size-6 rounded-md bg-primary"></span>Acme</a> <nav id="ui-navigation-menu-23188c43" aria-label="Main" class="relative" data-controller="ui--navigation-menu" data-ui--navigation-menu-open-delay-value="150" data-ui--navigation-menu-close-delay-value="200" data-action="focusin->ui--navigation-menu#focusIn focusout->ui--navigation-menu#focusOut"> <ul class="flex flex-wrap items-center gap-1"> <li class="relative"> <button type="button" id="ui-navigation-menu-23188c43-trigger-1" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" aria-expanded="false" aria-controls="ui-navigation-menu-23188c43-panel-1" data-ui--navigation-menu-target="top trigger" data-action="click->ui--navigation-menu#toggle pointerenter->ui--navigation-menu#hoverOpen pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#topKeydown">Products<i data-lucide="chevron-down" class="inline-block shrink-0 w-3 h-3 transition-transform duration-200 group-aria-expanded/nav-item:rotate-180 motion-reduce:transition-none" aria-hidden="true"></i> </button> <div id="ui-navigation-menu-23188c43-panel-1" hidden="hidden" class="z-50 max-w-[calc(100vw-1rem)] rounded-lg border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 w-[36rem]" data-ui--navigation-menu-target="panel" data-state="closed" data-action="pointerenter->ui--navigation-menu#cancelClose pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#panelKeydown"> <ul class="grid gap-1 sm:grid-cols-2"> <li><a href="#analytics" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="chart-column" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Analytics</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">See what customers do, as they do it.</span> </span> </a></li> <li><a href="#automations" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="workflow" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Automations</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Run the repetitive parts on a schedule.</span> </span> </a></li> <li><a href="#inbox" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="message-circle" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Inbox</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Every conversation in one place.</span> </span> </a></li> <li><a href="#billing" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="credit-card" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Billing</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Invoices, plans and payment methods.</span> </span> </a></li> <li><a href="#storefront" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="store" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Storefront</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Sell online with a page you own.</span> </span> </a></li> <li><a href="#notifications" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="bell" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Notifications</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Email, SMS and push from one API.</span> </span> </a></li> <li><a href="#security" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="shield" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Security</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">SSO, audit logs and roles.</span> </span> </a></li> <li><a href="#integrations" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="layout-grid" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Integrations</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Connect the tools you already use.</span> </span> </a></li> </ul> </div> </li> <li class="relative"> <button type="button" id="ui-navigation-menu-23188c43-trigger-2" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" aria-expanded="false" aria-controls="ui-navigation-menu-23188c43-panel-2" data-ui--navigation-menu-target="top trigger" data-action="click->ui--navigation-menu#toggle pointerenter->ui--navigation-menu#hoverOpen pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#topKeydown">Solutions<i data-lucide="chevron-down" class="inline-block shrink-0 w-3 h-3 transition-transform duration-200 group-aria-expanded/nav-item:rotate-180 motion-reduce:transition-none" aria-hidden="true"></i> </button> <div id="ui-navigation-menu-23188c43-panel-2" hidden="hidden" class="z-50 max-w-[calc(100vw-1rem)] rounded-lg border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 w-[36rem]" data-ui--navigation-menu-target="panel" data-state="closed" data-action="pointerenter->ui--navigation-menu#cancelClose pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#panelKeydown"> <ul class="grid gap-1 sm:grid-cols-2"> <li><a href="#startups" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Startups</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Everything to launch, on a free plan.</span> </span> </a></li> <li><a href="#enterprise" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Enterprise</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Scale, compliance and a named contact.</span> </span> </a></li> <li><a href="#agencies" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Agencies</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Run every client from one account.</span> </span> </a></li> <li><a href="#education" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Education</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Discounts for schools and students.</span> </span> </a></li> <li><a href="#nonprofits" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Nonprofits</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Half price for registered charities.</span> </span> </a></li> <li><a href="#developers" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Developers</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">APIs, webhooks and SDKs.</span> </span> </a></li> </ul> </div> </li> <li class="relative"> <button type="button" id="ui-navigation-menu-23188c43-trigger-3" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" aria-expanded="false" aria-controls="ui-navigation-menu-23188c43-panel-3" data-ui--navigation-menu-target="top trigger" data-action="click->ui--navigation-menu#toggle pointerenter->ui--navigation-menu#hoverOpen pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#topKeydown">Resources<i data-lucide="chevron-down" class="inline-block shrink-0 w-3 h-3 transition-transform duration-200 group-aria-expanded/nav-item:rotate-180 motion-reduce:transition-none" aria-hidden="true"></i> </button> <div id="ui-navigation-menu-23188c43-panel-3" hidden="hidden" class="z-50 max-w-[calc(100vw-1rem)] rounded-lg border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 w-96" data-ui--navigation-menu-target="panel" data-state="closed" data-action="pointerenter->ui--navigation-menu#cancelClose pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#panelKeydown"> <ul class="grid gap-1"> <li><a href="#docs" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="book-open" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Documentation</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Guides and the API reference.</span> </span> </a></li> <li><a href="#blog" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="newspaper" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Blog</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Product news and how-tos.</span> </span> </a></li> <li><a href="#changelog" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="rocket" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Changelog</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">What shipped this week.</span> </span> </a></li> <li><a href="#academy" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="graduation-cap" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Academy</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Free courses, start to finish.</span> </span> </a></li> <li><a href="#help" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground"><i data-lucide="life-buoy" class="inline-block shrink-0 w-4 h-4" aria-hidden="true"></i> </span> <span class="min-w-0"> <span class="block font-medium leading-snug">Help centre</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Answers, and a human when you need one.</span> </span> </a></li> </ul> </div> </li> <li class="relative"> <a href="#pricing" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="top" data-action="keydown->ui--navigation-menu#topKeydown">Pricing</a> </li> <li class="relative"> <a href="#docs" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" aria-current="page" data-ui--navigation-menu-target="top" data-action="keydown->ui--navigation-menu#topKeydown">Docs</a> </li> </ul> </nav> <div class="ml-auto flex items-center gap-2"> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:text-muted-foreground! hover:bg-accent hover:text-accent-foreground disabled:bg-transparent! h-8 rounded-md px-3 text-xs disabled:cursor-not-allowed" aria-busy="false">Sign in</button> <button type="button" class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-primary text-primary-foreground hover:bg-primary/90 h-8 rounded-md px-3 text-xs disabled:cursor-not-allowed" aria-busy="false">Get started</button> </div> </div> </header> <main class="mx-auto max-w-3xl space-y-6 px-4 py-12"> <h1 class="text-3xl font-bold tracking-tight">Scroll this page with a menu open</h1> <p class="text-muted-foreground">The header sticks to the top and its panels stay attached to their triggers. At the bottom there's a footer menu: its panels open upwards, because there's no room below.</p> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 1</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 2</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 3</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 4</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 5</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 6</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 7</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section 8</h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> </main> <footer class="border-t"> <div class="mx-auto flex max-w-6xl items-center justify-between gap-4 px-4 py-6"> <span class="text-sm text-muted-foreground">© Acme</span> <nav id="ui-navigation-menu-43b17b40" aria-label="Footer" class="relative" data-controller="ui--navigation-menu" data-ui--navigation-menu-open-delay-value="150" data-ui--navigation-menu-close-delay-value="200" data-action="focusin->ui--navigation-menu#focusIn focusout->ui--navigation-menu#focusOut"> <ul class="flex flex-wrap items-center gap-1"> <li class="relative"> <button type="button" id="ui-navigation-menu-43b17b40-trigger-1" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" aria-expanded="false" aria-controls="ui-navigation-menu-43b17b40-panel-1" data-ui--navigation-menu-target="top trigger" data-action="click->ui--navigation-menu#toggle pointerenter->ui--navigation-menu#hoverOpen pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#topKeydown">Company<i data-lucide="chevron-down" class="inline-block shrink-0 w-3 h-3 transition-transform duration-200 group-aria-expanded/nav-item:rotate-180 motion-reduce:transition-none" aria-hidden="true"></i> </button> <div id="ui-navigation-menu-43b17b40-panel-1" hidden="hidden" class="z-50 max-w-[calc(100vw-1rem)] rounded-lg border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 w-96" data-ui--navigation-menu-target="panel" data-state="closed" data-action="pointerenter->ui--navigation-menu#cancelClose pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#panelKeydown"> <ul class="grid gap-1"> <li><a href="#about" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">About</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Who we are and why we build this.</span> </span> </a></li> <li><a href="#careers" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Careers</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Open roles, remote-first.</span> </span> </a></li> <li><a href="#press" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-start hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Press</span> <span class="mt-1 line-clamp-2 block leading-snug text-muted-foreground">Logos, photos and contacts.</span> </span> </a></li> </ul> </div> </li> <li class="relative"> <button type="button" id="ui-navigation-menu-43b17b40-trigger-2" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" aria-expanded="false" aria-controls="ui-navigation-menu-43b17b40-panel-2" data-ui--navigation-menu-target="top trigger" data-action="click->ui--navigation-menu#toggle pointerenter->ui--navigation-menu#hoverOpen pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#topKeydown">Legal<i data-lucide="chevron-down" class="inline-block shrink-0 w-3 h-3 transition-transform duration-200 group-aria-expanded/nav-item:rotate-180 motion-reduce:transition-none" aria-hidden="true"></i> </button> <div id="ui-navigation-menu-43b17b40-panel-2" hidden="hidden" class="z-50 max-w-[calc(100vw-1rem)] rounded-lg border bg-popover p-2 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 w-96" data-ui--navigation-menu-target="panel" data-state="closed" data-action="pointerenter->ui--navigation-menu#cancelClose pointerleave->ui--navigation-menu#hoverClose keydown->ui--navigation-menu#panelKeydown"> <ul class="grid gap-1"> <li><a href="#terms" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-center hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Terms</span> </span> </a></li> <li><a href="#privacy" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-center hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Privacy</span> </span> </a></li> <li><a href="#cookies" class="flex gap-3 rounded-md p-3 text-sm outline-none transition-colors items-center hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:ring-2 focus-visible:ring-primary aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="link"> <span class="min-w-0"> <span class="block font-medium leading-snug">Cookies</span> </span> </a></li> </ul> </div> </li> <li class="relative"> <a href="#status" class="group/nav-item inline-flex h-9 items-center justify-center gap-1 rounded-md px-3 text-sm font-medium whitespace-nowrap text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-1 aria-expanded:bg-accent aria-expanded:text-accent-foreground data-[active]:bg-accent/60 aria-[current=page]:bg-accent/60" data-ui--navigation-menu-target="top" data-action="keydown->ui--navigation-menu#topKeydown">Status</a> </li> </ul> </nav> </div> </footer></div>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<div class="min-h-screen bg-background"> <header class="sticky top-0 z-40 border-b bg-background/95 backdrop-blur"> <div class="mx-auto flex h-14 max-w-6xl items-center gap-6 px-4"> <a href="#" class="flex items-center gap-2 font-semibold"><span class="size-6 rounded-md bg-primary"></span>Acme</a> <%= render(UI::NavigationMenu.new(label: "Main", open_delay: open_delay, close_delay: close_delay)) do |nav| %> <% nav.with_item(label: "Products", columns: 2) do |item| %> <% item.with_link(title: "Analytics", href: "#analytics", icon: "chart-column", description: "See what customers do, as they do it.") %> <% item.with_link(title: "Automations", href: "#automations", icon: "workflow", description: "Run the repetitive parts on a schedule.") %> <% item.with_link(title: "Inbox", href: "#inbox", icon: "message-circle", description: "Every conversation in one place.") %> <% item.with_link(title: "Billing", href: "#billing", icon: "credit-card", description: "Invoices, plans and payment methods.") %> <% item.with_link(title: "Storefront", href: "#storefront", icon: "store", description: "Sell online with a page you own.") %> <% item.with_link(title: "Notifications", href: "#notifications", icon: "bell", description: "Email, SMS and push from one API.") %> <% item.with_link(title: "Security", href: "#security", icon: "shield", description: "SSO, audit logs and roles.") %> <% item.with_link(title: "Integrations", href: "#integrations", icon: "layout-grid", description: "Connect the tools you already use.") %> <% end %> <% nav.with_item(label: "Solutions", columns: 2) do |item| %> <% item.with_link(title: "Startups", href: "#startups", description: "Everything to launch, on a free plan.") %> <% item.with_link(title: "Enterprise", href: "#enterprise", description: "Scale, compliance and a named contact.") %> <% item.with_link(title: "Agencies", href: "#agencies", description: "Run every client from one account.") %> <% item.with_link(title: "Education", href: "#education", description: "Discounts for schools and students.") %> <% item.with_link(title: "Nonprofits", href: "#nonprofits", description: "Half price for registered charities.") %> <% item.with_link(title: "Developers", href: "#developers", description: "APIs, webhooks and SDKs.") %> <% end %> <% nav.with_item(label: "Resources") do |item| %> <% item.with_link(title: "Documentation", href: "#docs", icon: "book-open", description: "Guides and the API reference.") %> <% item.with_link(title: "Blog", href: "#blog", icon: "newspaper", description: "Product news and how-tos.") %> <% item.with_link(title: "Changelog", href: "#changelog", icon: "rocket", description: "What shipped this week.") %> <% item.with_link(title: "Academy", href: "#academy", icon: "graduation-cap", description: "Free courses, start to finish.") %> <% item.with_link(title: "Help centre", href: "#help", icon: "life-buoy", description: "Answers, and a human when you need one.") %> <% end %> <% nav.with_item(label: "Pricing", href: "#pricing") %> <% nav.with_item(label: "Docs", href: "#docs", active: true) %> <% end %> <div class="ml-auto flex items-center gap-2"> <%= render(UI::Button.new(variant: :ghost, size: :sm)) { "Sign in" } %> <%= render(UI::Button.new(size: :sm)) { "Get started" } %> </div> </div> </header> <main class="mx-auto max-w-3xl space-y-6 px-4 py-12"> <h1 class="text-3xl font-bold tracking-tight">Scroll this page with a menu open</h1> <p class="text-muted-foreground">The header sticks to the top and its panels stay attached to their triggers. At the bottom there's a footer menu: its panels open upwards, because there's no room below.</p> <% 8.times do |i| %> <section class="space-y-2"> <h2 class="text-lg font-semibold">Section <%= i + 1 %></h2> <p class="text-sm text-muted-foreground">Placeholder copy so the page is long enough to scroll. Open a menu in the header, then scroll up and down: the panel follows the trigger. Then scroll to the footer and open one of its menus.</p> <div class="h-32 rounded-lg border bg-muted/40"></div> </section> <% end %> </main> <footer class="border-t"> <div class="mx-auto flex max-w-6xl items-center justify-between gap-4 px-4 py-6"> <span class="text-sm text-muted-foreground">© Acme</span> <%= render(UI::NavigationMenu.new(label: "Footer")) do |nav| %> <% nav.with_item(label: "Company") do |item| %> <% item.with_link(title: "About", href: "#about", description: "Who we are and why we build this.") %> <% item.with_link(title: "Careers", href: "#careers", description: "Open roles, remote-first.") %> <% item.with_link(title: "Press", href: "#press", description: "Logos, photos and contacts.") %> <% end %> <% nav.with_item(label: "Legal") do |item| %> <% item.with_link(title: "Terms", href: "#terms") %> <% item.with_link(title: "Privacy", href: "#privacy") %> <% item.with_link(title: "Cookies", href: "#cookies") %> <% end %> <% nav.with_item(label: "Status", href: "#status") %> <% end %> </div> </footer></div>A sticky site header with several menus, on a page long enough to scroll, and a second menu in the footer whose panels open upwards.