@arolariu/components 0.3.0 → 0.4.0

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 (141) hide show
  1. package/EXAMPLES.md +1035 -1035
  2. package/changelog.md +9 -0
  3. package/dist/components/ui/accordion.js.map +1 -1
  4. package/dist/components/ui/alert-dialog.js.map +1 -1
  5. package/dist/components/ui/alert.d.ts.map +1 -1
  6. package/dist/components/ui/alert.js.map +1 -1
  7. package/dist/components/ui/aspect-ratio.js.map +1 -1
  8. package/dist/components/ui/avatar.d.ts.map +1 -1
  9. package/dist/components/ui/avatar.js.map +1 -1
  10. package/dist/components/ui/background-beams.js.map +1 -1
  11. package/dist/components/ui/badge.js.map +1 -1
  12. package/dist/components/ui/breadcrumb.js.map +1 -1
  13. package/dist/components/ui/bubble-background.js.map +1 -1
  14. package/dist/components/ui/button-group.js.map +1 -1
  15. package/dist/components/ui/button.js.map +1 -1
  16. package/dist/components/ui/calendar.d.ts.map +1 -1
  17. package/dist/components/ui/calendar.js.map +1 -1
  18. package/dist/components/ui/card.js.map +1 -1
  19. package/dist/components/ui/carousel.js +1 -1
  20. package/dist/components/ui/carousel.js.map +1 -1
  21. package/dist/components/ui/chart.d.ts.map +1 -1
  22. package/dist/components/ui/chart.js.map +1 -1
  23. package/dist/components/ui/checkbox.js +2 -2
  24. package/dist/components/ui/checkbox.js.map +1 -1
  25. package/dist/components/ui/collapsible.js.map +1 -1
  26. package/dist/components/ui/command.d.ts.map +1 -1
  27. package/dist/components/ui/command.js.map +1 -1
  28. package/dist/components/ui/context-menu.js.map +1 -1
  29. package/dist/components/ui/counting-number.js.map +1 -1
  30. package/dist/components/ui/dialog.js.map +1 -1
  31. package/dist/components/ui/dot-background.js.map +1 -1
  32. package/dist/components/ui/drawer.js.map +1 -1
  33. package/dist/components/ui/dropdown-menu.js.map +1 -1
  34. package/dist/components/ui/dropdrawer.js.map +1 -1
  35. package/dist/components/ui/empty.js.map +1 -1
  36. package/dist/components/ui/field.js +2 -2
  37. package/dist/components/ui/field.js.map +1 -1
  38. package/dist/components/ui/fireworks-background.js.map +1 -1
  39. package/dist/components/ui/flip-button.js.map +1 -1
  40. package/dist/components/ui/form.d.ts.map +1 -1
  41. package/dist/components/ui/form.js +5 -4
  42. package/dist/components/ui/form.js.map +1 -1
  43. package/dist/components/ui/gradient-background.js.map +1 -1
  44. package/dist/components/ui/gradient-text.js.map +1 -1
  45. package/dist/components/ui/highlight-text.js.map +1 -1
  46. package/dist/components/ui/hole-background.js.map +1 -1
  47. package/dist/components/ui/hover-card.js.map +1 -1
  48. package/dist/components/ui/input-group.d.ts.map +1 -1
  49. package/dist/components/ui/input-group.js.map +1 -1
  50. package/dist/components/ui/input-otp.d.ts.map +1 -1
  51. package/dist/components/ui/input-otp.js +1 -1
  52. package/dist/components/ui/input-otp.js.map +1 -1
  53. package/dist/components/ui/input.js.map +1 -1
  54. package/dist/components/ui/item.js.map +1 -1
  55. package/dist/components/ui/kbd.js.map +1 -1
  56. package/dist/components/ui/label.js.map +1 -1
  57. package/dist/components/ui/menubar.js.map +1 -1
  58. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  59. package/dist/components/ui/navigation-menu.js +0 -1
  60. package/dist/components/ui/navigation-menu.js.map +1 -1
  61. package/dist/components/ui/pagination.d.ts.map +1 -1
  62. package/dist/components/ui/pagination.js.map +1 -1
  63. package/dist/components/ui/popover.js.map +1 -1
  64. package/dist/components/ui/progress.js.map +1 -1
  65. package/dist/components/ui/radio-group.js.map +1 -1
  66. package/dist/components/ui/resizable.d.ts +3 -2
  67. package/dist/components/ui/resizable.d.ts.map +1 -1
  68. package/dist/components/ui/resizable.js +2 -1
  69. package/dist/components/ui/resizable.js.map +1 -1
  70. package/dist/components/ui/ripple-button.js.map +1 -1
  71. package/dist/components/ui/scratcher.js.map +1 -1
  72. package/dist/components/ui/scroll-area.js.map +1 -1
  73. package/dist/components/ui/select.js.map +1 -1
  74. package/dist/components/ui/separator.js.map +1 -1
  75. package/dist/components/ui/sheet.js.map +1 -1
  76. package/dist/components/ui/sidebar.d.ts.map +1 -1
  77. package/dist/components/ui/sidebar.js +3 -2
  78. package/dist/components/ui/sidebar.js.map +1 -1
  79. package/dist/components/ui/skeleton.js.map +1 -1
  80. package/dist/components/ui/slider.d.ts.map +1 -1
  81. package/dist/components/ui/slider.js.map +1 -1
  82. package/dist/components/ui/sonner.js.map +1 -1
  83. package/dist/components/ui/spinner.js.map +1 -1
  84. package/dist/components/ui/switch.js.map +1 -1
  85. package/dist/components/ui/table.d.ts.map +1 -1
  86. package/dist/components/ui/table.js.map +1 -1
  87. package/dist/components/ui/tabs.js.map +1 -1
  88. package/dist/components/ui/textarea.js.map +1 -1
  89. package/dist/components/ui/toggle-group.js.map +1 -1
  90. package/dist/components/ui/toggle.js.map +1 -1
  91. package/dist/components/ui/tooltip.js.map +1 -1
  92. package/dist/components/ui/typewriter.js +6 -2
  93. package/dist/components/ui/typewriter.js.map +1 -1
  94. package/dist/hooks/useIsMobile.js.map +1 -1
  95. package/dist/hooks/useWindowSize.js.map +1 -1
  96. package/dist/index.css +25 -1779
  97. package/dist/index.css.map +1 -1
  98. package/dist/lib/utilities.js.map +1 -1
  99. package/package.json +2 -15
  100. package/src/components/ui/accordion.tsx +3 -3
  101. package/src/components/ui/alert-dialog.tsx +6 -6
  102. package/src/components/ui/alert.tsx +1 -0
  103. package/src/components/ui/avatar.tsx +12 -11
  104. package/src/components/ui/calendar.tsx +2 -0
  105. package/src/components/ui/carousel.tsx +1 -1
  106. package/src/components/ui/chart.tsx +2 -0
  107. package/src/components/ui/checkbox.tsx +3 -3
  108. package/src/components/ui/command.tsx +8 -7
  109. package/src/components/ui/context-menu.tsx +8 -8
  110. package/src/components/ui/dialog.tsx +4 -4
  111. package/src/components/ui/drawer.tsx +4 -4
  112. package/src/components/ui/dropdown-menu.tsx +8 -8
  113. package/src/components/ui/field.tsx +5 -4
  114. package/src/components/ui/form.tsx +12 -8
  115. package/src/components/ui/hover-card.tsx +1 -1
  116. package/src/components/ui/input-group.tsx +2 -0
  117. package/src/components/ui/input-otp.tsx +5 -5
  118. package/src/components/ui/label.tsx +1 -1
  119. package/src/components/ui/menubar.tsx +10 -10
  120. package/src/components/ui/navigation-menu.tsx +6 -7
  121. package/src/components/ui/pagination.tsx +1 -0
  122. package/src/components/ui/popover.tsx +1 -1
  123. package/src/components/ui/progress.tsx +1 -1
  124. package/src/components/ui/radio-group.tsx +2 -2
  125. package/src/components/ui/resizable.tsx +2 -1
  126. package/src/components/ui/scroll-area.tsx +2 -2
  127. package/src/components/ui/select.tsx +7 -7
  128. package/src/components/ui/separator.tsx +1 -1
  129. package/src/components/ui/sheet.tsx +4 -4
  130. package/src/components/ui/sidebar.tsx +22 -14
  131. package/src/components/ui/slider.tsx +14 -13
  132. package/src/components/ui/switch.tsx +1 -1
  133. package/src/components/ui/table.tsx +2 -0
  134. package/src/components/ui/tabs.tsx +3 -3
  135. package/src/components/ui/toggle-group.tsx +2 -2
  136. package/src/components/ui/toggle.tsx +1 -1
  137. package/src/components/ui/tooltip.tsx +1 -1
  138. package/src/components/ui/typewriter.tsx +2 -2
  139. package/src/index.css +6 -6
  140. package/dist/components/ui/field.d.ts +0 -25
  141. package/dist/components/ui/field.d.ts.map +0 -1
package/EXAMPLES.md CHANGED
@@ -1,1035 +1,1035 @@
1
- # 💡 Usage Examples for @arolariu/components
2
-
3
- > **Real-world examples to get you building faster!** Copy, paste, and customize these patterns for your projects.
4
-
5
- ## 🚀 Getting Started
6
-
7
- ### Installation & Setup
8
-
9
- ```bash
10
- # Install the package
11
- npm install @arolariu/components
12
-
13
- # Install peer dependencies if needed
14
- npm install react react-dom tailwindcss
15
- ```
16
-
17
- ```tsx
18
- // Add to your app's root (App.tsx, main.tsx, or _app.tsx)
19
- import "@arolariu/components/styles";
20
- ```
21
-
22
- ---
23
-
24
- ## 🎨 Layout Examples
25
-
26
- ### Simple Card Layout
27
-
28
- ```tsx
29
- import {
30
- Card,
31
- CardHeader,
32
- CardTitle,
33
- CardContent,
34
- CardFooter,
35
- } from "@arolariu/components/card";
36
- import { Button } from "@arolariu/components/button";
37
- import { Badge } from "@arolariu/components/badge";
38
-
39
- export function ProductCard() {
40
- return (
41
- <Card className="w-96">
42
- <CardHeader>
43
- <div className="flex items-center justify-between">
44
- <CardTitle>Premium Plan</CardTitle>
45
- <Badge variant="secondary">Popular</Badge>
46
- </div>
47
- </CardHeader>
48
- <CardContent>
49
- <p className="text-3xl font-bold">
50
- $29<span className="text-sm font-normal">/month</span>
51
- </p>
52
- <ul className="mt-4 space-y-2">
53
- <li>✅ Unlimited projects</li>
54
- <li>✅ Priority support</li>
55
- <li>✅ Advanced analytics</li>
56
- </ul>
57
- </CardContent>
58
- <CardFooter>
59
- <Button className="w-full">Subscribe Now</Button>
60
- </CardFooter>
61
- </Card>
62
- );
63
- }
64
- ```
65
-
66
- ### Dashboard Layout with Sidebar
67
-
68
- ```tsx
69
- import {
70
- Sidebar,
71
- SidebarContent,
72
- SidebarMenuItem,
73
- } from "@arolariu/components/sidebar";
74
- import {
75
- Card,
76
- CardContent,
77
- CardHeader,
78
- CardTitle,
79
- } from "@arolariu/components/card";
80
- import { Progress } from "@arolariu/components/progress";
81
- import {
82
- Avatar,
83
- AvatarImage,
84
- AvatarFallback,
85
- } from "@arolariu/components/avatar";
86
-
87
- export function Dashboard() {
88
- return (
89
- <div className="flex h-screen">
90
- {/* Sidebar */}
91
- <Sidebar>
92
- <SidebarContent>
93
- <SidebarMenuItem href="/dashboard">Dashboard</SidebarMenuItem>
94
- <SidebarMenuItem href="/projects">Projects</SidebarMenuItem>
95
- <SidebarMenuItem href="/settings">Settings</SidebarMenuItem>
96
- </SidebarContent>
97
- </Sidebar>
98
-
99
- {/* Main Content */}
100
- <main className="flex-1 p-6 overflow-auto">
101
- <h1 className="text-3xl font-bold mb-6">Dashboard</h1>
102
-
103
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
104
- <Card>
105
- <CardHeader>
106
- <CardTitle>Project Progress</CardTitle>
107
- </CardHeader>
108
- <CardContent>
109
- <Progress value={75} className="w-full" />
110
- <p className="text-sm text-muted-foreground mt-2">75% complete</p>
111
- </CardContent>
112
- </Card>
113
-
114
- <Card>
115
- <CardHeader>
116
- <CardTitle>Team Members</CardTitle>
117
- </CardHeader>
118
- <CardContent>
119
- <div className="flex -space-x-2">
120
- <Avatar className="border-2 border-background">
121
- <AvatarImage src="/avatar1.jpg" />
122
- <AvatarFallback>JD</AvatarFallback>
123
- </Avatar>
124
- <Avatar className="border-2 border-background">
125
- <AvatarImage src="/avatar2.jpg" />
126
- <AvatarFallback>SM</AvatarFallback>
127
- </Avatar>
128
- <Avatar className="border-2 border-background">
129
- <AvatarFallback>+3</AvatarFallback>
130
- </Avatar>
131
- </div>
132
- </CardContent>
133
- </Card>
134
- </div>
135
- </main>
136
- </div>
137
- );
138
- }
139
- ```
140
-
141
- ---
142
-
143
- ## 📝 Form Examples
144
-
145
- ### Complete Login Form
146
-
147
- ```tsx
148
- import {
149
- Card,
150
- CardHeader,
151
- CardTitle,
152
- CardContent,
153
- CardFooter,
154
- } from "@arolariu/components/card";
155
- import { Input } from "@arolariu/components/input";
156
- import { Button } from "@arolariu/components/button";
157
- import { Label } from "@arolariu/components/label";
158
- import { Checkbox } from "@arolariu/components/checkbox";
159
- import { Alert, AlertDescription } from "@arolariu/components/alert";
160
- import { useState } from "react";
161
-
162
- export function LoginForm() {
163
- const [email, setEmail] = useState("");
164
- const [password, setPassword] = useState("");
165
- const [rememberMe, setRememberMe] = useState(false);
166
- const [error, setError] = useState("");
167
- const [loading, setLoading] = useState(false);
168
-
169
- const handleSubmit = async (e: React.FormEvent) => {
170
- e.preventDefault();
171
- setLoading(true);
172
- setError("");
173
-
174
- try {
175
- // Your login logic here
176
- await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate API call
177
- console.log("Login successful!");
178
- } catch (err) {
179
- setError("Invalid email or password");
180
- } finally {
181
- setLoading(false);
182
- }
183
- };
184
-
185
- return (
186
- <div className="min-h-screen flex items-center justify-center bg-gray-50">
187
- <Card className="w-full max-w-md">
188
- <CardHeader>
189
- <CardTitle className="text-center">Welcome Back</CardTitle>
190
- </CardHeader>
191
- <form onSubmit={handleSubmit}>
192
- <CardContent className="space-y-4">
193
- {error && (
194
- <Alert variant="destructive">
195
- <AlertDescription>{error}</AlertDescription>
196
- </Alert>
197
- )}
198
-
199
- <div className="space-y-2">
200
- <Label htmlFor="email">Email</Label>
201
- <Input
202
- id="email"
203
- type="email"
204
- placeholder="you@example.com"
205
- value={email}
206
- onChange={(e) => setEmail(e.target.value)}
207
- required
208
- />
209
- </div>
210
-
211
- <div className="space-y-2">
212
- <Label htmlFor="password">Password</Label>
213
- <Input
214
- id="password"
215
- type="password"
216
- value={password}
217
- onChange={(e) => setPassword(e.target.value)}
218
- required
219
- />
220
- </div>
221
-
222
- <div className="flex items-center space-x-2">
223
- <Checkbox
224
- id="remember"
225
- checked={rememberMe}
226
- onCheckedChange={setRememberMe}
227
- />
228
- <Label htmlFor="remember">Remember me</Label>
229
- </div>
230
- </CardContent>
231
-
232
- <CardFooter className="flex flex-col space-y-2">
233
- <Button type="submit" className="w-full" disabled={loading}>
234
- {loading ? "Signing in..." : "Sign In"}
235
- </Button>
236
- <Button variant="link" size="sm">
237
- Forgot your password?
238
- </Button>
239
- </CardFooter>
240
- </form>
241
- </Card>
242
- </div>
243
- );
244
- }
245
- ```
246
-
247
- ### Advanced Form with Validation
248
-
249
- ```tsx
250
- import { useForm } from "react-hook-form";
251
- import { zodResolver } from "@hookform/resolvers/zod";
252
- import * as z from "zod";
253
- import {
254
- Form,
255
- FormControl,
256
- FormDescription,
257
- FormField,
258
- FormItem,
259
- FormLabel,
260
- FormMessage,
261
- } from "@arolariu/components/form";
262
- import { Input } from "@arolariu/components/input";
263
- import { Button } from "@arolariu/components/button";
264
- import {
265
- Select,
266
- SelectContent,
267
- SelectItem,
268
- SelectTrigger,
269
- SelectValue,
270
- } from "@arolariu/components/select";
271
- import { Textarea } from "@arolariu/components/textarea";
272
-
273
- const formSchema = z.object({
274
- firstName: z.string().min(2, "First name must be at least 2 characters"),
275
- lastName: z.string().min(2, "Last name must be at least 2 characters"),
276
- email: z.string().email("Invalid email address"),
277
- role: z.string().min(1, "Please select a role"),
278
- bio: z.string().max(500, "Bio must be less than 500 characters").optional(),
279
- });
280
-
281
- export function ProfileForm() {
282
- const form = useForm<z.infer<typeof formSchema>>({
283
- resolver: zodResolver(formSchema),
284
- defaultValues: {
285
- firstName: "",
286
- lastName: "",
287
- email: "",
288
- role: "",
289
- bio: "",
290
- },
291
- });
292
-
293
- function onSubmit(values: z.infer<typeof formSchema>) {
294
- console.log(values);
295
- }
296
-
297
- return (
298
- <Form {...form}>
299
- <form
300
- onSubmit={form.handleSubmit(onSubmit)}
301
- className="space-y-6 max-w-md"
302
- >
303
- <div className="grid grid-cols-2 gap-4">
304
- <FormField
305
- control={form.control}
306
- name="firstName"
307
- render={({ field }) => (
308
- <FormItem>
309
- <FormLabel>First Name</FormLabel>
310
- <FormControl>
311
- <Input placeholder="John" {...field} />
312
- </FormControl>
313
- <FormMessage />
314
- </FormItem>
315
- )}
316
- />
317
-
318
- <FormField
319
- control={form.control}
320
- name="lastName"
321
- render={({ field }) => (
322
- <FormItem>
323
- <FormLabel>Last Name</FormLabel>
324
- <FormControl>
325
- <Input placeholder="Doe" {...field} />
326
- </FormControl>
327
- <FormMessage />
328
- </FormItem>
329
- )}
330
- />
331
- </div>
332
-
333
- <FormField
334
- control={form.control}
335
- name="email"
336
- render={({ field }) => (
337
- <FormItem>
338
- <FormLabel>Email</FormLabel>
339
- <FormControl>
340
- <Input placeholder="john.doe@example.com" {...field} />
341
- </FormControl>
342
- <FormDescription>
343
- We'll never share your email with anyone else.
344
- </FormDescription>
345
- <FormMessage />
346
- </FormItem>
347
- )}
348
- />
349
-
350
- <FormField
351
- control={form.control}
352
- name="role"
353
- render={({ field }) => (
354
- <FormItem>
355
- <FormLabel>Role</FormLabel>
356
- <Select onValueChange={field.onChange} defaultValue={field.value}>
357
- <FormControl>
358
- <SelectTrigger>
359
- <SelectValue placeholder="Select a role" />
360
- </SelectTrigger>
361
- </FormControl>
362
- <SelectContent>
363
- <SelectItem value="developer">Developer</SelectItem>
364
- <SelectItem value="designer">Designer</SelectItem>
365
- <SelectItem value="manager">Manager</SelectItem>
366
- </SelectContent>
367
- </Select>
368
- <FormMessage />
369
- </FormItem>
370
- )}
371
- />
372
-
373
- <FormField
374
- control={form.control}
375
- name="bio"
376
- render={({ field }) => (
377
- <FormItem>
378
- <FormLabel>Bio</FormLabel>
379
- <FormControl>
380
- <Textarea
381
- placeholder="Tell us about yourself"
382
- className="min-h-[100px]"
383
- {...field}
384
- />
385
- </FormControl>
386
- <FormMessage />
387
- </FormItem>
388
- )}
389
- />
390
-
391
- <Button type="submit">Save Profile</Button>
392
- </form>
393
- </Form>
394
- );
395
- }
396
- ```
397
-
398
- ---
399
-
400
- ## 🧭 Navigation Examples
401
-
402
- ### Responsive Header Navigation
403
-
404
- ```tsx
405
- import {
406
- NavigationMenu,
407
- NavigationMenuItem,
408
- NavigationMenuList,
409
- } from "@arolariu/components/navigation-menu";
410
- import { Button } from "@arolariu/components/button";
411
- import { Sheet, SheetContent, SheetTrigger } from "@arolariu/components/sheet";
412
- import {
413
- Avatar,
414
- AvatarImage,
415
- AvatarFallback,
416
- } from "@arolariu/components/avatar";
417
- import {
418
- DropdownMenu,
419
- DropdownMenuContent,
420
- DropdownMenuItem,
421
- DropdownMenuTrigger,
422
- } from "@arolariu/components/dropdown-menu";
423
- import { MenuIcon, User, Settings, LogOut } from "lucide-react";
424
-
425
- export function AppHeader() {
426
- return (
427
- <header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
428
- <div className="container flex h-14 items-center">
429
- <div className="mr-4 hidden md:flex">
430
- <a className="mr-6 flex items-center space-x-2" href="/">
431
- <span className="hidden font-bold sm:inline-block">MyApp</span>
432
- </a>
433
-
434
- <NavigationMenu>
435
- <NavigationMenuList>
436
- <NavigationMenuItem>
437
- <Button variant="ghost" href="/dashboard">
438
- Dashboard
439
- </Button>
440
- </NavigationMenuItem>
441
- <NavigationMenuItem>
442
- <Button variant="ghost" href="/projects">
443
- Projects
444
- </Button>
445
- </NavigationMenuItem>
446
- <NavigationMenuItem>
447
- <Button variant="ghost" href="/analytics">
448
- Analytics
449
- </Button>
450
- </NavigationMenuItem>
451
- </NavigationMenuList>
452
- </NavigationMenu>
453
- </div>
454
-
455
- {/* Mobile Navigation */}
456
- <Sheet>
457
- <SheetTrigger asChild>
458
- <Button
459
- variant="ghost"
460
- className="mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
461
- >
462
- <MenuIcon className="h-5 w-5" />
463
- </Button>
464
- </SheetTrigger>
465
- <SheetContent side="left">
466
- <nav className="flex flex-col space-y-3">
467
- <Button
468
- variant="ghost"
469
- className="justify-start"
470
- href="/dashboard"
471
- >
472
- Dashboard
473
- </Button>
474
- <Button
475
- variant="ghost"
476
- className="justify-start"
477
- href="/projects"
478
- >
479
- Projects
480
- </Button>
481
- <Button
482
- variant="ghost"
483
- className="justify-start"
484
- href="/analytics"
485
- >
486
- Analytics
487
- </Button>
488
- </nav>
489
- </SheetContent>
490
- </Sheet>
491
-
492
- <div className="flex flex-1 items-center justify-between space-x-2 md:justify-end">
493
- <div className="w-full flex-1 md:w-auto md:flex-none">
494
- {/* Search or other content can go here */}
495
- </div>
496
-
497
- {/* User Menu */}
498
- <DropdownMenu>
499
- <DropdownMenuTrigger asChild>
500
- <Button variant="ghost" className="relative h-8 w-8 rounded-full">
501
- <Avatar className="h-8 w-8">
502
- <AvatarImage src="/avatars/01.png" alt="User" />
503
- <AvatarFallback>JD</AvatarFallback>
504
- </Avatar>
505
- </Button>
506
- </DropdownMenuTrigger>
507
- <DropdownMenuContent className="w-56" align="end" forceMount>
508
- <DropdownMenuItem>
509
- <User className="mr-2 h-4 w-4" />
510
- <span>Profile</span>
511
- </DropdownMenuItem>
512
- <DropdownMenuItem>
513
- <Settings className="mr-2 h-4 w-4" />
514
- <span>Settings</span>
515
- </DropdownMenuItem>
516
- <DropdownMenuItem>
517
- <LogOut className="mr-2 h-4 w-4" />
518
- <span>Log out</span>
519
- </DropdownMenuItem>
520
- </DropdownMenuContent>
521
- </DropdownMenu>
522
- </div>
523
- </div>
524
- </header>
525
- );
526
- }
527
- ```
528
-
529
- ---
530
-
531
- ## 📊 Data Display Examples
532
-
533
- ### Interactive Data Table
534
-
535
- ```tsx
536
- import {
537
- Table,
538
- TableBody,
539
- TableCaption,
540
- TableCell,
541
- TableHead,
542
- TableHeader,
543
- TableRow,
544
- } from "@arolariu/components/table";
545
- import { Badge } from "@arolariu/components/badge";
546
- import { Button } from "@arolariu/components/button";
547
- import {
548
- DropdownMenu,
549
- DropdownMenuContent,
550
- DropdownMenuItem,
551
- DropdownMenuTrigger,
552
- } from "@arolariu/components/dropdown-menu";
553
- import { MoreHorizontal, Eye, Edit, Trash } from "lucide-react";
554
-
555
- interface User {
556
- id: string;
557
- name: string;
558
- email: string;
559
- role: string;
560
- status: "active" | "inactive" | "pending";
561
- lastLogin: string;
562
- }
563
-
564
- const users: User[] = [
565
- {
566
- id: "1",
567
- name: "John Doe",
568
- email: "john@example.com",
569
- role: "Admin",
570
- status: "active",
571
- lastLogin: "2 hours ago",
572
- },
573
- {
574
- id: "2",
575
- name: "Jane Smith",
576
- email: "jane@example.com",
577
- role: "User",
578
- status: "active",
579
- lastLogin: "1 day ago",
580
- },
581
- {
582
- id: "3",
583
- name: "Bob Johnson",
584
- email: "bob@example.com",
585
- role: "User",
586
- status: "pending",
587
- lastLogin: "Never",
588
- },
589
- ];
590
-
591
- export function UsersTable() {
592
- const getStatusBadge = (status: User["status"]) => {
593
- const variants = {
594
- active: "default",
595
- inactive: "secondary",
596
- pending: "outline",
597
- } as const;
598
-
599
- return <Badge variant={variants[status]}>{status}</Badge>;
600
- };
601
-
602
- return (
603
- <div className="w-full">
604
- <div className="rounded-md border">
605
- <Table>
606
- <TableCaption>A list of your team members.</TableCaption>
607
- <TableHeader>
608
- <TableRow>
609
- <TableHead>Name</TableHead>
610
- <TableHead>Email</TableHead>
611
- <TableHead>Role</TableHead>
612
- <TableHead>Status</TableHead>
613
- <TableHead>Last Login</TableHead>
614
- <TableHead className="w-[100px]">Actions</TableHead>
615
- </TableRow>
616
- </TableHeader>
617
- <TableBody>
618
- {users.map((user) => (
619
- <TableRow key={user.id}>
620
- <TableCell className="font-medium">{user.name}</TableCell>
621
- <TableCell>{user.email}</TableCell>
622
- <TableCell>{user.role}</TableCell>
623
- <TableCell>{getStatusBadge(user.status)}</TableCell>
624
- <TableCell>{user.lastLogin}</TableCell>
625
- <TableCell>
626
- <DropdownMenu>
627
- <DropdownMenuTrigger asChild>
628
- <Button variant="ghost" className="h-8 w-8 p-0">
629
- <MoreHorizontal className="h-4 w-4" />
630
- </Button>
631
- </DropdownMenuTrigger>
632
- <DropdownMenuContent align="end">
633
- <DropdownMenuItem>
634
- <Eye className="mr-2 h-4 w-4" />
635
- View
636
- </DropdownMenuItem>
637
- <DropdownMenuItem>
638
- <Edit className="mr-2 h-4 w-4" />
639
- Edit
640
- </DropdownMenuItem>
641
- <DropdownMenuItem className="text-red-600">
642
- <Trash className="mr-2 h-4 w-4" />
643
- Delete
644
- </DropdownMenuItem>
645
- </DropdownMenuContent>
646
- </DropdownMenu>
647
- </TableCell>
648
- </TableRow>
649
- ))}
650
- </TableBody>
651
- </Table>
652
- </div>
653
- </div>
654
- );
655
- }
656
- ```
657
-
658
- ---
659
-
660
- ## 💬 Modal & Dialog Examples
661
-
662
- ### Confirmation Dialog
663
-
664
- ```tsx
665
- import {
666
- AlertDialog,
667
- AlertDialogAction,
668
- AlertDialogCancel,
669
- AlertDialogContent,
670
- AlertDialogDescription,
671
- AlertDialogFooter,
672
- AlertDialogHeader,
673
- AlertDialogTitle,
674
- AlertDialogTrigger,
675
- } from "@arolariu/components/alert-dialog";
676
- import { Button } from "@arolariu/components/button";
677
- import { Trash } from "lucide-react";
678
-
679
- export function DeleteConfirmation({
680
- itemName,
681
- onConfirm,
682
- }: {
683
- itemName: string;
684
- onConfirm: () => void;
685
- }) {
686
- return (
687
- <AlertDialog>
688
- <AlertDialogTrigger asChild>
689
- <Button variant="destructive" size="sm">
690
- <Trash className="mr-2 h-4 w-4" />
691
- Delete
692
- </Button>
693
- </AlertDialogTrigger>
694
- <AlertDialogContent>
695
- <AlertDialogHeader>
696
- <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
697
- <AlertDialogDescription>
698
- This action cannot be undone. This will permanently delete "
699
- {itemName}" and remove all associated data from our servers.
700
- </AlertDialogDescription>
701
- </AlertDialogHeader>
702
- <AlertDialogFooter>
703
- <AlertDialogCancel>Cancel</AlertDialogCancel>
704
- <AlertDialogAction
705
- onClick={onConfirm}
706
- className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
707
- >
708
- Yes, delete it
709
- </AlertDialogAction>
710
- </AlertDialogFooter>
711
- </AlertDialogContent>
712
- </AlertDialog>
713
- );
714
- }
715
- ```
716
-
717
- ### Settings Modal
718
-
719
- ```tsx
720
- import {
721
- Dialog,
722
- DialogContent,
723
- DialogDescription,
724
- DialogFooter,
725
- DialogHeader,
726
- DialogTitle,
727
- DialogTrigger,
728
- } from "@arolariu/components/dialog";
729
- import { Button } from "@arolariu/components/button";
730
- import { Input } from "@arolariu/components/input";
731
- import { Label } from "@arolariu/components/label";
732
- import { Switch } from "@arolariu/components/switch";
733
- import {
734
- Select,
735
- SelectContent,
736
- SelectItem,
737
- SelectTrigger,
738
- SelectValue,
739
- } from "@arolariu/components/select";
740
- import {
741
- Tabs,
742
- TabsContent,
743
- TabsList,
744
- TabsTrigger,
745
- } from "@arolariu/components/tabs";
746
- import { Settings } from "lucide-react";
747
-
748
- export function SettingsDialog() {
749
- return (
750
- <Dialog>
751
- <DialogTrigger asChild>
752
- <Button variant="outline">
753
- <Settings className="mr-2 h-4 w-4" />
754
- Settings
755
- </Button>
756
- </DialogTrigger>
757
- <DialogContent className="sm:max-w-[525px]">
758
- <DialogHeader>
759
- <DialogTitle>Settings</DialogTitle>
760
- <DialogDescription>
761
- Manage your account settings and preferences.
762
- </DialogDescription>
763
- </DialogHeader>
764
-
765
- <Tabs defaultValue="general" className="w-full">
766
- <TabsList className="grid w-full grid-cols-3">
767
- <TabsTrigger value="general">General</TabsTrigger>
768
- <TabsTrigger value="notifications">Notifications</TabsTrigger>
769
- <TabsTrigger value="security">Security</TabsTrigger>
770
- </TabsList>
771
-
772
- <TabsContent value="general" className="space-y-4">
773
- <div className="space-y-2">
774
- <Label htmlFor="name">Display Name</Label>
775
- <Input id="name" defaultValue="John Doe" />
776
- </div>
777
- <div className="space-y-2">
778
- <Label htmlFor="email">Email</Label>
779
- <Input id="email" defaultValue="john@example.com" />
780
- </div>
781
- <div className="space-y-2">
782
- <Label htmlFor="timezone">Timezone</Label>
783
- <Select defaultValue="utc">
784
- <SelectTrigger>
785
- <SelectValue />
786
- </SelectTrigger>
787
- <SelectContent>
788
- <SelectItem value="utc">UTC</SelectItem>
789
- <SelectItem value="est">Eastern Time</SelectItem>
790
- <SelectItem value="pst">Pacific Time</SelectItem>
791
- </SelectContent>
792
- </Select>
793
- </div>
794
- </TabsContent>
795
-
796
- <TabsContent value="notifications" className="space-y-4">
797
- <div className="flex items-center justify-between">
798
- <div className="space-y-0.5">
799
- <Label>Email Notifications</Label>
800
- <div className="text-sm text-muted-foreground">
801
- Receive emails about your account activity.
802
- </div>
803
- </div>
804
- <Switch />
805
- </div>
806
- <div className="flex items-center justify-between">
807
- <div className="space-y-0.5">
808
- <Label>Push Notifications</Label>
809
- <div className="text-sm text-muted-foreground">
810
- Receive push notifications on your devices.
811
- </div>
812
- </div>
813
- <Switch />
814
- </div>
815
- </TabsContent>
816
-
817
- <TabsContent value="security" className="space-y-4">
818
- <div className="space-y-2">
819
- <Label htmlFor="current-password">Current Password</Label>
820
- <Input id="current-password" type="password" />
821
- </div>
822
- <div className="space-y-2">
823
- <Label htmlFor="new-password">New Password</Label>
824
- <Input id="new-password" type="password" />
825
- </div>
826
- <div className="space-y-2">
827
- <Label htmlFor="confirm-password">Confirm Password</Label>
828
- <Input id="confirm-password" type="password" />
829
- </div>
830
- </TabsContent>
831
- </Tabs>
832
-
833
- <DialogFooter>
834
- <Button variant="outline">Cancel</Button>
835
- <Button>Save Changes</Button>
836
- </DialogFooter>
837
- </DialogContent>
838
- </Dialog>
839
- );
840
- }
841
- ```
842
-
843
- ---
844
-
845
- ## 🎨 Background Effects Examples
846
-
847
- ### Animated Landing Page
848
-
849
- ```tsx
850
- import { DotBackground } from "@arolariu/components/dot-background";
851
- import { BubbleBackground } from "@arolariu/components/bubble-background";
852
- import { GradientBackground } from "@arolariu/components/gradient-background";
853
- import { Button } from "@arolariu/components/button";
854
- import { Card, CardContent } from "@arolariu/components/card";
855
-
856
- export function LandingPage() {
857
- return (
858
- <div className="relative min-h-screen overflow-hidden">
859
- {/* Animated Background */}
860
- <DotBackground className="absolute inset-0" />
861
- <GradientBackground className="absolute inset-0" />
862
-
863
- {/* Content */}
864
- <div className="relative z-10 flex min-h-screen flex-col items-center justify-center px-4 text-center">
865
- <h1 className="mb-6 text-4xl font-bold tracking-tight sm:text-6xl">
866
- Build Beautiful Apps
867
- <span className="bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent">
868
- {" "}
869
- Faster
870
- </span>
871
- </h1>
872
-
873
- <p className="mb-8 max-w-2xl text-lg text-muted-foreground">
874
- Create stunning user interfaces with our comprehensive React component
875
- library. Built with accessibility, performance, and developer
876
- experience in mind.
877
- </p>
878
-
879
- <div className="flex flex-col gap-4 sm:flex-row">
880
- <Button size="lg" className="px-8">
881
- Get Started
882
- </Button>
883
- <Button variant="outline" size="lg" className="px-8">
884
- View Components
885
- </Button>
886
- </div>
887
-
888
- {/* Feature Cards */}
889
- <div className="mt-16 grid gap-6 sm:grid-cols-3">
890
- <Card className="bg-card/50 backdrop-blur">
891
- <CardContent className="p-6 text-center">
892
- <h3 className="mb-2 text-lg font-semibold">60+ Components</h3>
893
- <p className="text-sm text-muted-foreground">
894
- Comprehensive set of UI components for any project
895
- </p>
896
- </CardContent>
897
- </Card>
898
-
899
- <Card className="bg-card/50 backdrop-blur">
900
- <CardContent className="p-6 text-center">
901
- <h3 className="mb-2 text-lg font-semibold">TypeScript First</h3>
902
- <p className="text-sm text-muted-foreground">
903
- Full type safety and excellent developer experience
904
- </p>
905
- </CardContent>
906
- </Card>
907
-
908
- <Card className="bg-card/50 backdrop-blur">
909
- <CardContent className="p-6 text-center">
910
- <h3 className="mb-2 text-lg font-semibold">Accessible</h3>
911
- <p className="text-sm text-muted-foreground">
912
- Built on Radix UI with WAI-ARIA compliance
913
- </p>
914
- </CardContent>
915
- </Card>
916
- </div>
917
- </div>
918
- </div>
919
- );
920
- }
921
- ```
922
-
923
- ---
924
-
925
- ## 📱 Mobile-First Examples
926
-
927
- ### Mobile-Optimized Form
928
-
929
- ```tsx
930
- import {
931
- Sheet,
932
- SheetContent,
933
- SheetDescription,
934
- SheetHeader,
935
- SheetTitle,
936
- SheetTrigger,
937
- } from "@arolariu/components/sheet";
938
- import { Button } from "@arolariu/components/button";
939
- import { Input } from "@arolariu/components/input";
940
- import { Label } from "@arolariu/components/label";
941
- import { Textarea } from "@arolariu/components/textarea";
942
- import { Plus } from "lucide-react";
943
-
944
- export function MobileAddForm() {
945
- return (
946
- <Sheet>
947
- <SheetTrigger asChild>
948
- <Button className="fixed bottom-4 right-4 h-14 w-14 rounded-full shadow-lg md:hidden">
949
- <Plus className="h-6 w-6" />
950
- </Button>
951
- </SheetTrigger>
952
- <SheetContent side="bottom" className="h-[80vh]">
953
- <SheetHeader>
954
- <SheetTitle>Add New Item</SheetTitle>
955
- <SheetDescription>
956
- Fill out the form below to add a new item to your collection.
957
- </SheetDescription>
958
- </SheetHeader>
959
-
960
- <div className="mt-6 space-y-4">
961
- <div className="space-y-2">
962
- <Label htmlFor="title">Title</Label>
963
- <Input id="title" placeholder="Enter title" />
964
- </div>
965
-
966
- <div className="space-y-2">
967
- <Label htmlFor="description">Description</Label>
968
- <Textarea
969
- id="description"
970
- placeholder="Enter description"
971
- className="min-h-[100px]"
972
- />
973
- </div>
974
-
975
- <div className="flex gap-2 pt-4">
976
- <Button className="flex-1">Save</Button>
977
- <Button variant="outline" className="flex-1">
978
- Cancel
979
- </Button>
980
- </div>
981
- </div>
982
- </SheetContent>
983
- </Sheet>
984
- );
985
- }
986
- ```
987
-
988
- ---
989
-
990
- ## 🎯 Tips for Success
991
-
992
- ### Performance Optimization
993
-
994
- ```tsx
995
- // ✅ Import only what you need for optimal bundle size
996
- import { Button } from "@arolariu/components/button";
997
- import { Card } from "@arolariu/components/card";
998
-
999
- // ❌ Avoid barrel imports
1000
- import { Button, Card } from "@arolariu/components";
1001
- ```
1002
-
1003
- ### Accessibility Best Practices
1004
-
1005
- ```tsx
1006
- // ✅ Always include proper labels and ARIA attributes
1007
- <Button aria-label="Close dialog" onClick={handleClose}>
1008
- <X className="h-4 w-4" />
1009
- </Button>
1010
-
1011
- // ✅ Use semantic HTML structure
1012
- <main role="main">
1013
- <section aria-labelledby="section-title">
1014
- <h2 id="section-title">Section Title</h2>
1015
- {/* content */}
1016
- </section>
1017
- </main>
1018
- ```
1019
-
1020
- ### Responsive Design
1021
-
1022
- ```tsx
1023
- // ✅ Use Tailwind's responsive utilities
1024
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
1025
- {/* components */}
1026
- </div>
1027
-
1028
- // ✅ Hide/show components based on screen size
1029
- <div className="block md:hidden">Mobile only content</div>
1030
- <div className="hidden md:block">Desktop only content</div>
1031
- ```
1032
-
1033
- ---
1034
-
1035
- Ready to build something amazing? **[🚀 Start with our Quick Start Guide](./README.md#-quick-start)**
1
+ # 💡 Usage Examples for @arolariu/components
2
+
3
+ > **Real-world examples to get you building faster!** Copy, paste, and customize these patterns for your projects.
4
+
5
+ ## 🚀 Getting Started
6
+
7
+ ### Installation & Setup
8
+
9
+ ```bash
10
+ # Install the package
11
+ npm install @arolariu/components
12
+
13
+ # Install peer dependencies if needed
14
+ npm install react react-dom tailwindcss
15
+ ```
16
+
17
+ ```tsx
18
+ // Add to your app's root (App.tsx, main.tsx, or _app.tsx)
19
+ import "@arolariu/components/styles";
20
+ ```
21
+
22
+ ---
23
+
24
+ ## 🎨 Layout Examples
25
+
26
+ ### Simple Card Layout
27
+
28
+ ```tsx
29
+ import {
30
+ Card,
31
+ CardHeader,
32
+ CardTitle,
33
+ CardContent,
34
+ CardFooter,
35
+ } from "@arolariu/components/card";
36
+ import { Button } from "@arolariu/components/button";
37
+ import { Badge } from "@arolariu/components/badge";
38
+
39
+ export function ProductCard() {
40
+ return (
41
+ <Card className="w-96">
42
+ <CardHeader>
43
+ <div className="flex items-center justify-between">
44
+ <CardTitle>Premium Plan</CardTitle>
45
+ <Badge variant="secondary">Popular</Badge>
46
+ </div>
47
+ </CardHeader>
48
+ <CardContent>
49
+ <p className="text-3xl font-bold">
50
+ $29<span className="text-sm font-normal">/month</span>
51
+ </p>
52
+ <ul className="mt-4 space-y-2">
53
+ <li>✅ Unlimited projects</li>
54
+ <li>✅ Priority support</li>
55
+ <li>✅ Advanced analytics</li>
56
+ </ul>
57
+ </CardContent>
58
+ <CardFooter>
59
+ <Button className="w-full">Subscribe Now</Button>
60
+ </CardFooter>
61
+ </Card>
62
+ );
63
+ }
64
+ ```
65
+
66
+ ### Dashboard Layout with Sidebar
67
+
68
+ ```tsx
69
+ import {
70
+ Sidebar,
71
+ SidebarContent,
72
+ SidebarMenuItem,
73
+ } from "@arolariu/components/sidebar";
74
+ import {
75
+ Card,
76
+ CardContent,
77
+ CardHeader,
78
+ CardTitle,
79
+ } from "@arolariu/components/card";
80
+ import { Progress } from "@arolariu/components/progress";
81
+ import {
82
+ Avatar,
83
+ AvatarImage,
84
+ AvatarFallback,
85
+ } from "@arolariu/components/avatar";
86
+
87
+ export function Dashboard() {
88
+ return (
89
+ <div className="flex h-screen">
90
+ {/* Sidebar */}
91
+ <Sidebar>
92
+ <SidebarContent>
93
+ <SidebarMenuItem href="/dashboard">Dashboard</SidebarMenuItem>
94
+ <SidebarMenuItem href="/projects">Projects</SidebarMenuItem>
95
+ <SidebarMenuItem href="/settings">Settings</SidebarMenuItem>
96
+ </SidebarContent>
97
+ </Sidebar>
98
+
99
+ {/* Main Content */}
100
+ <main className="flex-1 p-6 overflow-auto">
101
+ <h1 className="text-3xl font-bold mb-6">Dashboard</h1>
102
+
103
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
104
+ <Card>
105
+ <CardHeader>
106
+ <CardTitle>Project Progress</CardTitle>
107
+ </CardHeader>
108
+ <CardContent>
109
+ <Progress value={75} className="w-full" />
110
+ <p className="text-sm text-muted-foreground mt-2">75% complete</p>
111
+ </CardContent>
112
+ </Card>
113
+
114
+ <Card>
115
+ <CardHeader>
116
+ <CardTitle>Team Members</CardTitle>
117
+ </CardHeader>
118
+ <CardContent>
119
+ <div className="flex -space-x-2">
120
+ <Avatar className="border-2 border-background">
121
+ <AvatarImage src="/avatar1.jpg" />
122
+ <AvatarFallback>JD</AvatarFallback>
123
+ </Avatar>
124
+ <Avatar className="border-2 border-background">
125
+ <AvatarImage src="/avatar2.jpg" />
126
+ <AvatarFallback>SM</AvatarFallback>
127
+ </Avatar>
128
+ <Avatar className="border-2 border-background">
129
+ <AvatarFallback>+3</AvatarFallback>
130
+ </Avatar>
131
+ </div>
132
+ </CardContent>
133
+ </Card>
134
+ </div>
135
+ </main>
136
+ </div>
137
+ );
138
+ }
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 📝 Form Examples
144
+
145
+ ### Complete Login Form
146
+
147
+ ```tsx
148
+ import {
149
+ Card,
150
+ CardHeader,
151
+ CardTitle,
152
+ CardContent,
153
+ CardFooter,
154
+ } from "@arolariu/components/card";
155
+ import { Input } from "@arolariu/components/input";
156
+ import { Button } from "@arolariu/components/button";
157
+ import { Label } from "@arolariu/components/label";
158
+ import { Checkbox } from "@arolariu/components/checkbox";
159
+ import { Alert, AlertDescription } from "@arolariu/components/alert";
160
+ import { useState } from "react";
161
+
162
+ export function LoginForm() {
163
+ const [email, setEmail] = useState("");
164
+ const [password, setPassword] = useState("");
165
+ const [rememberMe, setRememberMe] = useState(false);
166
+ const [error, setError] = useState("");
167
+ const [loading, setLoading] = useState(false);
168
+
169
+ const handleSubmit = async (e: React.FormEvent) => {
170
+ e.preventDefault();
171
+ setLoading(true);
172
+ setError("");
173
+
174
+ try {
175
+ // Your login logic here
176
+ await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate API call
177
+ console.log("Login successful!");
178
+ } catch (err) {
179
+ setError("Invalid email or password");
180
+ } finally {
181
+ setLoading(false);
182
+ }
183
+ };
184
+
185
+ return (
186
+ <div className="min-h-screen flex items-center justify-center bg-gray-50">
187
+ <Card className="w-full max-w-md">
188
+ <CardHeader>
189
+ <CardTitle className="text-center">Welcome Back</CardTitle>
190
+ </CardHeader>
191
+ <form onSubmit={handleSubmit}>
192
+ <CardContent className="space-y-4">
193
+ {error && (
194
+ <Alert variant="destructive">
195
+ <AlertDescription>{error}</AlertDescription>
196
+ </Alert>
197
+ )}
198
+
199
+ <div className="space-y-2">
200
+ <Label htmlFor="email">Email</Label>
201
+ <Input
202
+ id="email"
203
+ type="email"
204
+ placeholder="you@example.com"
205
+ value={email}
206
+ onChange={(e) => setEmail(e.target.value)}
207
+ required
208
+ />
209
+ </div>
210
+
211
+ <div className="space-y-2">
212
+ <Label htmlFor="password">Password</Label>
213
+ <Input
214
+ id="password"
215
+ type="password"
216
+ value={password}
217
+ onChange={(e) => setPassword(e.target.value)}
218
+ required
219
+ />
220
+ </div>
221
+
222
+ <div className="flex items-center space-x-2">
223
+ <Checkbox
224
+ id="remember"
225
+ checked={rememberMe}
226
+ onCheckedChange={setRememberMe}
227
+ />
228
+ <Label htmlFor="remember">Remember me</Label>
229
+ </div>
230
+ </CardContent>
231
+
232
+ <CardFooter className="flex flex-col space-y-2">
233
+ <Button type="submit" className="w-full" disabled={loading}>
234
+ {loading ? "Signing in..." : "Sign In"}
235
+ </Button>
236
+ <Button variant="link" size="sm">
237
+ Forgot your password?
238
+ </Button>
239
+ </CardFooter>
240
+ </form>
241
+ </Card>
242
+ </div>
243
+ );
244
+ }
245
+ ```
246
+
247
+ ### Advanced Form with Validation
248
+
249
+ ```tsx
250
+ import { useForm } from "react-hook-form";
251
+ import { zodResolver } from "@hookform/resolvers/zod";
252
+ import * as z from "zod";
253
+ import {
254
+ Form,
255
+ FormControl,
256
+ FormDescription,
257
+ FormField,
258
+ FormItem,
259
+ FormLabel,
260
+ FormMessage,
261
+ } from "@arolariu/components/form";
262
+ import { Input } from "@arolariu/components/input";
263
+ import { Button } from "@arolariu/components/button";
264
+ import {
265
+ Select,
266
+ SelectContent,
267
+ SelectItem,
268
+ SelectTrigger,
269
+ SelectValue,
270
+ } from "@arolariu/components/select";
271
+ import { Textarea } from "@arolariu/components/textarea";
272
+
273
+ const formSchema = z.object({
274
+ firstName: z.string().min(2, "First name must be at least 2 characters"),
275
+ lastName: z.string().min(2, "Last name must be at least 2 characters"),
276
+ email: z.string().email("Invalid email address"),
277
+ role: z.string().min(1, "Please select a role"),
278
+ bio: z.string().max(500, "Bio must be less than 500 characters").optional(),
279
+ });
280
+
281
+ export function ProfileForm() {
282
+ const form = useForm<z.infer<typeof formSchema>>({
283
+ resolver: zodResolver(formSchema),
284
+ defaultValues: {
285
+ firstName: "",
286
+ lastName: "",
287
+ email: "",
288
+ role: "",
289
+ bio: "",
290
+ },
291
+ });
292
+
293
+ function onSubmit(values: z.infer<typeof formSchema>) {
294
+ console.log(values);
295
+ }
296
+
297
+ return (
298
+ <Form {...form}>
299
+ <form
300
+ onSubmit={form.handleSubmit(onSubmit)}
301
+ className="space-y-6 max-w-md"
302
+ >
303
+ <div className="grid grid-cols-2 gap-4">
304
+ <FormField
305
+ control={form.control}
306
+ name="firstName"
307
+ render={({ field }) => (
308
+ <FormItem>
309
+ <FormLabel>First Name</FormLabel>
310
+ <FormControl>
311
+ <Input placeholder="John" {...field} />
312
+ </FormControl>
313
+ <FormMessage />
314
+ </FormItem>
315
+ )}
316
+ />
317
+
318
+ <FormField
319
+ control={form.control}
320
+ name="lastName"
321
+ render={({ field }) => (
322
+ <FormItem>
323
+ <FormLabel>Last Name</FormLabel>
324
+ <FormControl>
325
+ <Input placeholder="Doe" {...field} />
326
+ </FormControl>
327
+ <FormMessage />
328
+ </FormItem>
329
+ )}
330
+ />
331
+ </div>
332
+
333
+ <FormField
334
+ control={form.control}
335
+ name="email"
336
+ render={({ field }) => (
337
+ <FormItem>
338
+ <FormLabel>Email</FormLabel>
339
+ <FormControl>
340
+ <Input placeholder="john.doe@example.com" {...field} />
341
+ </FormControl>
342
+ <FormDescription>
343
+ We'll never share your email with anyone else.
344
+ </FormDescription>
345
+ <FormMessage />
346
+ </FormItem>
347
+ )}
348
+ />
349
+
350
+ <FormField
351
+ control={form.control}
352
+ name="role"
353
+ render={({ field }) => (
354
+ <FormItem>
355
+ <FormLabel>Role</FormLabel>
356
+ <Select onValueChange={field.onChange} defaultValue={field.value}>
357
+ <FormControl>
358
+ <SelectTrigger>
359
+ <SelectValue placeholder="Select a role" />
360
+ </SelectTrigger>
361
+ </FormControl>
362
+ <SelectContent>
363
+ <SelectItem value="developer">Developer</SelectItem>
364
+ <SelectItem value="designer">Designer</SelectItem>
365
+ <SelectItem value="manager">Manager</SelectItem>
366
+ </SelectContent>
367
+ </Select>
368
+ <FormMessage />
369
+ </FormItem>
370
+ )}
371
+ />
372
+
373
+ <FormField
374
+ control={form.control}
375
+ name="bio"
376
+ render={({ field }) => (
377
+ <FormItem>
378
+ <FormLabel>Bio</FormLabel>
379
+ <FormControl>
380
+ <Textarea
381
+ placeholder="Tell us about yourself"
382
+ className="min-h-[100px]"
383
+ {...field}
384
+ />
385
+ </FormControl>
386
+ <FormMessage />
387
+ </FormItem>
388
+ )}
389
+ />
390
+
391
+ <Button type="submit">Save Profile</Button>
392
+ </form>
393
+ </Form>
394
+ );
395
+ }
396
+ ```
397
+
398
+ ---
399
+
400
+ ## 🧭 Navigation Examples
401
+
402
+ ### Responsive Header Navigation
403
+
404
+ ```tsx
405
+ import {
406
+ NavigationMenu,
407
+ NavigationMenuItem,
408
+ NavigationMenuList,
409
+ } from "@arolariu/components/navigation-menu";
410
+ import { Button } from "@arolariu/components/button";
411
+ import { Sheet, SheetContent, SheetTrigger } from "@arolariu/components/sheet";
412
+ import {
413
+ Avatar,
414
+ AvatarImage,
415
+ AvatarFallback,
416
+ } from "@arolariu/components/avatar";
417
+ import {
418
+ DropdownMenu,
419
+ DropdownMenuContent,
420
+ DropdownMenuItem,
421
+ DropdownMenuTrigger,
422
+ } from "@arolariu/components/dropdown-menu";
423
+ import { MenuIcon, User, Settings, LogOut } from "lucide-react";
424
+
425
+ export function AppHeader() {
426
+ return (
427
+ <header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
428
+ <div className="container flex h-14 items-center">
429
+ <div className="mr-4 hidden md:flex">
430
+ <a className="mr-6 flex items-center space-x-2" href="/">
431
+ <span className="hidden font-bold sm:inline-block">MyApp</span>
432
+ </a>
433
+
434
+ <NavigationMenu>
435
+ <NavigationMenuList>
436
+ <NavigationMenuItem>
437
+ <Button variant="ghost" href="/dashboard">
438
+ Dashboard
439
+ </Button>
440
+ </NavigationMenuItem>
441
+ <NavigationMenuItem>
442
+ <Button variant="ghost" href="/projects">
443
+ Projects
444
+ </Button>
445
+ </NavigationMenuItem>
446
+ <NavigationMenuItem>
447
+ <Button variant="ghost" href="/analytics">
448
+ Analytics
449
+ </Button>
450
+ </NavigationMenuItem>
451
+ </NavigationMenuList>
452
+ </NavigationMenu>
453
+ </div>
454
+
455
+ {/* Mobile Navigation */}
456
+ <Sheet>
457
+ <SheetTrigger asChild>
458
+ <Button
459
+ variant="ghost"
460
+ className="mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
461
+ >
462
+ <MenuIcon className="h-5 w-5" />
463
+ </Button>
464
+ </SheetTrigger>
465
+ <SheetContent side="left">
466
+ <nav className="flex flex-col space-y-3">
467
+ <Button
468
+ variant="ghost"
469
+ className="justify-start"
470
+ href="/dashboard"
471
+ >
472
+ Dashboard
473
+ </Button>
474
+ <Button
475
+ variant="ghost"
476
+ className="justify-start"
477
+ href="/projects"
478
+ >
479
+ Projects
480
+ </Button>
481
+ <Button
482
+ variant="ghost"
483
+ className="justify-start"
484
+ href="/analytics"
485
+ >
486
+ Analytics
487
+ </Button>
488
+ </nav>
489
+ </SheetContent>
490
+ </Sheet>
491
+
492
+ <div className="flex flex-1 items-center justify-between space-x-2 md:justify-end">
493
+ <div className="w-full flex-1 md:w-auto md:flex-none">
494
+ {/* Search or other content can go here */}
495
+ </div>
496
+
497
+ {/* User Menu */}
498
+ <DropdownMenu>
499
+ <DropdownMenuTrigger asChild>
500
+ <Button variant="ghost" className="relative h-8 w-8 rounded-full">
501
+ <Avatar className="h-8 w-8">
502
+ <AvatarImage src="/avatars/01.png" alt="User" />
503
+ <AvatarFallback>JD</AvatarFallback>
504
+ </Avatar>
505
+ </Button>
506
+ </DropdownMenuTrigger>
507
+ <DropdownMenuContent className="w-56" align="end" forceMount>
508
+ <DropdownMenuItem>
509
+ <User className="mr-2 h-4 w-4" />
510
+ <span>Profile</span>
511
+ </DropdownMenuItem>
512
+ <DropdownMenuItem>
513
+ <Settings className="mr-2 h-4 w-4" />
514
+ <span>Settings</span>
515
+ </DropdownMenuItem>
516
+ <DropdownMenuItem>
517
+ <LogOut className="mr-2 h-4 w-4" />
518
+ <span>Log out</span>
519
+ </DropdownMenuItem>
520
+ </DropdownMenuContent>
521
+ </DropdownMenu>
522
+ </div>
523
+ </div>
524
+ </header>
525
+ );
526
+ }
527
+ ```
528
+
529
+ ---
530
+
531
+ ## 📊 Data Display Examples
532
+
533
+ ### Interactive Data Table
534
+
535
+ ```tsx
536
+ import {
537
+ Table,
538
+ TableBody,
539
+ TableCaption,
540
+ TableCell,
541
+ TableHead,
542
+ TableHeader,
543
+ TableRow,
544
+ } from "@arolariu/components/table";
545
+ import { Badge } from "@arolariu/components/badge";
546
+ import { Button } from "@arolariu/components/button";
547
+ import {
548
+ DropdownMenu,
549
+ DropdownMenuContent,
550
+ DropdownMenuItem,
551
+ DropdownMenuTrigger,
552
+ } from "@arolariu/components/dropdown-menu";
553
+ import { MoreHorizontal, Eye, Edit, Trash } from "lucide-react";
554
+
555
+ interface User {
556
+ id: string;
557
+ name: string;
558
+ email: string;
559
+ role: string;
560
+ status: "active" | "inactive" | "pending";
561
+ lastLogin: string;
562
+ }
563
+
564
+ const users: User[] = [
565
+ {
566
+ id: "1",
567
+ name: "John Doe",
568
+ email: "john@example.com",
569
+ role: "Admin",
570
+ status: "active",
571
+ lastLogin: "2 hours ago",
572
+ },
573
+ {
574
+ id: "2",
575
+ name: "Jane Smith",
576
+ email: "jane@example.com",
577
+ role: "User",
578
+ status: "active",
579
+ lastLogin: "1 day ago",
580
+ },
581
+ {
582
+ id: "3",
583
+ name: "Bob Johnson",
584
+ email: "bob@example.com",
585
+ role: "User",
586
+ status: "pending",
587
+ lastLogin: "Never",
588
+ },
589
+ ];
590
+
591
+ export function UsersTable() {
592
+ const getStatusBadge = (status: User["status"]) => {
593
+ const variants = {
594
+ active: "default",
595
+ inactive: "secondary",
596
+ pending: "outline",
597
+ } as const;
598
+
599
+ return <Badge variant={variants[status]}>{status}</Badge>;
600
+ };
601
+
602
+ return (
603
+ <div className="w-full">
604
+ <div className="rounded-md border">
605
+ <Table>
606
+ <TableCaption>A list of your team members.</TableCaption>
607
+ <TableHeader>
608
+ <TableRow>
609
+ <TableHead>Name</TableHead>
610
+ <TableHead>Email</TableHead>
611
+ <TableHead>Role</TableHead>
612
+ <TableHead>Status</TableHead>
613
+ <TableHead>Last Login</TableHead>
614
+ <TableHead className="w-[100px]">Actions</TableHead>
615
+ </TableRow>
616
+ </TableHeader>
617
+ <TableBody>
618
+ {users.map((user) => (
619
+ <TableRow key={user.id}>
620
+ <TableCell className="font-medium">{user.name}</TableCell>
621
+ <TableCell>{user.email}</TableCell>
622
+ <TableCell>{user.role}</TableCell>
623
+ <TableCell>{getStatusBadge(user.status)}</TableCell>
624
+ <TableCell>{user.lastLogin}</TableCell>
625
+ <TableCell>
626
+ <DropdownMenu>
627
+ <DropdownMenuTrigger asChild>
628
+ <Button variant="ghost" className="h-8 w-8 p-0">
629
+ <MoreHorizontal className="h-4 w-4" />
630
+ </Button>
631
+ </DropdownMenuTrigger>
632
+ <DropdownMenuContent align="end">
633
+ <DropdownMenuItem>
634
+ <Eye className="mr-2 h-4 w-4" />
635
+ View
636
+ </DropdownMenuItem>
637
+ <DropdownMenuItem>
638
+ <Edit className="mr-2 h-4 w-4" />
639
+ Edit
640
+ </DropdownMenuItem>
641
+ <DropdownMenuItem className="text-red-600">
642
+ <Trash className="mr-2 h-4 w-4" />
643
+ Delete
644
+ </DropdownMenuItem>
645
+ </DropdownMenuContent>
646
+ </DropdownMenu>
647
+ </TableCell>
648
+ </TableRow>
649
+ ))}
650
+ </TableBody>
651
+ </Table>
652
+ </div>
653
+ </div>
654
+ );
655
+ }
656
+ ```
657
+
658
+ ---
659
+
660
+ ## 💬 Modal & Dialog Examples
661
+
662
+ ### Confirmation Dialog
663
+
664
+ ```tsx
665
+ import {
666
+ AlertDialog,
667
+ AlertDialogAction,
668
+ AlertDialogCancel,
669
+ AlertDialogContent,
670
+ AlertDialogDescription,
671
+ AlertDialogFooter,
672
+ AlertDialogHeader,
673
+ AlertDialogTitle,
674
+ AlertDialogTrigger,
675
+ } from "@arolariu/components/alert-dialog";
676
+ import { Button } from "@arolariu/components/button";
677
+ import { Trash } from "lucide-react";
678
+
679
+ export function DeleteConfirmation({
680
+ itemName,
681
+ onConfirm,
682
+ }: {
683
+ itemName: string;
684
+ onConfirm: () => void;
685
+ }) {
686
+ return (
687
+ <AlertDialog>
688
+ <AlertDialogTrigger asChild>
689
+ <Button variant="destructive" size="sm">
690
+ <Trash className="mr-2 h-4 w-4" />
691
+ Delete
692
+ </Button>
693
+ </AlertDialogTrigger>
694
+ <AlertDialogContent>
695
+ <AlertDialogHeader>
696
+ <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
697
+ <AlertDialogDescription>
698
+ This action cannot be undone. This will permanently delete "
699
+ {itemName}" and remove all associated data from our servers.
700
+ </AlertDialogDescription>
701
+ </AlertDialogHeader>
702
+ <AlertDialogFooter>
703
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
704
+ <AlertDialogAction
705
+ onClick={onConfirm}
706
+ className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
707
+ >
708
+ Yes, delete it
709
+ </AlertDialogAction>
710
+ </AlertDialogFooter>
711
+ </AlertDialogContent>
712
+ </AlertDialog>
713
+ );
714
+ }
715
+ ```
716
+
717
+ ### Settings Modal
718
+
719
+ ```tsx
720
+ import {
721
+ Dialog,
722
+ DialogContent,
723
+ DialogDescription,
724
+ DialogFooter,
725
+ DialogHeader,
726
+ DialogTitle,
727
+ DialogTrigger,
728
+ } from "@arolariu/components/dialog";
729
+ import { Button } from "@arolariu/components/button";
730
+ import { Input } from "@arolariu/components/input";
731
+ import { Label } from "@arolariu/components/label";
732
+ import { Switch } from "@arolariu/components/switch";
733
+ import {
734
+ Select,
735
+ SelectContent,
736
+ SelectItem,
737
+ SelectTrigger,
738
+ SelectValue,
739
+ } from "@arolariu/components/select";
740
+ import {
741
+ Tabs,
742
+ TabsContent,
743
+ TabsList,
744
+ TabsTrigger,
745
+ } from "@arolariu/components/tabs";
746
+ import { Settings } from "lucide-react";
747
+
748
+ export function SettingsDialog() {
749
+ return (
750
+ <Dialog>
751
+ <DialogTrigger asChild>
752
+ <Button variant="outline">
753
+ <Settings className="mr-2 h-4 w-4" />
754
+ Settings
755
+ </Button>
756
+ </DialogTrigger>
757
+ <DialogContent className="sm:max-w-[525px]">
758
+ <DialogHeader>
759
+ <DialogTitle>Settings</DialogTitle>
760
+ <DialogDescription>
761
+ Manage your account settings and preferences.
762
+ </DialogDescription>
763
+ </DialogHeader>
764
+
765
+ <Tabs defaultValue="general" className="w-full">
766
+ <TabsList className="grid w-full grid-cols-3">
767
+ <TabsTrigger value="general">General</TabsTrigger>
768
+ <TabsTrigger value="notifications">Notifications</TabsTrigger>
769
+ <TabsTrigger value="security">Security</TabsTrigger>
770
+ </TabsList>
771
+
772
+ <TabsContent value="general" className="space-y-4">
773
+ <div className="space-y-2">
774
+ <Label htmlFor="name">Display Name</Label>
775
+ <Input id="name" defaultValue="John Doe" />
776
+ </div>
777
+ <div className="space-y-2">
778
+ <Label htmlFor="email">Email</Label>
779
+ <Input id="email" defaultValue="john@example.com" />
780
+ </div>
781
+ <div className="space-y-2">
782
+ <Label htmlFor="timezone">Timezone</Label>
783
+ <Select defaultValue="utc">
784
+ <SelectTrigger>
785
+ <SelectValue />
786
+ </SelectTrigger>
787
+ <SelectContent>
788
+ <SelectItem value="utc">UTC</SelectItem>
789
+ <SelectItem value="est">Eastern Time</SelectItem>
790
+ <SelectItem value="pst">Pacific Time</SelectItem>
791
+ </SelectContent>
792
+ </Select>
793
+ </div>
794
+ </TabsContent>
795
+
796
+ <TabsContent value="notifications" className="space-y-4">
797
+ <div className="flex items-center justify-between">
798
+ <div className="space-y-0.5">
799
+ <Label>Email Notifications</Label>
800
+ <div className="text-sm text-muted-foreground">
801
+ Receive emails about your account activity.
802
+ </div>
803
+ </div>
804
+ <Switch />
805
+ </div>
806
+ <div className="flex items-center justify-between">
807
+ <div className="space-y-0.5">
808
+ <Label>Push Notifications</Label>
809
+ <div className="text-sm text-muted-foreground">
810
+ Receive push notifications on your devices.
811
+ </div>
812
+ </div>
813
+ <Switch />
814
+ </div>
815
+ </TabsContent>
816
+
817
+ <TabsContent value="security" className="space-y-4">
818
+ <div className="space-y-2">
819
+ <Label htmlFor="current-password">Current Password</Label>
820
+ <Input id="current-password" type="password" />
821
+ </div>
822
+ <div className="space-y-2">
823
+ <Label htmlFor="new-password">New Password</Label>
824
+ <Input id="new-password" type="password" />
825
+ </div>
826
+ <div className="space-y-2">
827
+ <Label htmlFor="confirm-password">Confirm Password</Label>
828
+ <Input id="confirm-password" type="password" />
829
+ </div>
830
+ </TabsContent>
831
+ </Tabs>
832
+
833
+ <DialogFooter>
834
+ <Button variant="outline">Cancel</Button>
835
+ <Button>Save Changes</Button>
836
+ </DialogFooter>
837
+ </DialogContent>
838
+ </Dialog>
839
+ );
840
+ }
841
+ ```
842
+
843
+ ---
844
+
845
+ ## 🎨 Background Effects Examples
846
+
847
+ ### Animated Landing Page
848
+
849
+ ```tsx
850
+ import { DotBackground } from "@arolariu/components/dot-background";
851
+ import { BubbleBackground } from "@arolariu/components/bubble-background";
852
+ import { GradientBackground } from "@arolariu/components/gradient-background";
853
+ import { Button } from "@arolariu/components/button";
854
+ import { Card, CardContent } from "@arolariu/components/card";
855
+
856
+ export function LandingPage() {
857
+ return (
858
+ <div className="relative min-h-screen overflow-hidden">
859
+ {/* Animated Background */}
860
+ <DotBackground className="absolute inset-0" />
861
+ <GradientBackground className="absolute inset-0" />
862
+
863
+ {/* Content */}
864
+ <div className="relative z-10 flex min-h-screen flex-col items-center justify-center px-4 text-center">
865
+ <h1 className="mb-6 text-4xl font-bold tracking-tight sm:text-6xl">
866
+ Build Beautiful Apps
867
+ <span className="bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent">
868
+ {" "}
869
+ Faster
870
+ </span>
871
+ </h1>
872
+
873
+ <p className="mb-8 max-w-2xl text-lg text-muted-foreground">
874
+ Create stunning user interfaces with our comprehensive React component
875
+ library. Built with accessibility, performance, and developer
876
+ experience in mind.
877
+ </p>
878
+
879
+ <div className="flex flex-col gap-4 sm:flex-row">
880
+ <Button size="lg" className="px-8">
881
+ Get Started
882
+ </Button>
883
+ <Button variant="outline" size="lg" className="px-8">
884
+ View Components
885
+ </Button>
886
+ </div>
887
+
888
+ {/* Feature Cards */}
889
+ <div className="mt-16 grid gap-6 sm:grid-cols-3">
890
+ <Card className="bg-card/50 backdrop-blur">
891
+ <CardContent className="p-6 text-center">
892
+ <h3 className="mb-2 text-lg font-semibold">60+ Components</h3>
893
+ <p className="text-sm text-muted-foreground">
894
+ Comprehensive set of UI components for any project
895
+ </p>
896
+ </CardContent>
897
+ </Card>
898
+
899
+ <Card className="bg-card/50 backdrop-blur">
900
+ <CardContent className="p-6 text-center">
901
+ <h3 className="mb-2 text-lg font-semibold">TypeScript First</h3>
902
+ <p className="text-sm text-muted-foreground">
903
+ Full type safety and excellent developer experience
904
+ </p>
905
+ </CardContent>
906
+ </Card>
907
+
908
+ <Card className="bg-card/50 backdrop-blur">
909
+ <CardContent className="p-6 text-center">
910
+ <h3 className="mb-2 text-lg font-semibold">Accessible</h3>
911
+ <p className="text-sm text-muted-foreground">
912
+ Built on Radix UI with WAI-ARIA compliance
913
+ </p>
914
+ </CardContent>
915
+ </Card>
916
+ </div>
917
+ </div>
918
+ </div>
919
+ );
920
+ }
921
+ ```
922
+
923
+ ---
924
+
925
+ ## 📱 Mobile-First Examples
926
+
927
+ ### Mobile-Optimized Form
928
+
929
+ ```tsx
930
+ import {
931
+ Sheet,
932
+ SheetContent,
933
+ SheetDescription,
934
+ SheetHeader,
935
+ SheetTitle,
936
+ SheetTrigger,
937
+ } from "@arolariu/components/sheet";
938
+ import { Button } from "@arolariu/components/button";
939
+ import { Input } from "@arolariu/components/input";
940
+ import { Label } from "@arolariu/components/label";
941
+ import { Textarea } from "@arolariu/components/textarea";
942
+ import { Plus } from "lucide-react";
943
+
944
+ export function MobileAddForm() {
945
+ return (
946
+ <Sheet>
947
+ <SheetTrigger asChild>
948
+ <Button className="fixed bottom-4 right-4 h-14 w-14 rounded-full shadow-lg md:hidden">
949
+ <Plus className="h-6 w-6" />
950
+ </Button>
951
+ </SheetTrigger>
952
+ <SheetContent side="bottom" className="h-[80vh]">
953
+ <SheetHeader>
954
+ <SheetTitle>Add New Item</SheetTitle>
955
+ <SheetDescription>
956
+ Fill out the form below to add a new item to your collection.
957
+ </SheetDescription>
958
+ </SheetHeader>
959
+
960
+ <div className="mt-6 space-y-4">
961
+ <div className="space-y-2">
962
+ <Label htmlFor="title">Title</Label>
963
+ <Input id="title" placeholder="Enter title" />
964
+ </div>
965
+
966
+ <div className="space-y-2">
967
+ <Label htmlFor="description">Description</Label>
968
+ <Textarea
969
+ id="description"
970
+ placeholder="Enter description"
971
+ className="min-h-[100px]"
972
+ />
973
+ </div>
974
+
975
+ <div className="flex gap-2 pt-4">
976
+ <Button className="flex-1">Save</Button>
977
+ <Button variant="outline" className="flex-1">
978
+ Cancel
979
+ </Button>
980
+ </div>
981
+ </div>
982
+ </SheetContent>
983
+ </Sheet>
984
+ );
985
+ }
986
+ ```
987
+
988
+ ---
989
+
990
+ ## 🎯 Tips for Success
991
+
992
+ ### Performance Optimization
993
+
994
+ ```tsx
995
+ // ✅ Import only what you need for optimal bundle size
996
+ import { Button } from "@arolariu/components/button";
997
+ import { Card } from "@arolariu/components/card";
998
+
999
+ // ❌ Avoid barrel imports
1000
+ import { Button, Card } from "@arolariu/components";
1001
+ ```
1002
+
1003
+ ### Accessibility Best Practices
1004
+
1005
+ ```tsx
1006
+ // ✅ Always include proper labels and ARIA attributes
1007
+ <Button aria-label="Close dialog" onClick={handleClose}>
1008
+ <X className="h-4 w-4" />
1009
+ </Button>
1010
+
1011
+ // ✅ Use semantic HTML structure
1012
+ <main role="main">
1013
+ <section aria-labelledby="section-title">
1014
+ <h2 id="section-title">Section Title</h2>
1015
+ {/* content */}
1016
+ </section>
1017
+ </main>
1018
+ ```
1019
+
1020
+ ### Responsive Design
1021
+
1022
+ ```tsx
1023
+ // ✅ Use Tailwind's responsive utilities
1024
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
1025
+ {/* components */}
1026
+ </div>
1027
+
1028
+ // ✅ Hide/show components based on screen size
1029
+ <div className="block md:hidden">Mobile only content</div>
1030
+ <div className="hidden md:block">Desktop only content</div>
1031
+ ```
1032
+
1033
+ ---
1034
+
1035
+ Ready to build something amazing? **[🚀 Start with our Quick Start Guide](./README.md#-quick-start)**