@neynar/ui 0.1.2 → 0.2.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 (282) hide show
  1. package/dist/components/ui/stack.d.ts +2 -1
  2. package/dist/components/ui/stack.d.ts.map +1 -1
  3. package/dist/components/ui/stories/stack.stories.d.ts +1 -1
  4. package/dist/components/ui/stories/typography.stories.d.ts.map +1 -1
  5. package/dist/components/ui/typography.d.ts +41 -40
  6. package/dist/components/ui/typography.d.ts.map +1 -1
  7. package/dist/index.js +26807 -18714
  8. package/dist/index.js.map +1 -1
  9. package/dist/tsconfig.tsbuildinfo +1 -1
  10. package/docs/llm/components/typography.md +92 -88
  11. package/llm-docs/a.llm.md +145 -0
  12. package/llm-docs/accordion-content.llm.md +67 -0
  13. package/llm-docs/accordion-item.llm.md +61 -0
  14. package/llm-docs/accordion-trigger.llm.md +69 -0
  15. package/llm-docs/accordion.llm.md +88 -0
  16. package/llm-docs/alert-description.llm.md +78 -0
  17. package/llm-docs/alert-dialog-action.llm.md +51 -0
  18. package/llm-docs/alert-dialog-cancel.llm.md +48 -0
  19. package/llm-docs/alert-dialog-content.llm.md +88 -0
  20. package/llm-docs/alert-dialog-description.llm.md +53 -0
  21. package/llm-docs/alert-dialog-footer.llm.md +41 -0
  22. package/llm-docs/alert-dialog-header.llm.md +39 -0
  23. package/llm-docs/alert-dialog-overlay.llm.md +44 -0
  24. package/llm-docs/alert-dialog-portal.llm.md +41 -0
  25. package/llm-docs/alert-dialog-title.llm.md +46 -0
  26. package/llm-docs/alert-dialog-trigger.llm.md +40 -0
  27. package/llm-docs/alert-dialog.llm.md +80 -0
  28. package/llm-docs/alert-title.llm.md +48 -0
  29. package/llm-docs/alert.llm.md +92 -0
  30. package/llm-docs/aspect-ratio.llm.md +41 -0
  31. package/llm-docs/avatar-fallback.llm.md +41 -0
  32. package/llm-docs/avatar-image.llm.md +48 -0
  33. package/llm-docs/avatar.llm.md +35 -0
  34. package/llm-docs/badge.llm.md +108 -0
  35. package/llm-docs/blockquote.llm.md +122 -0
  36. package/llm-docs/breadcrumb-ellipsis.llm.md +73 -0
  37. package/llm-docs/breadcrumb-item.llm.md +53 -0
  38. package/llm-docs/breadcrumb-link.llm.md +84 -0
  39. package/llm-docs/breadcrumb-list.llm.md +54 -0
  40. package/llm-docs/breadcrumb-page.llm.md +52 -0
  41. package/llm-docs/breadcrumb-separator.llm.md +60 -0
  42. package/llm-docs/breadcrumb.llm.md +110 -0
  43. package/llm-docs/button.llm.md +281 -0
  44. package/llm-docs/calendar-day-button.llm.md +57 -0
  45. package/llm-docs/calendar.llm.md +340 -0
  46. package/llm-docs/card-action.llm.md +64 -0
  47. package/llm-docs/card-content.llm.md +48 -0
  48. package/llm-docs/card-description.llm.md +46 -0
  49. package/llm-docs/card-footer.llm.md +56 -0
  50. package/llm-docs/card-header.llm.md +53 -0
  51. package/llm-docs/card-title.llm.md +43 -0
  52. package/llm-docs/card.llm.md +100 -0
  53. package/llm-docs/carousel-content.llm.md +77 -0
  54. package/llm-docs/carousel-item.llm.md +96 -0
  55. package/llm-docs/carousel-next.llm.md +95 -0
  56. package/llm-docs/carousel-previous.llm.md +95 -0
  57. package/llm-docs/carousel.llm.md +211 -0
  58. package/llm-docs/chart-config.llm.md +71 -0
  59. package/llm-docs/chart-container.llm.md +148 -0
  60. package/llm-docs/chart-legend-content.llm.md +85 -0
  61. package/llm-docs/chart-legend.llm.md +144 -0
  62. package/llm-docs/chart-style.llm.md +28 -0
  63. package/llm-docs/chart-tooltip-content.llm.md +149 -0
  64. package/llm-docs/chart-tooltip.llm.md +184 -0
  65. package/llm-docs/checkbox.llm.md +100 -0
  66. package/llm-docs/cn.llm.md +46 -0
  67. package/llm-docs/code.llm.md +108 -0
  68. package/llm-docs/collapsible-content.llm.md +109 -0
  69. package/llm-docs/collapsible-trigger.llm.md +75 -0
  70. package/llm-docs/collapsible.llm.md +109 -0
  71. package/llm-docs/combobox-option.llm.md +53 -0
  72. package/llm-docs/combobox.llm.md +208 -0
  73. package/llm-docs/command-dialog.llm.md +112 -0
  74. package/llm-docs/command-empty.llm.md +63 -0
  75. package/llm-docs/command-group.llm.md +83 -0
  76. package/llm-docs/command-input.llm.md +82 -0
  77. package/llm-docs/command-item.llm.md +97 -0
  78. package/llm-docs/command-list.llm.md +53 -0
  79. package/llm-docs/command-loading.llm.md +48 -0
  80. package/llm-docs/command-separator.llm.md +44 -0
  81. package/llm-docs/command-shortcut.llm.md +63 -0
  82. package/llm-docs/command.llm.md +147 -0
  83. package/llm-docs/container.llm.md +236 -0
  84. package/llm-docs/context-menu-checkbox-item.llm.md +97 -0
  85. package/llm-docs/context-menu-content.llm.md +91 -0
  86. package/llm-docs/context-menu-group.llm.md +61 -0
  87. package/llm-docs/context-menu-item.llm.md +94 -0
  88. package/llm-docs/context-menu-label.llm.md +60 -0
  89. package/llm-docs/context-menu-portal.llm.md +49 -0
  90. package/llm-docs/context-menu-radio-group.llm.md +66 -0
  91. package/llm-docs/context-menu-radio-item.llm.md +76 -0
  92. package/llm-docs/context-menu-separator.llm.md +51 -0
  93. package/llm-docs/context-menu-shortcut.llm.md +57 -0
  94. package/llm-docs/context-menu-sub-content.llm.md +90 -0
  95. package/llm-docs/context-menu-sub-trigger.llm.md +73 -0
  96. package/llm-docs/context-menu-sub.llm.md +61 -0
  97. package/llm-docs/context-menu-trigger.llm.md +53 -0
  98. package/llm-docs/context-menu.llm.md +103 -0
  99. package/llm-docs/date-picker.llm.md +90 -0
  100. package/llm-docs/dialog-close.llm.md +61 -0
  101. package/llm-docs/dialog-content.llm.md +128 -0
  102. package/llm-docs/dialog-description.llm.md +44 -0
  103. package/llm-docs/dialog-footer.llm.md +38 -0
  104. package/llm-docs/dialog-header.llm.md +40 -0
  105. package/llm-docs/dialog-overlay.llm.md +57 -0
  106. package/llm-docs/dialog-portal.llm.md +47 -0
  107. package/llm-docs/dialog-title.llm.md +41 -0
  108. package/llm-docs/dialog-trigger.llm.md +51 -0
  109. package/llm-docs/dialog.llm.md +113 -0
  110. package/llm-docs/drawer-close.llm.md +53 -0
  111. package/llm-docs/drawer-content.llm.md +58 -0
  112. package/llm-docs/drawer-description.llm.md +54 -0
  113. package/llm-docs/drawer-footer.llm.md +67 -0
  114. package/llm-docs/drawer-header.llm.md +60 -0
  115. package/llm-docs/drawer-overlay.llm.md +40 -0
  116. package/llm-docs/drawer-portal.llm.md +42 -0
  117. package/llm-docs/drawer-title.llm.md +51 -0
  118. package/llm-docs/drawer-trigger.llm.md +44 -0
  119. package/llm-docs/drawer.llm.md +194 -0
  120. package/llm-docs/dropdown-menu-checkbox-item.llm.md +111 -0
  121. package/llm-docs/dropdown-menu-content.llm.md +109 -0
  122. package/llm-docs/dropdown-menu-group.llm.md +38 -0
  123. package/llm-docs/dropdown-menu-item.llm.md +94 -0
  124. package/llm-docs/dropdown-menu-label.llm.md +66 -0
  125. package/llm-docs/dropdown-menu-portal.llm.md +32 -0
  126. package/llm-docs/dropdown-menu-radio-group.llm.md +73 -0
  127. package/llm-docs/dropdown-menu-radio-item.llm.md +92 -0
  128. package/llm-docs/dropdown-menu-separator.llm.md +55 -0
  129. package/llm-docs/dropdown-menu-shortcut.llm.md +74 -0
  130. package/llm-docs/dropdown-menu-sub-content.llm.md +80 -0
  131. package/llm-docs/dropdown-menu-sub-trigger.llm.md +84 -0
  132. package/llm-docs/dropdown-menu-sub.llm.md +74 -0
  133. package/llm-docs/dropdown-menu-trigger.llm.md +48 -0
  134. package/llm-docs/dropdown-menu.llm.md +120 -0
  135. package/llm-docs/empty-state.llm.md +174 -0
  136. package/llm-docs/h1.llm.md +113 -0
  137. package/llm-docs/h2.llm.md +113 -0
  138. package/llm-docs/h3.llm.md +111 -0
  139. package/llm-docs/h4.llm.md +109 -0
  140. package/llm-docs/h5.llm.md +110 -0
  141. package/llm-docs/h6.llm.md +110 -0
  142. package/llm-docs/hover-card-content.llm.md +167 -0
  143. package/llm-docs/hover-card-trigger.llm.md +65 -0
  144. package/llm-docs/hover-card.llm.md +121 -0
  145. package/llm-docs/input.llm.md +319 -0
  146. package/llm-docs/label.llm.md +145 -0
  147. package/llm-docs/lead.llm.md +119 -0
  148. package/llm-docs/menubar-checkbox-item.llm.md +66 -0
  149. package/llm-docs/menubar-content.llm.md +128 -0
  150. package/llm-docs/menubar-group.llm.md +40 -0
  151. package/llm-docs/menubar-item.llm.md +62 -0
  152. package/llm-docs/menubar-label.llm.md +40 -0
  153. package/llm-docs/menubar-menu.llm.md +32 -0
  154. package/llm-docs/menubar-portal.llm.md +38 -0
  155. package/llm-docs/menubar-radio-group.llm.md +39 -0
  156. package/llm-docs/menubar-radio-item.llm.md +59 -0
  157. package/llm-docs/menubar-separator.llm.md +35 -0
  158. package/llm-docs/menubar-shortcut.llm.md +37 -0
  159. package/llm-docs/menubar-sub-content.llm.md +127 -0
  160. package/llm-docs/menubar-sub-trigger.llm.md +51 -0
  161. package/llm-docs/menubar-sub.llm.md +53 -0
  162. package/llm-docs/menubar-trigger.llm.md +37 -0
  163. package/llm-docs/menubar.llm.md +115 -0
  164. package/llm-docs/navigation-menu-content.llm.md +116 -0
  165. package/llm-docs/navigation-menu-indicator.llm.md +68 -0
  166. package/llm-docs/navigation-menu-item.llm.md +62 -0
  167. package/llm-docs/navigation-menu-link.llm.md +109 -0
  168. package/llm-docs/navigation-menu-list.llm.md +52 -0
  169. package/llm-docs/navigation-menu-trigger-style.llm.md +22 -0
  170. package/llm-docs/navigation-menu-trigger.llm.md +57 -0
  171. package/llm-docs/navigation-menu-viewport.llm.md +51 -0
  172. package/llm-docs/navigation-menu.llm.md +184 -0
  173. package/llm-docs/p.llm.md +115 -0
  174. package/llm-docs/pagination-content.llm.md +60 -0
  175. package/llm-docs/pagination-ellipsis.llm.md +107 -0
  176. package/llm-docs/pagination-item.llm.md +59 -0
  177. package/llm-docs/pagination-link.llm.md +150 -0
  178. package/llm-docs/pagination-next.llm.md +115 -0
  179. package/llm-docs/pagination-previous.llm.md +115 -0
  180. package/llm-docs/pagination.llm.md +190 -0
  181. package/llm-docs/popover-anchor.llm.md +53 -0
  182. package/llm-docs/popover-content.llm.md +109 -0
  183. package/llm-docs/popover-trigger.llm.md +54 -0
  184. package/llm-docs/popover.llm.md +116 -0
  185. package/llm-docs/progress.llm.md +76 -0
  186. package/llm-docs/radio-group-indicator.llm.md +28 -0
  187. package/llm-docs/radio-group-item.llm.md +40 -0
  188. package/llm-docs/radio-group.llm.md +76 -0
  189. package/llm-docs/resizable-handle.llm.md +156 -0
  190. package/llm-docs/resizable-panel-group.llm.md +149 -0
  191. package/llm-docs/resizable-panel.llm.md +157 -0
  192. package/llm-docs/scroll-area-corner.llm.md +41 -0
  193. package/llm-docs/scroll-area-thumb.llm.md +39 -0
  194. package/llm-docs/scroll-area-viewport.llm.md +60 -0
  195. package/llm-docs/scroll-area.llm.md +125 -0
  196. package/llm-docs/scroll-bar.llm.md +78 -0
  197. package/llm-docs/sdk-items-registry.json +2638 -0
  198. package/llm-docs/select-content.llm.md +139 -0
  199. package/llm-docs/select-group.llm.md +60 -0
  200. package/llm-docs/select-item.llm.md +75 -0
  201. package/llm-docs/select-label.llm.md +62 -0
  202. package/llm-docs/select-scroll-down-button.llm.md +45 -0
  203. package/llm-docs/select-scroll-up-button.llm.md +45 -0
  204. package/llm-docs/select-separator.llm.md +59 -0
  205. package/llm-docs/select-trigger.llm.md +66 -0
  206. package/llm-docs/select-value.llm.md +67 -0
  207. package/llm-docs/select.llm.md +159 -0
  208. package/llm-docs/separator.llm.md +129 -0
  209. package/llm-docs/sheet-close.llm.md +49 -0
  210. package/llm-docs/sheet-content.llm.md +115 -0
  211. package/llm-docs/sheet-description.llm.md +62 -0
  212. package/llm-docs/sheet-footer.llm.md +64 -0
  213. package/llm-docs/sheet-header.llm.md +52 -0
  214. package/llm-docs/sheet-title.llm.md +53 -0
  215. package/llm-docs/sheet-trigger.llm.md +46 -0
  216. package/llm-docs/sheet.llm.md +126 -0
  217. package/llm-docs/sidebar-content.llm.md +63 -0
  218. package/llm-docs/sidebar-footer.llm.md +50 -0
  219. package/llm-docs/sidebar-group-action.llm.md +60 -0
  220. package/llm-docs/sidebar-group-content.llm.md +64 -0
  221. package/llm-docs/sidebar-group-label.llm.md +53 -0
  222. package/llm-docs/sidebar-group.llm.md +56 -0
  223. package/llm-docs/sidebar-header.llm.md +67 -0
  224. package/llm-docs/sidebar-input.llm.md +50 -0
  225. package/llm-docs/sidebar-inset.llm.md +52 -0
  226. package/llm-docs/sidebar-menu-action.llm.md +84 -0
  227. package/llm-docs/sidebar-menu-badge.llm.md +60 -0
  228. package/llm-docs/sidebar-menu-button.llm.md +103 -0
  229. package/llm-docs/sidebar-menu-item.llm.md +75 -0
  230. package/llm-docs/sidebar-menu-skeleton.llm.md +76 -0
  231. package/llm-docs/sidebar-menu-sub-button.llm.md +85 -0
  232. package/llm-docs/sidebar-menu-sub-item.llm.md +54 -0
  233. package/llm-docs/sidebar-menu-sub.llm.md +74 -0
  234. package/llm-docs/sidebar-menu.llm.md +65 -0
  235. package/llm-docs/sidebar-provider.llm.md +79 -0
  236. package/llm-docs/sidebar-rail.llm.md +34 -0
  237. package/llm-docs/sidebar-separator.llm.md +57 -0
  238. package/llm-docs/sidebar-trigger.llm.md +49 -0
  239. package/llm-docs/sidebar.llm.md +129 -0
  240. package/llm-docs/skeleton.llm.md +134 -0
  241. package/llm-docs/slider.llm.md +173 -0
  242. package/llm-docs/small.llm.md +115 -0
  243. package/llm-docs/span.llm.md +132 -0
  244. package/llm-docs/stack.llm.md +28 -0
  245. package/llm-docs/strong.llm.md +115 -0
  246. package/llm-docs/switch.llm.md +76 -0
  247. package/llm-docs/table-body.llm.md +36 -0
  248. package/llm-docs/table-caption.llm.md +48 -0
  249. package/llm-docs/table-cell.llm.md +53 -0
  250. package/llm-docs/table-footer.llm.md +41 -0
  251. package/llm-docs/table-head.llm.md +69 -0
  252. package/llm-docs/table-header.llm.md +41 -0
  253. package/llm-docs/table-row.llm.md +42 -0
  254. package/llm-docs/table.llm.md +123 -0
  255. package/llm-docs/tabs-content.llm.md +47 -0
  256. package/llm-docs/tabs-list.llm.md +41 -0
  257. package/llm-docs/tabs-trigger.llm.md +47 -0
  258. package/llm-docs/tabs.llm.md +71 -0
  259. package/llm-docs/text-field.llm.md +327 -0
  260. package/llm-docs/textarea.llm.md +311 -0
  261. package/llm-docs/theme-preference.llm.md +25 -0
  262. package/llm-docs/theme-toggle.llm.md +57 -0
  263. package/llm-docs/theme.llm.md +14 -0
  264. package/llm-docs/toast.llm.md +32 -0
  265. package/llm-docs/toaster.llm.md +193 -0
  266. package/llm-docs/toggle-group-item.llm.md +59 -0
  267. package/llm-docs/toggle-group.llm.md +101 -0
  268. package/llm-docs/toggle.llm.md +40 -0
  269. package/llm-docs/tooltip-content.llm.md +185 -0
  270. package/llm-docs/tooltip-provider.llm.md +68 -0
  271. package/llm-docs/tooltip-trigger.llm.md +70 -0
  272. package/llm-docs/tooltip.llm.md +129 -0
  273. package/llm-docs/typography.llm.md +175 -0
  274. package/llm-docs/use-carousel.llm.md +55 -0
  275. package/llm-docs/use-command-state.llm.md +32 -0
  276. package/llm-docs/use-is-mobile.llm.md +73 -0
  277. package/llm-docs/use-sidebar.llm.md +61 -0
  278. package/package.json +3 -2
  279. package/src/components/ui/stack.tsx +5 -1
  280. package/src/components/ui/stories/typography.stories.tsx +248 -205
  281. package/src/components/ui/typography.tsx +90 -79
  282. package/src/styles/globals.css +33 -10
@@ -0,0 +1,78 @@
1
+ # AlertDescription
2
+
3
+ **Type**: component
4
+
5
+ AlertDescription - Detailed description text content for alerts The body content area of an alert that provides detailed information, context, or instructions related to the alert message. Automatically styled with muted text color and proper grid positioning. Supports rich content including paragraphs, links, and inline formatting. ## Features - Muted foreground color for visual hierarchy - Proper grid positioning (col-start-2) for icon layout compatibility - Support for multiple paragraphs with relaxed line height - Grid layout with start justification for text alignment - Semantic HTML structure with data-slot attribute - Small text size (text-sm) for readability - Responsive gap spacing between content elements
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDescription } from '@neynar/ui';
11
+
12
+ <AlertDescription
13
+ className="value"
14
+ >
15
+ {/* Your content here */}
16
+ </AlertDescription>
17
+ ```
18
+
19
+ ## Component Props
20
+
21
+ ### className
22
+ - **Type**: `string`
23
+ - **Required**: No
24
+ - **Description**: No description available
25
+
26
+ ### children
27
+ - **Type**: `React.ReactNode`
28
+ - **Required**: No
29
+ - **Description**: No description available
30
+
31
+ ## Examples
32
+
33
+ ### Example 1
34
+ ```tsx
35
+ // Basic description with simple text
36
+ <Alert>
37
+ <AlertTitle>Success</AlertTitle>
38
+ <AlertDescription>
39
+ Your account has been created successfully.
40
+ </AlertDescription>
41
+ </Alert>
42
+ ```
43
+ ### Example 2
44
+ ```tsx
45
+ // Description with multiple paragraphs
46
+ <Alert variant="destructive">
47
+ <AlertCircle className="size-4" />
48
+ <AlertTitle>Connection Error</AlertTitle>
49
+ <AlertDescription>
50
+ <p>Unable to connect to the server. This could be due to:</p>
51
+ <p>• Network connectivity issues</p>
52
+ <p>• Server maintenance</p>
53
+ <p>Please try again in a few minutes.</p>
54
+ </AlertDescription>
55
+ </Alert>
56
+ ```
57
+ ### Example 3
58
+ ```tsx
59
+ // Description with links and rich content
60
+ <Alert>
61
+ <Info className="size-4" />
62
+ <AlertTitle>Update Available</AlertTitle>
63
+ <AlertDescription>
64
+ A new version is available. <a href="/changelog" className="underline">View changelog</a> or
65
+ <button className="ml-1 underline">update now</button>.
66
+ </AlertDescription>
67
+ </Alert>
68
+ ```
69
+ ### Example 4
70
+ ```tsx
71
+ // Custom styled description
72
+ <Alert>
73
+ <AlertTitle>Custom Alert</AlertTitle>
74
+ <AlertDescription className="text-sm font-medium text-foreground">
75
+ This description uses custom styling to override the default muted appearance.
76
+ </AlertDescription>
77
+ </Alert>
78
+ ```
@@ -0,0 +1,51 @@
1
+ # AlertDialogAction
2
+
3
+ **Type**: component
4
+
5
+ Primary action button of the alert dialog The button that confirms or executes the action being alerted about. Automatically receives focus when the dialog opens (unless overridden). Styled using buttonVariants() by default, but can be customized for destructive actions. Closes the dialog when clicked.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogAction } from '@neynar/ui';
11
+
12
+ <AlertDialogAction
13
+ asChild={true}
14
+ className="value"
15
+ />
16
+ ```
17
+
18
+ ## Component Props
19
+
20
+ ### asChild
21
+ - **Type**: `boolean`
22
+ - **Required**: No
23
+ - **Description**: Render as child element, merging props and behavior
24
+
25
+ ### className
26
+ - **Type**: `string`
27
+ - **Required**: No
28
+ - **Description**: Additional CSS classes (useful for destructive styling)
29
+
30
+ ## Examples
31
+
32
+ ```tsx
33
+ // Default action (primary button style)
34
+ <AlertDialogAction>Continue</AlertDialogAction>
35
+ <AlertDialogAction>Save Changes</AlertDialogAction>
36
+ // Destructive action with red styling
37
+ <AlertDialogAction className={buttonVariants({ variant: "destructive" })}>
38
+ Delete Account
39
+ </AlertDialogAction>
40
+ // Custom styled action
41
+ <AlertDialogAction className="bg-green-600 hover:bg-green-700">
42
+ Confirm Action
43
+ </AlertDialogAction>
44
+ // Composition with custom button
45
+ <AlertDialogAction asChild>
46
+ <Button variant="destructive" size="lg">
47
+ Delete Forever
48
+ </Button>
49
+ </AlertDialogAction>
50
+ ```
51
+ /
@@ -0,0 +1,48 @@
1
+ # AlertDialogCancel
2
+
3
+ **Type**: component
4
+
5
+ Cancel button of the alert dialog The button that dismisses the dialog without performing the action. Styled using outline variant by default to de-emphasize compared to the primary action. Closes the dialog when clicked without triggering the main action.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogCancel } from '@neynar/ui';
11
+
12
+ <AlertDialogCancel
13
+ asChild={true}
14
+ className="value"
15
+ />
16
+ ```
17
+
18
+ ## Component Props
19
+
20
+ ### asChild
21
+ - **Type**: `boolean`
22
+ - **Required**: No
23
+ - **Description**: Render as child element, merging props and behavior
24
+
25
+ ### className
26
+ - **Type**: `string`
27
+ - **Required**: No
28
+ - **Description**: Additional CSS classes for custom styling
29
+
30
+ ## Examples
31
+
32
+ ```tsx
33
+ // Standard cancel buttons
34
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
35
+ <AlertDialogCancel>No, keep it</AlertDialogCancel>
36
+ <AlertDialogCancel>Go Back</AlertDialogCancel>
37
+ // Custom styled cancel
38
+ <AlertDialogCancel className="text-red-600">
39
+ Don't Delete
40
+ </AlertDialogCancel>
41
+ // Composition with custom button
42
+ <AlertDialogCancel asChild>
43
+ <Button variant="ghost" size="sm">
44
+ Maybe Later
45
+ </Button>
46
+ </AlertDialogCancel>
47
+ ```
48
+ /
@@ -0,0 +1,88 @@
1
+ # AlertDialogContent
2
+
3
+ **Type**: component
4
+
5
+ Main content container for the alert dialog The primary container that holds all alert dialog content. Automatically includes the portal and overlay, and provides default styling with responsive design. Centered on screen with smooth fade and zoom animations. Manages focus trapping and keyboard navigation automatically.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogContent } from '@neynar/ui';
11
+
12
+ <AlertDialogContent
13
+ asChild={true}
14
+ forceMount={true}
15
+ onOpenAutoFocus={handleOpenAutoFocus}
16
+ onCloseAutoFocus={handleCloseAutoFocus}
17
+ onEscapeKeyDown={handleEscapeKeyDown}
18
+ className="value"
19
+ />
20
+ ```
21
+
22
+ ## Component Props
23
+
24
+ ### asChild
25
+ - **Type**: `boolean`
26
+ - **Required**: No
27
+ - **Description**: Render as child element, merging props and behavior
28
+
29
+ ### forceMount
30
+ - **Type**: `boolean`
31
+ - **Required**: No
32
+ - **Description**: Force mount the component even when dialog is closed
33
+
34
+ ### onOpenAutoFocus
35
+ - **Type**: `(event: Event) => void`
36
+ - **Required**: No
37
+ - **Description**: Callback when dialog opens and focus moves to content
38
+
39
+ ### onCloseAutoFocus
40
+ - **Type**: `(event: Event) => void`
41
+ - **Required**: No
42
+ - **Description**: Callback when dialog closes and focus returns to trigger
43
+
44
+ ### onEscapeKeyDown
45
+ - **Type**: `(event: KeyboardEvent) => void`
46
+ - **Required**: No
47
+ - **Description**: Callback when Escape key is pressed (can preventDefault)
48
+
49
+ ### className
50
+ - **Type**: `string`
51
+ - **Required**: No
52
+ - **Description**: Additional CSS classes for custom styling
53
+
54
+ ## Examples
55
+
56
+ ```tsx
57
+ // Basic usage
58
+ <AlertDialogContent>
59
+ <AlertDialogHeader>
60
+ <AlertDialogTitle>Confirm Action</AlertDialogTitle>
61
+ <AlertDialogDescription>This action cannot be undone.</AlertDialogDescription>
62
+ </AlertDialogHeader>
63
+ <AlertDialogFooter>
64
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
65
+ <AlertDialogAction>Continue</AlertDialogAction>
66
+ </AlertDialogFooter>
67
+ </AlertDialogContent>
68
+ // Custom focus handling
69
+ <AlertDialogContent
70
+ onOpenAutoFocus={(e) => {
71
+ e.preventDefault();
72
+ customFocusTarget.focus();
73
+ }}
74
+ onEscapeKeyDown={(e) => {
75
+ if (hasUnsavedChanges) {
76
+ e.preventDefault();
77
+ showUnsavedWarning();
78
+ }
79
+ }}
80
+ >
81
+ // content
82
+ </AlertDialogContent>
83
+ // Custom styling
84
+ <AlertDialogContent className="max-w-md">
85
+ // smaller dialog
86
+ </AlertDialogContent>
87
+ ```
88
+ /
@@ -0,0 +1,53 @@
1
+ # AlertDialogDescription
2
+
3
+ **Type**: component
4
+
5
+ Description text of the alert dialog Provides additional context and explanation for the alert or action. Should clearly explain the consequences of the action being confirmed. Automatically provides proper ARIA description via aria-describedby for screen readers. Can be omitted if aria-describedby is provided to Content.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogDescription } from '@neynar/ui';
11
+
12
+ <AlertDialogDescription
13
+ asChild={true}
14
+ className="value"
15
+ />
16
+ ```
17
+
18
+ ## Component Props
19
+
20
+ ### asChild
21
+ - **Type**: `boolean`
22
+ - **Required**: No
23
+ - **Description**: Render as child element, merging props and behavior
24
+
25
+ ### className
26
+ - **Type**: `string`
27
+ - **Required**: No
28
+ - **Description**: Additional CSS classes for custom styling
29
+
30
+ ## Examples
31
+
32
+ ```tsx
33
+ // Standard descriptions
34
+ <AlertDialogDescription>
35
+ This action cannot be undone. This will permanently delete your
36
+ account and remove your data from our servers.
37
+ </AlertDialogDescription>
38
+ <AlertDialogDescription>
39
+ You will be signed out of all devices and will need to sign in again
40
+ to access your account.
41
+ </AlertDialogDescription>
42
+ // Custom styling
43
+ <AlertDialogDescription className="text-center text-lg">
44
+ Are you sure you want to continue?
45
+ </AlertDialogDescription>
46
+ // Composition with custom element
47
+ <AlertDialogDescription asChild>
48
+ <p className="custom-description">
49
+ Custom description element
50
+ </p>
51
+ </AlertDialogDescription>
52
+ ```
53
+ /
@@ -0,0 +1,41 @@
1
+ # AlertDialogFooter
2
+
3
+ **Type**: component
4
+
5
+ Footer section of the alert dialog Contains the action buttons (cancel and confirm). Uses responsive layout with stacked buttons on mobile (cancel on top) and horizontal layout on larger screens (cancel on left, action on right). Should contain AlertDialogCancel and AlertDialogAction for proper UX.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogFooter } from '@neynar/ui';
11
+
12
+ <AlertDialogFooter
13
+ className="value"
14
+ />
15
+ ```
16
+
17
+ ## Component Props
18
+
19
+ ### className
20
+ - **Type**: `string`
21
+ - **Required**: No
22
+ - **Description**: Additional CSS classes for custom styling
23
+
24
+ ## Examples
25
+
26
+ ```tsx
27
+ <AlertDialogFooter>
28
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
29
+ <AlertDialogAction>Delete Account</AlertDialogAction>
30
+ </AlertDialogFooter>
31
+ // Custom button order
32
+ <AlertDialogFooter className="flex-row">
33
+ <AlertDialogAction>Continue</AlertDialogAction>
34
+ <AlertDialogCancel>Go Back</AlertDialogCancel>
35
+ </AlertDialogFooter>
36
+ // Single action footer
37
+ <AlertDialogFooter>
38
+ <AlertDialogAction>I Understand</AlertDialogAction>
39
+ </AlertDialogFooter>
40
+ ```
41
+ /
@@ -0,0 +1,39 @@
1
+ # AlertDialogHeader
2
+
3
+ **Type**: component
4
+
5
+ Header section of the alert dialog Contains the title and description of the alert dialog. Provides consistent spacing and alignment, with responsive text alignment (centered on mobile, left-aligned on larger screens). Should contain AlertDialogTitle and optionally AlertDialogDescription for proper accessibility.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogHeader } from '@neynar/ui';
11
+
12
+ <AlertDialogHeader
13
+ className="value"
14
+ />
15
+ ```
16
+
17
+ ## Component Props
18
+
19
+ ### className
20
+ - **Type**: `string`
21
+ - **Required**: No
22
+ - **Description**: Additional CSS classes for custom styling
23
+
24
+ ## Examples
25
+
26
+ ```tsx
27
+ <AlertDialogHeader>
28
+ <AlertDialogTitle>Delete Account</AlertDialogTitle>
29
+ <AlertDialogDescription>
30
+ This will permanently delete your account and all associated data.
31
+ This action cannot be undone.
32
+ </AlertDialogDescription>
33
+ </AlertDialogHeader>
34
+ // Custom styling
35
+ <AlertDialogHeader className="text-left">
36
+ <AlertDialogTitle>Custom Header</AlertDialogTitle>
37
+ </AlertDialogHeader>
38
+ ```
39
+ /
@@ -0,0 +1,44 @@
1
+ # AlertDialogOverlay
2
+
3
+ **Type**: component
4
+
5
+ Overlay backdrop behind the alert dialog A semi-transparent backdrop that covers the entire viewport when the dialog is open. Provides visual separation and prevents interaction with background content. Includes smooth fade in/out animations and proper z-index stacking.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogOverlay } from '@neynar/ui';
11
+
12
+ <AlertDialogOverlay
13
+ asChild={true}
14
+ forceMount={true}
15
+ className="value"
16
+ />
17
+ ```
18
+
19
+ ## Component Props
20
+
21
+ ### asChild
22
+ - **Type**: `boolean`
23
+ - **Required**: No
24
+ - **Description**: Render as child element, merging props and behavior
25
+
26
+ ### forceMount
27
+ - **Type**: `boolean`
28
+ - **Required**: No
29
+ - **Description**: Force mount the component even when dialog is closed
30
+
31
+ ### className
32
+ - **Type**: `string`
33
+ - **Required**: No
34
+ - **Description**: Additional CSS classes for custom styling
35
+
36
+ ## Examples
37
+
38
+ ```tsx
39
+ // Custom overlay styling
40
+ <AlertDialogOverlay className="bg-black/80" />
41
+ // Force mounted overlay
42
+ <AlertDialogOverlay forceMount className="custom-backdrop" />
43
+ ```
44
+ /
@@ -0,0 +1,41 @@
1
+ # AlertDialogPortal
2
+
3
+ **Type**: component
4
+
5
+ Portal component for rendering dialog outside normal DOM tree Renders the alert dialog content into a portal, typically at the end of the document body. This ensures the dialog appears above other content and is properly accessible. Usually not used directly - AlertDialogContent includes this automatically.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogPortal } from '@neynar/ui';
11
+
12
+ <AlertDialogPortal
13
+ forceMount={true}
14
+ container={value}
15
+ />
16
+ ```
17
+
18
+ ## Component Props
19
+
20
+ ### forceMount
21
+ - **Type**: `boolean`
22
+ - **Required**: No
23
+ - **Description**: Force mount the component even when dialog is closed
24
+
25
+ ### container
26
+ - **Type**: `HTMLElement`
27
+ - **Required**: No
28
+ - **Description**: Container element to portal into (defaults to document.body)
29
+
30
+ ## Examples
31
+
32
+ ```tsx
33
+ // Custom portal container
34
+ <AlertDialogPortal container={customContainer}>
35
+ <AlertDialogOverlay />
36
+ <AlertDialogPrimitive.Content>
37
+ // content
38
+ </AlertDialogPrimitive.Content>
39
+ </AlertDialogPortal>
40
+ ```
41
+ /
@@ -0,0 +1,46 @@
1
+ # AlertDialogTitle
2
+
3
+ **Type**: component
4
+
5
+ Title heading of the alert dialog The main heading that describes the alert or action being confirmed. Automatically provides proper ARIA labeling for screen readers via aria-labelledby. Should be concise and clearly state what the dialog is asking.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogTitle } from '@neynar/ui';
11
+
12
+ <AlertDialogTitle
13
+ asChild={true}
14
+ className="value"
15
+ />
16
+ ```
17
+
18
+ ## Component Props
19
+
20
+ ### asChild
21
+ - **Type**: `boolean`
22
+ - **Required**: No
23
+ - **Description**: Render as child element, merging props and behavior
24
+
25
+ ### className
26
+ - **Type**: `string`
27
+ - **Required**: No
28
+ - **Description**: Additional CSS classes for custom styling
29
+
30
+ ## Examples
31
+
32
+ ```tsx
33
+ // Standard titles
34
+ <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
35
+ <AlertDialogTitle>Delete Account</AlertDialogTitle>
36
+ <AlertDialogTitle>Confirm Sign Out</AlertDialogTitle>
37
+ // Custom styling
38
+ <AlertDialogTitle className="text-red-600 text-xl">
39
+ Destructive Action
40
+ </AlertDialogTitle>
41
+ // Composition with custom element
42
+ <AlertDialogTitle asChild>
43
+ <h1 className="custom-title">Custom Title Element</h1>
44
+ </AlertDialogTitle>
45
+ ```
46
+ /
@@ -0,0 +1,40 @@
1
+ # AlertDialogTrigger
2
+
3
+ **Type**: component
4
+
5
+ Trigger element that opens the alert dialog The element that opens the alert dialog when activated. Usually a button, but can be any interactive element through composition. When opened, the dialog will trap focus and require user interaction before continuing.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialogTrigger } from '@neynar/ui';
11
+
12
+ <AlertDialogTrigger
13
+ asChild={true}
14
+ />
15
+ ```
16
+
17
+ ## Component Props
18
+
19
+ ### asChild
20
+ - **Type**: `boolean`
21
+ - **Required**: No
22
+ - **Description**: Render as child element, merging props and behavior
23
+
24
+ ## Examples
25
+
26
+ ```tsx
27
+ // Direct usage
28
+ <AlertDialogTrigger>
29
+ Delete Account
30
+ </AlertDialogTrigger>
31
+ // Composition with Button component
32
+ <AlertDialogTrigger asChild>
33
+ <Button variant="destructive">Delete Account</Button>
34
+ </AlertDialogTrigger>
35
+ // Composition with custom element
36
+ <AlertDialogTrigger asChild>
37
+ <button className="custom-trigger">Custom Trigger</button>
38
+ </AlertDialogTrigger>
39
+ ```
40
+ /
@@ -0,0 +1,80 @@
1
+ # AlertDialog
2
+
3
+ **Type**: component
4
+
5
+ Alert dialog component for critical confirmations and destructive actions A specialized modal dialog built on Radix UI Alert Dialog primitives that interrupts users with important information requiring immediate acknowledgment or decision. Unlike regular dialogs, alert dialogs cannot be dismissed by clicking outside and focus the action button by default for critical decisions. Based on the WAI-ARIA Alert Dialog design pattern, this component is specifically designed for destructive actions, confirmations, or critical warnings that need immediate attention before the user can continue.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { AlertDialog } from '@neynar/ui';
11
+
12
+ <AlertDialog
13
+ defaultOpen={true}
14
+ open={true}
15
+ onOpenChange={handleOpenChange}
16
+ />
17
+ ```
18
+
19
+ ## Component Props
20
+
21
+ ### defaultOpen
22
+ - **Type**: `boolean`
23
+ - **Required**: No
24
+ - **Description**: No description available
25
+
26
+ ### open
27
+ - **Type**: `boolean`
28
+ - **Required**: No
29
+ - **Description**: No description available
30
+
31
+ ### onOpenChange
32
+ - **Type**: `(open: boolean) => void`
33
+ - **Required**: No
34
+ - **Description**: No description available
35
+
36
+ ## Examples
37
+
38
+ ### Example 1
39
+ ```tsx
40
+ // Basic destructive confirmation
41
+ <AlertDialog>
42
+ <AlertDialogTrigger asChild>
43
+ <Button variant="destructive">Delete Account</Button>
44
+ </AlertDialogTrigger>
45
+ <AlertDialogContent>
46
+ <AlertDialogHeader>
47
+ <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
48
+ <AlertDialogDescription>
49
+ This action cannot be undone. This will permanently delete
50
+ your account and remove your data from our servers.
51
+ </AlertDialogDescription>
52
+ </AlertDialogHeader>
53
+ <AlertDialogFooter>
54
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
55
+ <AlertDialogAction>Delete Account</AlertDialogAction>
56
+ </AlertDialogFooter>
57
+ </AlertDialogContent>
58
+ </AlertDialog>
59
+ ```
60
+ ### Example 2
61
+ ```tsx
62
+ // Simple confirmation
63
+ <AlertDialog>
64
+ <AlertDialogTrigger asChild>
65
+ <Button variant="outline">Sign Out</Button>
66
+ </AlertDialogTrigger>
67
+ <AlertDialogContent>
68
+ <AlertDialogHeader>
69
+ <AlertDialogTitle>Sign Out</AlertDialogTitle>
70
+ <AlertDialogDescription>
71
+ Are you sure you want to sign out of your account?
72
+ </AlertDialogDescription>
73
+ </AlertDialogHeader>
74
+ <AlertDialogFooter>
75
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
76
+ <AlertDialogAction>Sign Out</AlertDialogAction>
77
+ </AlertDialogFooter>
78
+ </AlertDialogContent>
79
+ </AlertDialog>
80
+ ```