ui-ux-pro-max-cli 2.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -0
- package/assets/data/_sync_all.py +414 -0
- package/assets/data/app-interface.csv +31 -0
- package/assets/data/charts.csv +26 -0
- package/assets/data/colors.csv +162 -0
- package/assets/data/design.csv +1776 -0
- package/assets/data/draft.csv +1779 -0
- package/assets/data/google-fonts.csv +1924 -0
- package/assets/data/icons.csv +106 -0
- package/assets/data/landing.csv +35 -0
- package/assets/data/products.csv +162 -0
- package/assets/data/react-performance.csv +45 -0
- package/assets/data/stacks/angular.csv +51 -0
- package/assets/data/stacks/astro.csv +54 -0
- package/assets/data/stacks/flutter.csv +53 -0
- package/assets/data/stacks/html-tailwind.csv +56 -0
- package/assets/data/stacks/javafx.csv +76 -0
- package/assets/data/stacks/jetpack-compose.csv +53 -0
- package/assets/data/stacks/laravel.csv +51 -0
- package/assets/data/stacks/nextjs.csv +53 -0
- package/assets/data/stacks/nuxt-ui.csv +71 -0
- package/assets/data/stacks/nuxtjs.csv +59 -0
- package/assets/data/stacks/react-native.csv +52 -0
- package/assets/data/stacks/react.csv +54 -0
- package/assets/data/stacks/shadcn.csv +61 -0
- package/assets/data/stacks/svelte.csv +54 -0
- package/assets/data/stacks/swiftui.csv +51 -0
- package/assets/data/stacks/threejs.csv +54 -0
- package/assets/data/stacks/vue.csv +50 -0
- package/assets/data/styles.csv +85 -0
- package/assets/data/typography.csv +74 -0
- package/assets/data/ui-reasoning.csv +162 -0
- package/assets/data/ux-guidelines.csv +100 -0
- package/assets/scripts/core.py +263 -0
- package/assets/scripts/design_system.py +1157 -0
- package/assets/scripts/search.py +114 -0
- package/assets/skills/banner-design/SKILL.md +196 -0
- package/assets/skills/banner-design/references/banner-sizes-and-styles.md +118 -0
- package/assets/skills/brand/SKILL.md +97 -0
- package/assets/skills/brand/references/approval-checklist.md +169 -0
- package/assets/skills/brand/references/asset-organization.md +157 -0
- package/assets/skills/brand/references/brand-guideline-template.md +140 -0
- package/assets/skills/brand/references/color-palette-management.md +186 -0
- package/assets/skills/brand/references/consistency-checklist.md +94 -0
- package/assets/skills/brand/references/logo-usage-rules.md +185 -0
- package/assets/skills/brand/references/messaging-framework.md +85 -0
- package/assets/skills/brand/references/typography-specifications.md +214 -0
- package/assets/skills/brand/references/update.md +118 -0
- package/assets/skills/brand/references/visual-identity.md +96 -0
- package/assets/skills/brand/references/voice-framework.md +88 -0
- package/assets/skills/brand/scripts/extract-colors.cjs +341 -0
- package/assets/skills/brand/scripts/inject-brand-context.cjs +349 -0
- package/assets/skills/brand/scripts/sync-brand-to-tokens.cjs +266 -0
- package/assets/skills/brand/scripts/validate-asset.cjs +387 -0
- package/assets/skills/brand/templates/brand-guidelines-starter.md +275 -0
- package/assets/skills/design/SKILL.md +313 -0
- package/assets/skills/design/data/cip/deliverables.csv +51 -0
- package/assets/skills/design/data/cip/industries.csv +21 -0
- package/assets/skills/design/data/cip/mockup-contexts.csv +21 -0
- package/assets/skills/design/data/cip/styles.csv +21 -0
- package/assets/skills/design/data/icon/styles.csv +16 -0
- package/assets/skills/design/data/logo/colors.csv +56 -0
- package/assets/skills/design/data/logo/industries.csv +56 -0
- package/assets/skills/design/data/logo/styles.csv +56 -0
- package/assets/skills/design/references/banner-sizes-and-styles.md +118 -0
- package/assets/skills/design/references/cip-deliverable-guide.md +95 -0
- package/assets/skills/design/references/cip-design.md +121 -0
- package/assets/skills/design/references/cip-prompt-engineering.md +84 -0
- package/assets/skills/design/references/cip-style-guide.md +68 -0
- package/assets/skills/design/references/design-routing.md +207 -0
- package/assets/skills/design/references/icon-design.md +122 -0
- package/assets/skills/design/references/logo-color-psychology.md +101 -0
- package/assets/skills/design/references/logo-design.md +92 -0
- package/assets/skills/design/references/logo-prompt-engineering.md +158 -0
- package/assets/skills/design/references/logo-style-guide.md +109 -0
- package/assets/skills/design/references/slides-copywriting-formulas.md +84 -0
- package/assets/skills/design/references/slides-create.md +4 -0
- package/assets/skills/design/references/slides-html-template.md +295 -0
- package/assets/skills/design/references/slides-layout-patterns.md +137 -0
- package/assets/skills/design/references/slides-strategies.md +94 -0
- package/assets/skills/design/references/slides.md +42 -0
- package/assets/skills/design/references/social-photos-design.md +329 -0
- package/assets/skills/design/scripts/cip/core.py +215 -0
- package/assets/skills/design/scripts/cip/generate.py +484 -0
- package/assets/skills/design/scripts/cip/render-html.py +424 -0
- package/assets/skills/design/scripts/cip/search.py +127 -0
- package/assets/skills/design/scripts/icon/generate.py +487 -0
- package/assets/skills/design/scripts/logo/core.py +175 -0
- package/assets/skills/design/scripts/logo/generate.py +362 -0
- package/assets/skills/design/scripts/logo/search.py +114 -0
- package/assets/skills/design-system/SKILL.md +244 -0
- package/assets/skills/design-system/data/slide-backgrounds.csv +11 -0
- package/assets/skills/design-system/data/slide-charts.csv +26 -0
- package/assets/skills/design-system/data/slide-color-logic.csv +14 -0
- package/assets/skills/design-system/data/slide-copy.csv +26 -0
- package/assets/skills/design-system/data/slide-layout-logic.csv +16 -0
- package/assets/skills/design-system/data/slide-layouts.csv +26 -0
- package/assets/skills/design-system/data/slide-strategies.csv +16 -0
- package/assets/skills/design-system/data/slide-typography.csv +15 -0
- package/assets/skills/design-system/references/component-specs.md +236 -0
- package/assets/skills/design-system/references/component-tokens.md +214 -0
- package/assets/skills/design-system/references/primitive-tokens.md +203 -0
- package/assets/skills/design-system/references/semantic-tokens.md +215 -0
- package/assets/skills/design-system/references/states-and-variants.md +241 -0
- package/assets/skills/design-system/references/tailwind-integration.md +251 -0
- package/assets/skills/design-system/references/token-architecture.md +224 -0
- package/assets/skills/design-system/scripts/embed-tokens.cjs +99 -0
- package/assets/skills/design-system/scripts/fetch-background.py +317 -0
- package/assets/skills/design-system/scripts/generate-slide.py +770 -0
- package/assets/skills/design-system/scripts/generate-tokens.cjs +205 -0
- package/assets/skills/design-system/scripts/html-token-validator.py +327 -0
- package/assets/skills/design-system/scripts/search-slides.py +218 -0
- package/assets/skills/design-system/scripts/slide-token-validator.py +35 -0
- package/assets/skills/design-system/scripts/slide_search_core.py +453 -0
- package/assets/skills/design-system/scripts/validate-tokens.cjs +251 -0
- package/assets/skills/design-system/templates/design-tokens-starter.json +143 -0
- package/assets/skills/slides/SKILL.md +40 -0
- package/assets/skills/slides/references/copywriting-formulas.md +84 -0
- package/assets/skills/slides/references/create.md +4 -0
- package/assets/skills/slides/references/html-template.md +295 -0
- package/assets/skills/slides/references/layout-patterns.md +137 -0
- package/assets/skills/slides/references/slide-strategies.md +94 -0
- package/assets/skills/ui-styling/LICENSE.txt +202 -0
- package/assets/skills/ui-styling/SKILL.md +324 -0
- package/assets/skills/ui-styling/references/canvas-design-system.md +320 -0
- package/assets/skills/ui-styling/references/shadcn-accessibility.md +471 -0
- package/assets/skills/ui-styling/references/shadcn-components.md +424 -0
- package/assets/skills/ui-styling/references/shadcn-theming.md +373 -0
- package/assets/skills/ui-styling/references/tailwind-customization.md +483 -0
- package/assets/skills/ui-styling/references/tailwind-responsive.md +382 -0
- package/assets/skills/ui-styling/references/tailwind-utilities.md +455 -0
- package/assets/skills/ui-styling/scripts/requirements.txt +17 -0
- package/assets/skills/ui-styling/scripts/shadcn_add.py +308 -0
- package/assets/skills/ui-styling/scripts/tailwind_config_gen.py +473 -0
- package/assets/skills/ui-styling/scripts/tests/coverage-ui.json +1 -0
- package/assets/skills/ui-styling/scripts/tests/requirements.txt +3 -0
- package/assets/skills/ui-styling/scripts/tests/test_shadcn_add.py +266 -0
- package/assets/skills/ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
- package/assets/templates/base/quick-reference.md +297 -0
- package/assets/templates/base/skill-content.md +368 -0
- package/assets/templates/platforms/agent.json +21 -0
- package/assets/templates/platforms/augment.json +18 -0
- package/assets/templates/platforms/claude.json +21 -0
- package/assets/templates/platforms/codebuddy.json +21 -0
- package/assets/templates/platforms/codex.json +21 -0
- package/assets/templates/platforms/continue.json +21 -0
- package/assets/templates/platforms/copilot.json +21 -0
- package/assets/templates/platforms/cursor.json +21 -0
- package/assets/templates/platforms/droid.json +21 -0
- package/assets/templates/platforms/gemini.json +21 -0
- package/assets/templates/platforms/kilocode.json +21 -0
- package/assets/templates/platforms/kiro.json +21 -0
- package/assets/templates/platforms/opencode.json +21 -0
- package/assets/templates/platforms/qoder.json +21 -0
- package/assets/templates/platforms/roocode.json +21 -0
- package/assets/templates/platforms/trae.json +21 -0
- package/assets/templates/platforms/warp.json +18 -0
- package/assets/templates/platforms/windsurf.json +21 -0
- package/dist/index.js +10630 -0
- package/package.json +51 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
# shadcn/ui Component Reference
|
|
2
|
+
|
|
3
|
+
Complete catalog of shadcn/ui components with usage patterns and installation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
**Add specific components:**
|
|
8
|
+
```bash
|
|
9
|
+
npx shadcn@latest add button
|
|
10
|
+
npx shadcn@latest add button card dialog # Multiple
|
|
11
|
+
npx shadcn@latest add --all # All components
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Components install to `components/ui/` with automatic dependency management.
|
|
15
|
+
|
|
16
|
+
## Form & Input Components
|
|
17
|
+
|
|
18
|
+
### Button
|
|
19
|
+
```tsx
|
|
20
|
+
import { Button } from "@/components/ui/button"
|
|
21
|
+
|
|
22
|
+
<Button variant="default">Default</Button>
|
|
23
|
+
<Button variant="destructive">Delete</Button>
|
|
24
|
+
<Button variant="outline" size="sm">Small Outline</Button>
|
|
25
|
+
<Button variant="ghost" size="icon"><Icon /></Button>
|
|
26
|
+
<Button variant="link">Link Style</Button>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Variants: `default | destructive | outline | secondary | ghost | link`
|
|
30
|
+
Sizes: `default | sm | lg | icon`
|
|
31
|
+
|
|
32
|
+
### Input
|
|
33
|
+
```tsx
|
|
34
|
+
import { Input } from "@/components/ui/input"
|
|
35
|
+
import { Label } from "@/components/ui/label"
|
|
36
|
+
|
|
37
|
+
<div className="space-y-2">
|
|
38
|
+
<Label htmlFor="email">Email</Label>
|
|
39
|
+
<Input id="email" type="email" placeholder="you@example.com" />
|
|
40
|
+
</div>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Form (with React Hook Form + Zod)
|
|
44
|
+
```tsx
|
|
45
|
+
import { useForm } from "react-hook-form"
|
|
46
|
+
import { zodResolver } from "@hookform/resolvers/zod"
|
|
47
|
+
import * as z from "zod"
|
|
48
|
+
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form"
|
|
49
|
+
import { Input } from "@/components/ui/input"
|
|
50
|
+
import { Button } from "@/components/ui/button"
|
|
51
|
+
|
|
52
|
+
const schema = z.object({
|
|
53
|
+
username: z.string().min(2).max(50),
|
|
54
|
+
email: z.string().email()
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
function ProfileForm() {
|
|
58
|
+
const form = useForm({
|
|
59
|
+
resolver: zodResolver(schema),
|
|
60
|
+
defaultValues: { username: "", email: "" }
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Form {...form}>
|
|
65
|
+
<form onSubmit={form.handleSubmit(console.log)} className="space-y-8">
|
|
66
|
+
<FormField control={form.control} name="username" render={({ field }) => (
|
|
67
|
+
<FormItem>
|
|
68
|
+
<FormLabel>Username</FormLabel>
|
|
69
|
+
<FormControl>
|
|
70
|
+
<Input placeholder="shadcn" {...field} />
|
|
71
|
+
</FormControl>
|
|
72
|
+
<FormMessage />
|
|
73
|
+
</FormItem>
|
|
74
|
+
)} />
|
|
75
|
+
<Button type="submit">Submit</Button>
|
|
76
|
+
</form>
|
|
77
|
+
</Form>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Select
|
|
83
|
+
```tsx
|
|
84
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
|
|
85
|
+
|
|
86
|
+
<Select>
|
|
87
|
+
<SelectTrigger className="w-[180px]">
|
|
88
|
+
<SelectValue placeholder="Theme" />
|
|
89
|
+
</SelectTrigger>
|
|
90
|
+
<SelectContent>
|
|
91
|
+
<SelectItem value="light">Light</SelectItem>
|
|
92
|
+
<SelectItem value="dark">Dark</SelectItem>
|
|
93
|
+
<SelectItem value="system">System</SelectItem>
|
|
94
|
+
</SelectContent>
|
|
95
|
+
</Select>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Checkbox
|
|
99
|
+
```tsx
|
|
100
|
+
import { Checkbox } from "@/components/ui/checkbox"
|
|
101
|
+
import { Label } from "@/components/ui/label"
|
|
102
|
+
|
|
103
|
+
<div className="flex items-center space-x-2">
|
|
104
|
+
<Checkbox id="terms" />
|
|
105
|
+
<Label htmlFor="terms">Accept terms</Label>
|
|
106
|
+
</div>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Radio Group
|
|
110
|
+
```tsx
|
|
111
|
+
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
|
|
112
|
+
import { Label } from "@/components/ui/label"
|
|
113
|
+
|
|
114
|
+
<RadioGroup defaultValue="option-one">
|
|
115
|
+
<div className="flex items-center space-x-2">
|
|
116
|
+
<RadioGroupItem value="option-one" id="option-one" />
|
|
117
|
+
<Label htmlFor="option-one">Option One</Label>
|
|
118
|
+
</div>
|
|
119
|
+
<div className="flex items-center space-x-2">
|
|
120
|
+
<RadioGroupItem value="option-two" id="option-two" />
|
|
121
|
+
<Label htmlFor="option-two">Option Two</Label>
|
|
122
|
+
</div>
|
|
123
|
+
</RadioGroup>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Textarea
|
|
127
|
+
```tsx
|
|
128
|
+
import { Textarea } from "@/components/ui/textarea"
|
|
129
|
+
|
|
130
|
+
<Textarea placeholder="Type your message here." />
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Switch
|
|
134
|
+
```tsx
|
|
135
|
+
import { Switch } from "@/components/ui/switch"
|
|
136
|
+
import { Label } from "@/components/ui/label"
|
|
137
|
+
|
|
138
|
+
<div className="flex items-center space-x-2">
|
|
139
|
+
<Switch id="airplane-mode" />
|
|
140
|
+
<Label htmlFor="airplane-mode">Airplane Mode</Label>
|
|
141
|
+
</div>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Date Picker
|
|
145
|
+
```tsx
|
|
146
|
+
import { Calendar } from "@/components/ui/calendar"
|
|
147
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"
|
|
148
|
+
import { Button } from "@/components/ui/button"
|
|
149
|
+
import { CalendarIcon } from "lucide-react"
|
|
150
|
+
import { format } from "date-fns"
|
|
151
|
+
import { useState } from "react"
|
|
152
|
+
|
|
153
|
+
const [date, setDate] = useState<Date>()
|
|
154
|
+
|
|
155
|
+
<Popover>
|
|
156
|
+
<PopoverTrigger asChild>
|
|
157
|
+
<Button variant="outline">
|
|
158
|
+
<CalendarIcon className="mr-2 h-4 w-4" />
|
|
159
|
+
{date ? format(date, "PPP") : "Pick a date"}
|
|
160
|
+
</Button>
|
|
161
|
+
</PopoverTrigger>
|
|
162
|
+
<PopoverContent className="w-auto p-0">
|
|
163
|
+
<Calendar mode="single" selected={date} onSelect={setDate} />
|
|
164
|
+
</PopoverContent>
|
|
165
|
+
</Popover>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Layout & Navigation
|
|
169
|
+
|
|
170
|
+
### Card
|
|
171
|
+
```tsx
|
|
172
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
|
|
173
|
+
|
|
174
|
+
<Card>
|
|
175
|
+
<CardHeader>
|
|
176
|
+
<CardTitle>Card Title</CardTitle>
|
|
177
|
+
<CardDescription>Card Description</CardDescription>
|
|
178
|
+
</CardHeader>
|
|
179
|
+
<CardContent>
|
|
180
|
+
<p>Card Content</p>
|
|
181
|
+
</CardContent>
|
|
182
|
+
<CardFooter>
|
|
183
|
+
<Button>Action</Button>
|
|
184
|
+
</CardFooter>
|
|
185
|
+
</Card>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Tabs
|
|
189
|
+
```tsx
|
|
190
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
|
191
|
+
|
|
192
|
+
<Tabs defaultValue="account">
|
|
193
|
+
<TabsList>
|
|
194
|
+
<TabsTrigger value="account">Account</TabsTrigger>
|
|
195
|
+
<TabsTrigger value="password">Password</TabsTrigger>
|
|
196
|
+
</TabsList>
|
|
197
|
+
<TabsContent value="account">Account settings</TabsContent>
|
|
198
|
+
<TabsContent value="password">Password settings</TabsContent>
|
|
199
|
+
</Tabs>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Accordion
|
|
203
|
+
```tsx
|
|
204
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"
|
|
205
|
+
|
|
206
|
+
<Accordion type="single" collapsible>
|
|
207
|
+
<AccordionItem value="item-1">
|
|
208
|
+
<AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
209
|
+
<AccordionContent>
|
|
210
|
+
Yes. It adheres to WAI-ARIA design pattern.
|
|
211
|
+
</AccordionContent>
|
|
212
|
+
</AccordionItem>
|
|
213
|
+
<AccordionItem value="item-2">
|
|
214
|
+
<AccordionTrigger>Is it styled?</AccordionTrigger>
|
|
215
|
+
<AccordionContent>
|
|
216
|
+
Yes. Comes with default styles customizable with Tailwind.
|
|
217
|
+
</AccordionContent>
|
|
218
|
+
</AccordionItem>
|
|
219
|
+
</Accordion>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Navigation Menu
|
|
223
|
+
```tsx
|
|
224
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger } from "@/components/ui/navigation-menu"
|
|
225
|
+
|
|
226
|
+
<NavigationMenu>
|
|
227
|
+
<NavigationMenuList>
|
|
228
|
+
<NavigationMenuItem>
|
|
229
|
+
<NavigationMenuTrigger>Getting Started</NavigationMenuTrigger>
|
|
230
|
+
<NavigationMenuContent>
|
|
231
|
+
<NavigationMenuLink>Introduction</NavigationMenuLink>
|
|
232
|
+
<NavigationMenuLink>Installation</NavigationMenuLink>
|
|
233
|
+
</NavigationMenuContent>
|
|
234
|
+
</NavigationMenuItem>
|
|
235
|
+
</NavigationMenuList>
|
|
236
|
+
</NavigationMenu>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Overlays & Dialogs
|
|
240
|
+
|
|
241
|
+
### Dialog
|
|
242
|
+
```tsx
|
|
243
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
|
|
244
|
+
|
|
245
|
+
<Dialog>
|
|
246
|
+
<DialogTrigger asChild>
|
|
247
|
+
<Button>Open</Button>
|
|
248
|
+
</DialogTrigger>
|
|
249
|
+
<DialogContent>
|
|
250
|
+
<DialogHeader>
|
|
251
|
+
<DialogTitle>Are you sure?</DialogTitle>
|
|
252
|
+
<DialogDescription>This action cannot be undone.</DialogDescription>
|
|
253
|
+
</DialogHeader>
|
|
254
|
+
</DialogContent>
|
|
255
|
+
</Dialog>
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Drawer
|
|
259
|
+
```tsx
|
|
260
|
+
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from "@/components/ui/drawer"
|
|
261
|
+
|
|
262
|
+
<Drawer>
|
|
263
|
+
<DrawerTrigger>Open</DrawerTrigger>
|
|
264
|
+
<DrawerContent>
|
|
265
|
+
<DrawerHeader>
|
|
266
|
+
<DrawerTitle>Title</DrawerTitle>
|
|
267
|
+
<DrawerDescription>Description</DrawerDescription>
|
|
268
|
+
</DrawerHeader>
|
|
269
|
+
<DrawerFooter>
|
|
270
|
+
<Button>Submit</Button>
|
|
271
|
+
<DrawerClose>Cancel</DrawerClose>
|
|
272
|
+
</DrawerFooter>
|
|
273
|
+
</DrawerContent>
|
|
274
|
+
</Drawer>
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Popover
|
|
278
|
+
```tsx
|
|
279
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"
|
|
280
|
+
|
|
281
|
+
<Popover>
|
|
282
|
+
<PopoverTrigger>Open</PopoverTrigger>
|
|
283
|
+
<PopoverContent>Content here</PopoverContent>
|
|
284
|
+
</Popover>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Toast
|
|
288
|
+
```tsx
|
|
289
|
+
import { useToast } from "@/hooks/use-toast"
|
|
290
|
+
import { Button } from "@/components/ui/button"
|
|
291
|
+
|
|
292
|
+
const { toast } = useToast()
|
|
293
|
+
|
|
294
|
+
<Button onClick={() => {
|
|
295
|
+
toast({
|
|
296
|
+
title: "Scheduled: Catch up",
|
|
297
|
+
description: "Friday, February 10, 2023 at 5:57 PM"
|
|
298
|
+
})
|
|
299
|
+
}}>
|
|
300
|
+
Show Toast
|
|
301
|
+
</Button>
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Command
|
|
305
|
+
```tsx
|
|
306
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "@/components/ui/command"
|
|
307
|
+
|
|
308
|
+
<Command>
|
|
309
|
+
<CommandInput placeholder="Type a command or search..." />
|
|
310
|
+
<CommandList>
|
|
311
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
312
|
+
<CommandGroup heading="Suggestions">
|
|
313
|
+
<CommandItem>Calendar</CommandItem>
|
|
314
|
+
<CommandItem>Search Emoji</CommandItem>
|
|
315
|
+
<CommandItem>Calculator</CommandItem>
|
|
316
|
+
</CommandGroup>
|
|
317
|
+
</CommandList>
|
|
318
|
+
</Command>
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Alert Dialog
|
|
322
|
+
```tsx
|
|
323
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog"
|
|
324
|
+
|
|
325
|
+
<AlertDialog>
|
|
326
|
+
<AlertDialogTrigger asChild>
|
|
327
|
+
<Button variant="destructive">Delete</Button>
|
|
328
|
+
</AlertDialogTrigger>
|
|
329
|
+
<AlertDialogContent>
|
|
330
|
+
<AlertDialogHeader>
|
|
331
|
+
<AlertDialogTitle>Absolutely sure?</AlertDialogTitle>
|
|
332
|
+
<AlertDialogDescription>
|
|
333
|
+
This permanently deletes your account and removes data from servers.
|
|
334
|
+
</AlertDialogDescription>
|
|
335
|
+
</AlertDialogHeader>
|
|
336
|
+
<AlertDialogFooter>
|
|
337
|
+
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
338
|
+
<AlertDialogAction>Continue</AlertDialogAction>
|
|
339
|
+
</AlertDialogFooter>
|
|
340
|
+
</AlertDialogContent>
|
|
341
|
+
</AlertDialog>
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
## Feedback & Status
|
|
345
|
+
|
|
346
|
+
### Alert
|
|
347
|
+
```tsx
|
|
348
|
+
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
|
|
349
|
+
|
|
350
|
+
<Alert>
|
|
351
|
+
<AlertTitle>Heads up!</AlertTitle>
|
|
352
|
+
<AlertDescription>You can add components using CLI.</AlertDescription>
|
|
353
|
+
</Alert>
|
|
354
|
+
|
|
355
|
+
<Alert variant="destructive">
|
|
356
|
+
<AlertTitle>Error</AlertTitle>
|
|
357
|
+
<AlertDescription>Session expired. Please log in.</AlertDescription>
|
|
358
|
+
</Alert>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Progress
|
|
362
|
+
```tsx
|
|
363
|
+
import { Progress } from "@/components/ui/progress"
|
|
364
|
+
|
|
365
|
+
<Progress value={33} />
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Skeleton
|
|
369
|
+
```tsx
|
|
370
|
+
import { Skeleton } from "@/components/ui/skeleton"
|
|
371
|
+
|
|
372
|
+
<div className="flex items-center space-x-4">
|
|
373
|
+
<Skeleton className="h-12 w-12 rounded-full" />
|
|
374
|
+
<div className="space-y-2">
|
|
375
|
+
<Skeleton className="h-4 w-[250px]" />
|
|
376
|
+
<Skeleton className="h-4 w-[200px]" />
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
## Display Components
|
|
382
|
+
|
|
383
|
+
### Table
|
|
384
|
+
```tsx
|
|
385
|
+
import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
|
|
386
|
+
|
|
387
|
+
<Table>
|
|
388
|
+
<TableCaption>Recent invoices</TableCaption>
|
|
389
|
+
<TableHeader>
|
|
390
|
+
<TableRow>
|
|
391
|
+
<TableHead>Invoice</TableHead>
|
|
392
|
+
<TableHead>Status</TableHead>
|
|
393
|
+
<TableHead>Amount</TableHead>
|
|
394
|
+
</TableRow>
|
|
395
|
+
</TableHeader>
|
|
396
|
+
<TableBody>
|
|
397
|
+
<TableRow>
|
|
398
|
+
<TableCell>INV001</TableCell>
|
|
399
|
+
<TableCell>Paid</TableCell>
|
|
400
|
+
<TableCell>$250.00</TableCell>
|
|
401
|
+
</TableRow>
|
|
402
|
+
</TableBody>
|
|
403
|
+
</Table>
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Avatar
|
|
407
|
+
```tsx
|
|
408
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
|
|
409
|
+
|
|
410
|
+
<Avatar>
|
|
411
|
+
<AvatarImage src="https://github.com/shadcn.png" />
|
|
412
|
+
<AvatarFallback>CN</AvatarFallback>
|
|
413
|
+
</Avatar>
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Badge
|
|
417
|
+
```tsx
|
|
418
|
+
import { Badge } from "@/components/ui/badge"
|
|
419
|
+
|
|
420
|
+
<Badge>Default</Badge>
|
|
421
|
+
<Badge variant="secondary">Secondary</Badge>
|
|
422
|
+
<Badge variant="destructive">Destructive</Badge>
|
|
423
|
+
<Badge variant="outline">Outline</Badge>
|
|
424
|
+
```
|