@lglab/compose-ui-mcp 0.0.1

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 (48) hide show
  1. package/README.md +11 -0
  2. package/dist/assets/llms/accordion.md +184 -0
  3. package/dist/assets/llms/alert-dialog.md +306 -0
  4. package/dist/assets/llms/autocomplete.md +756 -0
  5. package/dist/assets/llms/avatar.md +166 -0
  6. package/dist/assets/llms/badge.md +478 -0
  7. package/dist/assets/llms/button.md +238 -0
  8. package/dist/assets/llms/card.md +264 -0
  9. package/dist/assets/llms/checkbox-group.md +158 -0
  10. package/dist/assets/llms/checkbox.md +83 -0
  11. package/dist/assets/llms/collapsible.md +165 -0
  12. package/dist/assets/llms/combobox.md +1255 -0
  13. package/dist/assets/llms/context-menu.md +371 -0
  14. package/dist/assets/llms/dialog.md +592 -0
  15. package/dist/assets/llms/drawer.md +437 -0
  16. package/dist/assets/llms/field.md +74 -0
  17. package/dist/assets/llms/form.md +1931 -0
  18. package/dist/assets/llms/input.md +47 -0
  19. package/dist/assets/llms/menu.md +484 -0
  20. package/dist/assets/llms/menubar.md +804 -0
  21. package/dist/assets/llms/meter.md +181 -0
  22. package/dist/assets/llms/navigation-menu.md +187 -0
  23. package/dist/assets/llms/number-field.md +243 -0
  24. package/dist/assets/llms/pagination.md +514 -0
  25. package/dist/assets/llms/popover.md +206 -0
  26. package/dist/assets/llms/preview-card.md +146 -0
  27. package/dist/assets/llms/progress.md +60 -0
  28. package/dist/assets/llms/radio-group.md +105 -0
  29. package/dist/assets/llms/scroll-area.md +132 -0
  30. package/dist/assets/llms/select.md +276 -0
  31. package/dist/assets/llms/separator.md +49 -0
  32. package/dist/assets/llms/skeleton.md +96 -0
  33. package/dist/assets/llms/slider.md +161 -0
  34. package/dist/assets/llms/switch.md +101 -0
  35. package/dist/assets/llms/table.md +1325 -0
  36. package/dist/assets/llms/tabs.md +327 -0
  37. package/dist/assets/llms/textarea.md +38 -0
  38. package/dist/assets/llms/toast.md +349 -0
  39. package/dist/assets/llms/toggle-group.md +261 -0
  40. package/dist/assets/llms/toggle.md +161 -0
  41. package/dist/assets/llms/toolbar.md +148 -0
  42. package/dist/assets/llms/tooltip.md +486 -0
  43. package/dist/assets/llms-full.txt +14515 -0
  44. package/dist/assets/llms.txt +65 -0
  45. package/dist/index.d.mts +1 -0
  46. package/dist/index.mjs +161 -0
  47. package/dist/index.mjs.map +1 -0
  48. package/package.json +54 -0
@@ -0,0 +1,327 @@
1
+ # Tabs
2
+
3
+ A component for toggling between related panels on the same page with an animated indicator.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @lglab/compose-ui
9
+ ```
10
+
11
+ ## Import
12
+
13
+ ```tsx
14
+ import { TabsRoot, TabsList, TabsTab, TabsIndicator, TabsPanel } from '@lglab/compose-ui'
15
+ ```
16
+
17
+ ## Examples
18
+
19
+ ### Basic
20
+
21
+ ```tsx
22
+ import {
23
+ TabsIndicator,
24
+ TabsList,
25
+ TabsPanel,
26
+ TabsRoot,
27
+ TabsTab,
28
+ } from '@lglab/compose-ui/tabs'
29
+
30
+ export default function BasicExample() {
31
+ return (
32
+ <TabsRoot defaultValue='overview'>
33
+ <TabsList>
34
+ <TabsTab value='overview'>Overview</TabsTab>
35
+ <TabsTab value='projects'>Projects</TabsTab>
36
+ <TabsTab value='settings'>Settings</TabsTab>
37
+ <TabsIndicator />
38
+ </TabsList>
39
+ <TabsPanel value='overview' className='text-sm'>
40
+ <div className='rounded-md p-2'>
41
+ <p>
42
+ This is the overview panel. Here you can see a summary of your account and
43
+ recent activity.
44
+ </p>
45
+ </div>
46
+ </TabsPanel>
47
+ <TabsPanel value='projects' className='text-sm'>
48
+ <div className='rounded-md p-2'>
49
+ <p>
50
+ View and manage your projects here. Create new projects or edit existing ones.
51
+ </p>
52
+ </div>
53
+ </TabsPanel>
54
+ <TabsPanel value='settings' className='text-sm'>
55
+ <div className='rounded-md p-2'>
56
+ <p>Configure your account settings, preferences, and notification options.</p>
57
+ </div>
58
+ </TabsPanel>
59
+ </TabsRoot>
60
+ )
61
+ }
62
+ ```
63
+
64
+ ### With Icons
65
+
66
+ ```tsx
67
+ import {
68
+ TabsIndicator,
69
+ TabsList,
70
+ TabsPanel,
71
+ TabsRoot,
72
+ TabsTab,
73
+ } from '@lglab/compose-ui/tabs'
74
+ import { FolderIcon, SettingsIcon, UserIcon } from 'lucide-react'
75
+
76
+ export default function WithIconsExample() {
77
+ return (
78
+ <TabsRoot defaultValue='account'>
79
+ <TabsList>
80
+ <TabsTab value='account' className='gap-1.5'>
81
+ <UserIcon className='size-4' />
82
+ Account
83
+ </TabsTab>
84
+ <TabsTab value='projects' className='gap-1.5'>
85
+ <FolderIcon className='size-4' />
86
+ Projects
87
+ </TabsTab>
88
+ <TabsTab value='settings' className='gap-1.5'>
89
+ <SettingsIcon className='size-4' />
90
+ Settings
91
+ </TabsTab>
92
+ <TabsIndicator />
93
+ </TabsList>
94
+ <TabsPanel value='account' className='text-sm'>
95
+ <div className='rounded-md p-2'>
96
+ <p>Manage your account details and profile information.</p>
97
+ </div>
98
+ </TabsPanel>
99
+ <TabsPanel value='projects' className='text-sm'>
100
+ <div className='rounded-md p-2'>
101
+ <p>Browse and manage all your projects in one place.</p>
102
+ </div>
103
+ </TabsPanel>
104
+ <TabsPanel value='settings' className='text-sm'>
105
+ <div className='rounded-md p-2'>
106
+ <p>Customize your experience with various settings options.</p>
107
+ </div>
108
+ </TabsPanel>
109
+ </TabsRoot>
110
+ )
111
+ }
112
+ ```
113
+
114
+ ### Custom style
115
+
116
+ ```tsx
117
+ import {
118
+ TabsIndicator,
119
+ TabsList,
120
+ TabsPanel,
121
+ TabsRoot,
122
+ TabsTab,
123
+ } from '@lglab/compose-ui/tabs'
124
+ import { FolderIcon, SettingsIcon, UserIcon } from 'lucide-react'
125
+
126
+ export default function LineExample() {
127
+ return (
128
+ <TabsRoot defaultValue='account'>
129
+ <TabsList className='bg-transparent border-b'>
130
+ <TabsTab value='account' className='gap-1.5'>
131
+ <UserIcon className='size-4' />
132
+ Account
133
+ </TabsTab>
134
+ <TabsTab value='projects' className='gap-1.5'>
135
+ <FolderIcon className='size-4' />
136
+ Projects
137
+ </TabsTab>
138
+ <TabsTab value='settings' className='gap-1.5'>
139
+ <SettingsIcon className='size-4' />
140
+ Settings
141
+ </TabsTab>
142
+ <TabsIndicator className='top-auto bottom-0 h-[2px] bg-primary rounded-none' />
143
+ </TabsList>
144
+ <TabsPanel value='account' className='text-sm'>
145
+ <div className='rounded-md p-2'>
146
+ <p>Manage your account details and profile information.</p>
147
+ </div>
148
+ </TabsPanel>
149
+ <TabsPanel value='projects' className='text-sm'>
150
+ <div className='rounded-md p-2'>
151
+ <p>Browse and manage all your projects in one place.</p>
152
+ </div>
153
+ </TabsPanel>
154
+ <TabsPanel value='settings' className='text-sm'>
155
+ <div className='rounded-md p-2'>
156
+ <p>Customize your experience with various settings options.</p>
157
+ </div>
158
+ </TabsPanel>
159
+ </TabsRoot>
160
+ )
161
+ }
162
+ ```
163
+
164
+ ### Sizes
165
+
166
+ ```tsx
167
+ import { TabsIndicator, TabsList, TabsRoot, TabsTab } from '@lglab/compose-ui/tabs'
168
+
169
+ export default function SizesExample() {
170
+ return (
171
+ <div className='space-y-4'>
172
+ <div>
173
+ <p className='mb-2 text-xs'>Small</p>
174
+ <TabsRoot defaultValue='tab1'>
175
+ <TabsList>
176
+ <TabsTab value='tab1' size='sm'>
177
+ Tab 1
178
+ </TabsTab>
179
+ <TabsTab value='tab2' size='sm'>
180
+ Tab 2
181
+ </TabsTab>
182
+ <TabsTab value='tab3' size='sm'>
183
+ Tab 3
184
+ </TabsTab>
185
+ <TabsIndicator />
186
+ </TabsList>
187
+ </TabsRoot>
188
+ </div>
189
+ <div>
190
+ <p className='mb-2 text-xs'>Default</p>
191
+ <TabsRoot defaultValue='tab1'>
192
+ <TabsList>
193
+ <TabsTab value='tab1'>Tab 1</TabsTab>
194
+ <TabsTab value='tab2'>Tab 2</TabsTab>
195
+ <TabsTab value='tab3'>Tab 3</TabsTab>
196
+ <TabsIndicator />
197
+ </TabsList>
198
+ </TabsRoot>
199
+ </div>
200
+ <div>
201
+ <p className='mb-2 text-xs'>Large</p>
202
+ <TabsRoot defaultValue='tab1'>
203
+ <TabsList>
204
+ <TabsTab value='tab1' size='lg'>
205
+ Tab 1
206
+ </TabsTab>
207
+ <TabsTab value='tab2' size='lg'>
208
+ Tab 2
209
+ </TabsTab>
210
+ <TabsTab value='tab3' size='lg'>
211
+ Tab 3
212
+ </TabsTab>
213
+ <TabsIndicator />
214
+ </TabsList>
215
+ </TabsRoot>
216
+ </div>
217
+ </div>
218
+ )
219
+ }
220
+ ```
221
+
222
+ ### Disabled Tab
223
+
224
+ ```tsx
225
+ import {
226
+ TabsIndicator,
227
+ TabsList,
228
+ TabsPanel,
229
+ TabsRoot,
230
+ TabsTab,
231
+ } from '@lglab/compose-ui/tabs'
232
+
233
+ export default function DisabledExample() {
234
+ return (
235
+ <TabsRoot defaultValue='active'>
236
+ <TabsList>
237
+ <TabsTab value='active'>Active</TabsTab>
238
+ <TabsTab value='disabled' disabled>
239
+ Disabled
240
+ </TabsTab>
241
+ <TabsTab value='another'>Another Tab</TabsTab>
242
+ <TabsIndicator />
243
+ </TabsList>
244
+ <TabsPanel value='active' className='text-sm'>
245
+ <div className='rounded-md p-2'>
246
+ <p>This tab is active. The middle tab is disabled and cannot be selected.</p>
247
+ </div>
248
+ </TabsPanel>
249
+ <TabsPanel value='disabled' className='text-sm'>
250
+ <div className='rounded-md p-2'>
251
+ <p>You shouldn&apos;t see this content.</p>
252
+ </div>
253
+ </TabsPanel>
254
+ <TabsPanel value='another' className='text-sm'>
255
+ <div className='rounded-md p-2'>
256
+ <p>This is another active tab panel.</p>
257
+ </div>
258
+ </TabsPanel>
259
+ </TabsRoot>
260
+ )
261
+ }
262
+ ```
263
+
264
+ ### Vertical Orientation
265
+
266
+ ```tsx
267
+ import {
268
+ TabsIndicator,
269
+ TabsList,
270
+ TabsPanel,
271
+ TabsRoot,
272
+ TabsTab,
273
+ } from '@lglab/compose-ui/tabs'
274
+
275
+ export default function VerticalExample() {
276
+ return (
277
+ <TabsRoot defaultValue='general' orientation='vertical' className='flex-row gap-4'>
278
+ <TabsList orientation='vertical'>
279
+ <TabsTab value='general'>General</TabsTab>
280
+ <TabsTab value='security'>Security</TabsTab>
281
+ <TabsTab value='notifications'>Notifications</TabsTab>
282
+ <TabsTab value='billing'>Billing</TabsTab>
283
+ <TabsIndicator orientation='vertical' />
284
+ </TabsList>
285
+ <div className='flex-1 text-sm'>
286
+ <TabsPanel value='general' className='mt-0'>
287
+ <div className='rounded-md p-2'>
288
+ <h3 className='font-medium'>General Settings</h3>
289
+ <p className='mt-1 text-sm'>
290
+ Configure general application settings and preferences.
291
+ </p>
292
+ </div>
293
+ </TabsPanel>
294
+ <TabsPanel value='security' className='mt-0'>
295
+ <div className='rounded-md p-2'>
296
+ <h3 className='font-medium'>Security Settings</h3>
297
+ <p className='mt-1 text-sm'>
298
+ Manage your security preferences, two-factor authentication, and sessions.
299
+ </p>
300
+ </div>
301
+ </TabsPanel>
302
+ <TabsPanel value='notifications' className='mt-0'>
303
+ <div className='rounded-md p-2'>
304
+ <h3 className='font-medium'>Notification Preferences</h3>
305
+ <p className='mt-1 text-sm'>
306
+ Control how and when you receive notifications.
307
+ </p>
308
+ </div>
309
+ </TabsPanel>
310
+ <TabsPanel value='billing' className='mt-0'>
311
+ <div className='rounded-md p-2'>
312
+ <h3 className='font-medium'>Billing Information</h3>
313
+ <p className='mt-1 text-sm'>
314
+ View and manage your billing details and payment methods.
315
+ </p>
316
+ </div>
317
+ </TabsPanel>
318
+ </div>
319
+ </TabsRoot>
320
+ )
321
+ }
322
+ ```
323
+
324
+ ## Resources
325
+
326
+ - [Base UI Tabs Documentation](https://base-ui.com/react/components/tabs)
327
+ - [API Reference](https://base-ui.com/react/components/tabs#api-reference)
@@ -0,0 +1,38 @@
1
+ # Textarea
2
+
3
+ A multi-line text input element.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @lglab/compose-ui
9
+ ```
10
+
11
+ ## Import
12
+
13
+ ```tsx
14
+ import { Textarea } from '@lglab/compose-ui'
15
+ ```
16
+
17
+ ## Examples
18
+
19
+ ### Default
20
+
21
+ ```tsx
22
+ import { FieldLabel, FieldRoot } from '@lglab/compose-ui/field'
23
+ import { Textarea } from '@lglab/compose-ui/textarea'
24
+
25
+ export default function DefaultExample() {
26
+ return (
27
+ <FieldRoot name='message' className='w-full max-w-md'>
28
+ <FieldLabel>Message</FieldLabel>
29
+ <Textarea placeholder='Enter your message' />
30
+ </FieldRoot>
31
+ )
32
+ }
33
+ ```
34
+
35
+ ## Resources
36
+
37
+ - [Base UI Textarea Documentation](https://base-ui.com/react/components/textarea)
38
+ - [API Reference](https://base-ui.com/react/components/textarea#api-reference)
@@ -0,0 +1,349 @@
1
+ # Toast
2
+
3
+ A notification message that appears temporarily to provide feedback.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @lglab/compose-ui
9
+ ```
10
+
11
+ ## Import
12
+
13
+ ```tsx
14
+ import { Toast } from '@lglab/compose-ui'
15
+ ```
16
+
17
+ ## Examples
18
+
19
+ ### Default
20
+
21
+ ```tsx
22
+ import { Button } from '@lglab/compose-ui/button'
23
+ import {
24
+ Toast,
25
+ ToastClose,
26
+ ToastContent,
27
+ ToastDescription,
28
+ ToastProvider,
29
+ ToastRoot,
30
+ ToastTitle,
31
+ ToastViewport,
32
+ } from '@lglab/compose-ui/toast'
33
+ import { X } from 'lucide-react'
34
+
35
+ function ToastDemo() {
36
+ const toastManager = Toast.useToastManager()
37
+
38
+ const showToast = () => {
39
+ toastManager.add({
40
+ title: 'Event Created',
41
+ description: 'Your event has been scheduled successfully.',
42
+ })
43
+ }
44
+
45
+ return (
46
+ <>
47
+ <Button onClick={showToast}>Show Toast</Button>
48
+ <ToastViewport>
49
+ {toastManager.toasts.map((toast) => (
50
+ <ToastRoot key={toast.id} toast={toast}>
51
+ <ToastContent>
52
+ <ToastTitle />
53
+ <ToastDescription />
54
+ </ToastContent>
55
+ <ToastClose aria-label='Close'>
56
+ <X className='size-4' />
57
+ </ToastClose>
58
+ </ToastRoot>
59
+ ))}
60
+ </ToastViewport>
61
+ </>
62
+ )
63
+ }
64
+
65
+ export default function DefaultExample() {
66
+ return (
67
+ <ToastProvider>
68
+ <ToastDemo />
69
+ </ToastProvider>
70
+ )
71
+ }
72
+ ```
73
+
74
+ ### With Action
75
+
76
+ ```tsx
77
+ import { Button } from '@lglab/compose-ui/button'
78
+ import {
79
+ Toast,
80
+ ToastAction,
81
+ ToastClose,
82
+ ToastContent,
83
+ ToastDescription,
84
+ ToastProvider,
85
+ ToastRoot,
86
+ ToastTitle,
87
+ ToastViewport,
88
+ } from '@lglab/compose-ui/toast'
89
+ import { X } from 'lucide-react'
90
+
91
+ function ToastDemo() {
92
+ const toastManager = Toast.useToastManager()
93
+
94
+ const showToast = () => {
95
+ const toastId = toastManager.add({
96
+ title: 'File Deleted',
97
+ description: 'The file has been moved to trash.',
98
+ type: 'success',
99
+ actionProps: {
100
+ children: 'Undo',
101
+ onClick: () => {
102
+ toastManager.close(toastId)
103
+ toastManager.add({
104
+ title: 'File Restored',
105
+ description: 'The file has been restored from trash.',
106
+ })
107
+ },
108
+ },
109
+ })
110
+ }
111
+
112
+ return (
113
+ <>
114
+ <Button onClick={showToast}>Delete File</Button>
115
+ <ToastViewport>
116
+ {toastManager.toasts.map((toast) => (
117
+ <ToastRoot key={toast.id} toast={toast}>
118
+ <ToastContent>
119
+ <ToastTitle />
120
+ <ToastDescription />
121
+ <ToastAction />
122
+ </ToastContent>
123
+ <ToastClose aria-label='Close'>
124
+ <X className='size-4' />
125
+ </ToastClose>
126
+ </ToastRoot>
127
+ ))}
128
+ </ToastViewport>
129
+ </>
130
+ )
131
+ }
132
+
133
+ export default function WithActionExample() {
134
+ return (
135
+ <ToastProvider>
136
+ <ToastDemo />
137
+ </ToastProvider>
138
+ )
139
+ }
140
+ ```
141
+
142
+ ### Promise Toast
143
+
144
+ ```tsx
145
+ import { Button } from '@lglab/compose-ui/button'
146
+ import {
147
+ Toast,
148
+ ToastClose,
149
+ ToastContent,
150
+ ToastDescription,
151
+ ToastProvider,
152
+ ToastRoot,
153
+ ToastTitle,
154
+ ToastViewport,
155
+ } from '@lglab/compose-ui/toast'
156
+ import { X } from 'lucide-react'
157
+
158
+ function ToastDemo() {
159
+ const toastManager = Toast.useToastManager()
160
+
161
+ const saveData = () => {
162
+ const promise = new Promise<{ message: string }>((resolve) => {
163
+ setTimeout(() => resolve({ message: 'Data saved!' }), 2000)
164
+ })
165
+
166
+ toastManager.promise(promise, {
167
+ loading: 'Saving...',
168
+ success: (data) => data.message,
169
+ error: 'Failed to save',
170
+ })
171
+ }
172
+
173
+ return (
174
+ <>
175
+ <Button onClick={saveData}>Save Data</Button>
176
+ <ToastViewport>
177
+ {toastManager.toasts.map((toast) => (
178
+ <ToastRoot key={toast.id} toast={toast}>
179
+ <ToastContent>
180
+ <ToastTitle />
181
+ <ToastDescription />
182
+ </ToastContent>
183
+ <ToastClose aria-label='Close'>
184
+ <X className='size-4' />
185
+ </ToastClose>
186
+ </ToastRoot>
187
+ ))}
188
+ </ToastViewport>
189
+ </>
190
+ )
191
+ }
192
+
193
+ export default function PromiseExample() {
194
+ return (
195
+ <ToastProvider>
196
+ <ToastDemo />
197
+ </ToastProvider>
198
+ )
199
+ }
200
+ ```
201
+
202
+ ### Stacked Toasts
203
+
204
+ ```tsx
205
+ import { Button } from '@lglab/compose-ui/button'
206
+ import {
207
+ Toast,
208
+ ToastClose,
209
+ ToastContent,
210
+ ToastDescription,
211
+ ToastProvider,
212
+ ToastRoot,
213
+ ToastTitle,
214
+ ToastViewport,
215
+ } from '@lglab/compose-ui/toast'
216
+ import { X } from 'lucide-react'
217
+
218
+ function ToastDemo() {
219
+ const toastManager = Toast.useToastManager()
220
+
221
+ const showMultipleToasts = () => {
222
+ toastManager.add({
223
+ title: 'First Notification',
224
+ description: 'This is the first toast message.',
225
+ })
226
+ setTimeout(() => {
227
+ toastManager.add({
228
+ title: 'Second Notification',
229
+ description: 'This is the second toast message.',
230
+ })
231
+ }, 500)
232
+ setTimeout(() => {
233
+ toastManager.add({
234
+ title: 'Third Notification',
235
+ description: 'This is the third toast message.',
236
+ })
237
+ }, 1000)
238
+ }
239
+
240
+ return (
241
+ <>
242
+ <Button onClick={showMultipleToasts}>Show Multiple Toasts</Button>
243
+ <ToastViewport>
244
+ {toastManager.toasts.map((toast) => (
245
+ <ToastRoot key={toast.id} toast={toast}>
246
+ <ToastContent>
247
+ <ToastTitle />
248
+ <ToastDescription />
249
+ </ToastContent>
250
+ <ToastClose aria-label='Close'>
251
+ <X className='size-4' />
252
+ </ToastClose>
253
+ </ToastRoot>
254
+ ))}
255
+ </ToastViewport>
256
+ </>
257
+ )
258
+ }
259
+
260
+ export default function StackedExample() {
261
+ return (
262
+ <ToastProvider limit={3}>
263
+ <ToastDemo />
264
+ </ToastProvider>
265
+ )
266
+ }
267
+ ```
268
+
269
+ ### Custom Positions
270
+
271
+ ```tsx
272
+ import { Button } from '@lglab/compose-ui/button'
273
+ import {
274
+ Toast,
275
+ ToastClose,
276
+ ToastContent,
277
+ ToastDescription,
278
+ ToastProvider,
279
+ ToastRoot,
280
+ ToastTitle,
281
+ ToastViewport,
282
+ type ToastViewportProps,
283
+ } from '@lglab/compose-ui/toast'
284
+ import { X } from 'lucide-react'
285
+
286
+ type Position = NonNullable<ToastViewportProps['position']>
287
+
288
+ function ToastDemo({ position }: { position: Position }) {
289
+ const toastManager = Toast.useToastManager()
290
+
291
+ const showToast = () => {
292
+ toastManager.add({
293
+ title: `Toast from ${position}`,
294
+ description: 'This toast appears in a custom position.',
295
+ })
296
+ }
297
+
298
+ return (
299
+ <>
300
+ <Button onClick={showToast} variant='outline' size='sm'>
301
+ {position}
302
+ </Button>
303
+ <ToastViewport position={position}>
304
+ {toastManager.toasts.map((toast) => (
305
+ <ToastRoot key={toast.id} toast={toast}>
306
+ <ToastContent>
307
+ <ToastTitle />
308
+ <ToastDescription />
309
+ </ToastContent>
310
+ <ToastClose aria-label='Close'>
311
+ <X className='size-4' />
312
+ </ToastClose>
313
+ </ToastRoot>
314
+ ))}
315
+ </ToastViewport>
316
+ </>
317
+ )
318
+ }
319
+
320
+ export default function PositionsExample() {
321
+ return (
322
+ <div className='flex flex-wrap gap-2'>
323
+ <ToastProvider>
324
+ <ToastDemo position='top-left' />
325
+ </ToastProvider>
326
+ <ToastProvider>
327
+ <ToastDemo position='top-center' />
328
+ </ToastProvider>
329
+ <ToastProvider>
330
+ <ToastDemo position='top-right' />
331
+ </ToastProvider>
332
+ <ToastProvider>
333
+ <ToastDemo position='bottom-left' />
334
+ </ToastProvider>
335
+ <ToastProvider>
336
+ <ToastDemo position='bottom-center' />
337
+ </ToastProvider>
338
+ <ToastProvider>
339
+ <ToastDemo position='bottom-right' />
340
+ </ToastProvider>
341
+ </div>
342
+ )
343
+ }
344
+ ```
345
+
346
+ ## Resources
347
+
348
+ - [Base UI Toast Documentation](https://base-ui.com/react/components/toast)
349
+ - [API Reference](https://base-ui.com/react/components/toast#api-reference)