@neynar/ui 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 (320) hide show
  1. package/.llm/accordion-content.llm.md +67 -0
  2. package/.llm/accordion-item.llm.md +61 -0
  3. package/.llm/accordion-trigger.llm.md +69 -0
  4. package/.llm/accordion.llm.md +88 -0
  5. package/.llm/alert-description.llm.md +78 -0
  6. package/.llm/alert-dialog-action.llm.md +51 -0
  7. package/.llm/alert-dialog-cancel.llm.md +48 -0
  8. package/.llm/alert-dialog-content.llm.md +88 -0
  9. package/.llm/alert-dialog-description.llm.md +53 -0
  10. package/.llm/alert-dialog-footer.llm.md +41 -0
  11. package/.llm/alert-dialog-header.llm.md +39 -0
  12. package/.llm/alert-dialog-overlay.llm.md +44 -0
  13. package/.llm/alert-dialog-portal.llm.md +41 -0
  14. package/.llm/alert-dialog-title.llm.md +46 -0
  15. package/.llm/alert-dialog-trigger.llm.md +40 -0
  16. package/.llm/alert-dialog.llm.md +80 -0
  17. package/.llm/alert-title.llm.md +48 -0
  18. package/.llm/alert.llm.md +92 -0
  19. package/.llm/aspect-ratio.llm.md +41 -0
  20. package/.llm/avatar-fallback.llm.md +41 -0
  21. package/.llm/avatar-image.llm.md +48 -0
  22. package/.llm/avatar.llm.md +35 -0
  23. package/.llm/badge.llm.md +117 -0
  24. package/.llm/blockquote.llm.md +55 -0
  25. package/.llm/body-text-large.llm.md +49 -0
  26. package/.llm/body-text-small.llm.md +49 -0
  27. package/.llm/body-text.llm.md +52 -0
  28. package/.llm/breadcrumb-ellipsis.llm.md +73 -0
  29. package/.llm/breadcrumb-item.llm.md +53 -0
  30. package/.llm/breadcrumb-link.llm.md +84 -0
  31. package/.llm/breadcrumb-list.llm.md +54 -0
  32. package/.llm/breadcrumb-page.llm.md +52 -0
  33. package/.llm/breadcrumb-separator.llm.md +60 -0
  34. package/.llm/breadcrumb.llm.md +110 -0
  35. package/.llm/button-group-separator.llm.md +53 -0
  36. package/.llm/button-group-text.llm.md +56 -0
  37. package/.llm/button-group.llm.md +81 -0
  38. package/.llm/button.llm.md +281 -0
  39. package/.llm/calendar-day-button.llm.md +57 -0
  40. package/.llm/calendar.llm.md +340 -0
  41. package/.llm/caption.llm.md +48 -0
  42. package/.llm/card-action.llm.md +64 -0
  43. package/.llm/card-content.llm.md +48 -0
  44. package/.llm/card-description.llm.md +46 -0
  45. package/.llm/card-footer.llm.md +56 -0
  46. package/.llm/card-header.llm.md +53 -0
  47. package/.llm/card-title.llm.md +43 -0
  48. package/.llm/card.llm.md +100 -0
  49. package/.llm/carousel-content.llm.md +77 -0
  50. package/.llm/carousel-item.llm.md +96 -0
  51. package/.llm/carousel-next.llm.md +95 -0
  52. package/.llm/carousel-previous.llm.md +95 -0
  53. package/.llm/carousel.llm.md +211 -0
  54. package/.llm/chart-config.llm.md +71 -0
  55. package/.llm/chart-container.llm.md +148 -0
  56. package/.llm/chart-legend-content.llm.md +85 -0
  57. package/.llm/chart-legend.llm.md +144 -0
  58. package/.llm/chart-style.llm.md +28 -0
  59. package/.llm/chart-tooltip-content.llm.md +149 -0
  60. package/.llm/chart-tooltip.llm.md +184 -0
  61. package/.llm/checkbox.llm.md +100 -0
  62. package/.llm/cn.llm.md +46 -0
  63. package/.llm/code.llm.md +45 -0
  64. package/.llm/collapsible-content.llm.md +109 -0
  65. package/.llm/collapsible-trigger.llm.md +75 -0
  66. package/.llm/collapsible.llm.md +109 -0
  67. package/.llm/combobox-option.llm.md +53 -0
  68. package/.llm/combobox.llm.md +208 -0
  69. package/.llm/command-dialog.llm.md +112 -0
  70. package/.llm/command-empty.llm.md +63 -0
  71. package/.llm/command-group.llm.md +83 -0
  72. package/.llm/command-input.llm.md +82 -0
  73. package/.llm/command-item.llm.md +97 -0
  74. package/.llm/command-list.llm.md +53 -0
  75. package/.llm/command-loading.llm.md +48 -0
  76. package/.llm/command-separator.llm.md +44 -0
  77. package/.llm/command-shortcut.llm.md +63 -0
  78. package/.llm/command.llm.md +147 -0
  79. package/.llm/container.llm.md +236 -0
  80. package/.llm/context-menu-checkbox-item.llm.md +97 -0
  81. package/.llm/context-menu-content.llm.md +91 -0
  82. package/.llm/context-menu-group.llm.md +61 -0
  83. package/.llm/context-menu-item.llm.md +94 -0
  84. package/.llm/context-menu-label.llm.md +60 -0
  85. package/.llm/context-menu-portal.llm.md +49 -0
  86. package/.llm/context-menu-radio-group.llm.md +66 -0
  87. package/.llm/context-menu-radio-item.llm.md +76 -0
  88. package/.llm/context-menu-separator.llm.md +51 -0
  89. package/.llm/context-menu-shortcut.llm.md +57 -0
  90. package/.llm/context-menu-sub-content.llm.md +90 -0
  91. package/.llm/context-menu-sub-trigger.llm.md +73 -0
  92. package/.llm/context-menu-sub.llm.md +61 -0
  93. package/.llm/context-menu-trigger.llm.md +53 -0
  94. package/.llm/context-menu.llm.md +103 -0
  95. package/.llm/date-picker.llm.md +90 -0
  96. package/.llm/dialog-close.llm.md +61 -0
  97. package/.llm/dialog-content.llm.md +128 -0
  98. package/.llm/dialog-description.llm.md +44 -0
  99. package/.llm/dialog-footer.llm.md +38 -0
  100. package/.llm/dialog-header.llm.md +40 -0
  101. package/.llm/dialog-overlay.llm.md +57 -0
  102. package/.llm/dialog-portal.llm.md +47 -0
  103. package/.llm/dialog-title.llm.md +41 -0
  104. package/.llm/dialog-trigger.llm.md +51 -0
  105. package/.llm/dialog.llm.md +113 -0
  106. package/.llm/drawer-close.llm.md +53 -0
  107. package/.llm/drawer-content.llm.md +58 -0
  108. package/.llm/drawer-description.llm.md +54 -0
  109. package/.llm/drawer-footer.llm.md +67 -0
  110. package/.llm/drawer-header.llm.md +60 -0
  111. package/.llm/drawer-overlay.llm.md +40 -0
  112. package/.llm/drawer-portal.llm.md +42 -0
  113. package/.llm/drawer-title.llm.md +51 -0
  114. package/.llm/drawer-trigger.llm.md +44 -0
  115. package/.llm/drawer.llm.md +194 -0
  116. package/.llm/dropdown-menu-checkbox-item.llm.md +111 -0
  117. package/.llm/dropdown-menu-content.llm.md +109 -0
  118. package/.llm/dropdown-menu-group.llm.md +38 -0
  119. package/.llm/dropdown-menu-item.llm.md +94 -0
  120. package/.llm/dropdown-menu-label.llm.md +66 -0
  121. package/.llm/dropdown-menu-portal.llm.md +32 -0
  122. package/.llm/dropdown-menu-radio-group.llm.md +73 -0
  123. package/.llm/dropdown-menu-radio-item.llm.md +92 -0
  124. package/.llm/dropdown-menu-separator.llm.md +55 -0
  125. package/.llm/dropdown-menu-shortcut.llm.md +74 -0
  126. package/.llm/dropdown-menu-sub-content.llm.md +80 -0
  127. package/.llm/dropdown-menu-sub-trigger.llm.md +84 -0
  128. package/.llm/dropdown-menu-sub.llm.md +74 -0
  129. package/.llm/dropdown-menu-trigger.llm.md +48 -0
  130. package/.llm/dropdown-menu.llm.md +120 -0
  131. package/.llm/empty-content.llm.md +103 -0
  132. package/.llm/empty-description.llm.md +70 -0
  133. package/.llm/empty-header.llm.md +64 -0
  134. package/.llm/empty-media.llm.md +81 -0
  135. package/.llm/empty-state.llm.md +174 -0
  136. package/.llm/empty-title.llm.md +54 -0
  137. package/.llm/empty.llm.md +158 -0
  138. package/.llm/field-content.llm.md +28 -0
  139. package/.llm/field-description.llm.md +28 -0
  140. package/.llm/field-error.llm.md +41 -0
  141. package/.llm/field-group.llm.md +84 -0
  142. package/.llm/field-label.llm.md +28 -0
  143. package/.llm/field-legend.llm.md +77 -0
  144. package/.llm/field-separator.llm.md +35 -0
  145. package/.llm/field-set.llm.md +80 -0
  146. package/.llm/field-title.llm.md +28 -0
  147. package/.llm/field.llm.md +35 -0
  148. package/.llm/hover-card-content.llm.md +167 -0
  149. package/.llm/hover-card-trigger.llm.md +65 -0
  150. package/.llm/hover-card.llm.md +121 -0
  151. package/.llm/input-group-addon.llm.md +91 -0
  152. package/.llm/input-group-button.llm.md +120 -0
  153. package/.llm/input-group-input.llm.md +145 -0
  154. package/.llm/input-group-text.llm.md +75 -0
  155. package/.llm/input-group-textarea.llm.md +157 -0
  156. package/.llm/input-group.llm.md +108 -0
  157. package/.llm/input.llm.md +319 -0
  158. package/.llm/item-actions.llm.md +77 -0
  159. package/.llm/item-content.llm.md +73 -0
  160. package/.llm/item-description.llm.md +61 -0
  161. package/.llm/item-footer.llm.md +68 -0
  162. package/.llm/item-group.llm.md +73 -0
  163. package/.llm/item-header.llm.md +66 -0
  164. package/.llm/item-media.llm.md +75 -0
  165. package/.llm/item-separator.llm.md +80 -0
  166. package/.llm/item-title.llm.md +59 -0
  167. package/.llm/item.llm.md +115 -0
  168. package/.llm/kbd-group.llm.md +71 -0
  169. package/.llm/kbd.llm.md +71 -0
  170. package/.llm/label.llm.md +145 -0
  171. package/.llm/menubar-checkbox-item.llm.md +66 -0
  172. package/.llm/menubar-content.llm.md +128 -0
  173. package/.llm/menubar-group.llm.md +40 -0
  174. package/.llm/menubar-item.llm.md +62 -0
  175. package/.llm/menubar-label.llm.md +40 -0
  176. package/.llm/menubar-menu.llm.md +32 -0
  177. package/.llm/menubar-portal.llm.md +38 -0
  178. package/.llm/menubar-radio-group.llm.md +39 -0
  179. package/.llm/menubar-radio-item.llm.md +59 -0
  180. package/.llm/menubar-separator.llm.md +35 -0
  181. package/.llm/menubar-shortcut.llm.md +37 -0
  182. package/.llm/menubar-sub-content.llm.md +127 -0
  183. package/.llm/menubar-sub-trigger.llm.md +51 -0
  184. package/.llm/menubar-sub.llm.md +53 -0
  185. package/.llm/menubar-trigger.llm.md +37 -0
  186. package/.llm/menubar.llm.md +115 -0
  187. package/.llm/navigation-menu-content.llm.md +116 -0
  188. package/.llm/navigation-menu-indicator.llm.md +68 -0
  189. package/.llm/navigation-menu-item.llm.md +62 -0
  190. package/.llm/navigation-menu-link.llm.md +109 -0
  191. package/.llm/navigation-menu-list.llm.md +52 -0
  192. package/.llm/navigation-menu-trigger-style.llm.md +22 -0
  193. package/.llm/navigation-menu-trigger.llm.md +57 -0
  194. package/.llm/navigation-menu-viewport.llm.md +51 -0
  195. package/.llm/navigation-menu.llm.md +184 -0
  196. package/.llm/overline.llm.md +51 -0
  197. package/.llm/page-title.llm.md +52 -0
  198. package/.llm/pagination-content.llm.md +60 -0
  199. package/.llm/pagination-ellipsis.llm.md +107 -0
  200. package/.llm/pagination-item.llm.md +59 -0
  201. package/.llm/pagination-link.llm.md +150 -0
  202. package/.llm/pagination-next.llm.md +115 -0
  203. package/.llm/pagination-previous.llm.md +115 -0
  204. package/.llm/pagination.llm.md +190 -0
  205. package/.llm/popover-anchor.llm.md +53 -0
  206. package/.llm/popover-content.llm.md +109 -0
  207. package/.llm/popover-trigger.llm.md +54 -0
  208. package/.llm/popover.llm.md +116 -0
  209. package/.llm/progress.llm.md +76 -0
  210. package/.llm/radio-group-indicator.llm.md +28 -0
  211. package/.llm/radio-group-item.llm.md +40 -0
  212. package/.llm/radio-group.llm.md +76 -0
  213. package/.llm/resizable-handle.llm.md +156 -0
  214. package/.llm/resizable-panel-group.llm.md +149 -0
  215. package/.llm/resizable-panel.llm.md +157 -0
  216. package/.llm/scroll-area-corner.llm.md +41 -0
  217. package/.llm/scroll-area-thumb.llm.md +39 -0
  218. package/.llm/scroll-area-viewport.llm.md +60 -0
  219. package/.llm/scroll-area.llm.md +125 -0
  220. package/.llm/scroll-bar.llm.md +78 -0
  221. package/.llm/sdk-items-registry.json +2984 -0
  222. package/.llm/section-title.llm.md +48 -0
  223. package/.llm/select-content.llm.md +139 -0
  224. package/.llm/select-group.llm.md +60 -0
  225. package/.llm/select-item.llm.md +75 -0
  226. package/.llm/select-label.llm.md +62 -0
  227. package/.llm/select-scroll-down-button.llm.md +45 -0
  228. package/.llm/select-scroll-up-button.llm.md +45 -0
  229. package/.llm/select-separator.llm.md +59 -0
  230. package/.llm/select-trigger.llm.md +66 -0
  231. package/.llm/select-value.llm.md +67 -0
  232. package/.llm/select.llm.md +159 -0
  233. package/.llm/separator.llm.md +129 -0
  234. package/.llm/sheet-close.llm.md +49 -0
  235. package/.llm/sheet-content.llm.md +115 -0
  236. package/.llm/sheet-description.llm.md +62 -0
  237. package/.llm/sheet-footer.llm.md +64 -0
  238. package/.llm/sheet-header.llm.md +52 -0
  239. package/.llm/sheet-title.llm.md +53 -0
  240. package/.llm/sheet-trigger.llm.md +46 -0
  241. package/.llm/sheet.llm.md +126 -0
  242. package/.llm/sidebar-content.llm.md +63 -0
  243. package/.llm/sidebar-footer.llm.md +50 -0
  244. package/.llm/sidebar-group-action.llm.md +60 -0
  245. package/.llm/sidebar-group-content.llm.md +64 -0
  246. package/.llm/sidebar-group-label.llm.md +53 -0
  247. package/.llm/sidebar-group.llm.md +56 -0
  248. package/.llm/sidebar-header.llm.md +67 -0
  249. package/.llm/sidebar-input.llm.md +50 -0
  250. package/.llm/sidebar-inset.llm.md +52 -0
  251. package/.llm/sidebar-menu-action.llm.md +84 -0
  252. package/.llm/sidebar-menu-badge.llm.md +60 -0
  253. package/.llm/sidebar-menu-button.llm.md +103 -0
  254. package/.llm/sidebar-menu-item.llm.md +75 -0
  255. package/.llm/sidebar-menu-skeleton.llm.md +76 -0
  256. package/.llm/sidebar-menu-sub-button.llm.md +85 -0
  257. package/.llm/sidebar-menu-sub-item.llm.md +54 -0
  258. package/.llm/sidebar-menu-sub.llm.md +74 -0
  259. package/.llm/sidebar-menu.llm.md +65 -0
  260. package/.llm/sidebar-provider.llm.md +79 -0
  261. package/.llm/sidebar-rail.llm.md +34 -0
  262. package/.llm/sidebar-separator.llm.md +57 -0
  263. package/.llm/sidebar-trigger.llm.md +49 -0
  264. package/.llm/sidebar.llm.md +129 -0
  265. package/.llm/skeleton.llm.md +134 -0
  266. package/.llm/slider.llm.md +173 -0
  267. package/.llm/spinner.llm.md +182 -0
  268. package/.llm/stack.llm.md +28 -0
  269. package/.llm/subsection-title.llm.md +46 -0
  270. package/.llm/switch.llm.md +76 -0
  271. package/.llm/table-body.llm.md +36 -0
  272. package/.llm/table-caption.llm.md +48 -0
  273. package/.llm/table-cell.llm.md +53 -0
  274. package/.llm/table-footer.llm.md +41 -0
  275. package/.llm/table-head.llm.md +69 -0
  276. package/.llm/table-header.llm.md +41 -0
  277. package/.llm/table-row.llm.md +42 -0
  278. package/.llm/table.llm.md +123 -0
  279. package/.llm/tabs-content.llm.md +47 -0
  280. package/.llm/tabs-list.llm.md +41 -0
  281. package/.llm/tabs-trigger.llm.md +47 -0
  282. package/.llm/tabs.llm.md +71 -0
  283. package/.llm/text-field.llm.md +327 -0
  284. package/.llm/textarea.llm.md +311 -0
  285. package/.llm/theme-preference.llm.md +25 -0
  286. package/.llm/theme-toggle.llm.md +57 -0
  287. package/.llm/theme.llm.md +14 -0
  288. package/.llm/toaster.llm.md +193 -0
  289. package/.llm/toggle-group-item.llm.md +59 -0
  290. package/.llm/toggle-group.llm.md +101 -0
  291. package/.llm/toggle.llm.md +40 -0
  292. package/.llm/tooltip-content.llm.md +185 -0
  293. package/.llm/tooltip-provider.llm.md +68 -0
  294. package/.llm/tooltip-trigger.llm.md +70 -0
  295. package/.llm/tooltip.llm.md +129 -0
  296. package/.llm/use-carousel.llm.md +55 -0
  297. package/.llm/use-command-state.llm.md +32 -0
  298. package/.llm/use-is-mobile.llm.md +73 -0
  299. package/.llm/use-sidebar.llm.md +61 -0
  300. package/dist/components/ui/scroll-area.d.ts +5 -5
  301. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  302. package/dist/components/ui/stack.d.ts.map +1 -1
  303. package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -1
  304. package/dist/components/ui/stories/typography.stories.d.ts +8 -108
  305. package/dist/components/ui/stories/typography.stories.d.ts.map +1 -1
  306. package/dist/components/ui/theme-toggle.d.ts +0 -3
  307. package/dist/components/ui/theme-toggle.d.ts.map +1 -1
  308. package/dist/components/ui/theme.d.ts.map +1 -1
  309. package/dist/components/ui/typography.d.ts +211 -474
  310. package/dist/components/ui/typography.d.ts.map +1 -1
  311. package/dist/index.js +5160 -9875
  312. package/dist/index.js.map +1 -1
  313. package/dist/tsconfig.tsbuildinfo +1 -1
  314. package/package.json +2 -2
  315. package/src/components/ui/stack.tsx +3 -1
  316. package/src/components/ui/stories/typography.stories.tsx +261 -1512
  317. package/src/components/ui/theme-toggle.tsx +1 -3
  318. package/src/components/ui/theme.tsx +6 -1
  319. package/src/components/ui/typography.tsx +416 -1136
  320. package/src/styles/globals.css +57 -106
@@ -1,1248 +1,572 @@
1
1
  import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
2
 
5
3
  import { cn } from "@/lib/utils";
6
4
 
7
5
  /**
8
- * Typography variant configuration using class-variance-authority
6
+ * Typography Components - Purpose-named, Tailwind-first text components
9
7
  *
10
- * Defines all possible typography variants, sizes, and styling options.
11
- * Uses Tailwind CSS 4 with custom CSS properties for theming.
12
- * Provides consistent text styling across the entire application.
8
+ * This module provides semantic typography components for web applications.
9
+ * Each component has a clear purpose and sensible Tailwind CSS defaults that
10
+ * can be fully overridden via the className prop.
13
11
  *
14
- * @variant microcopy - Very small text for fine print, timestamps, and metadata (text-xs)
15
- * @variant detail - Smaller text for details, captions, and descriptions (text-sm)
16
- * @variant body - Standard body text for readable content (text-base, leading-snug)
17
- * @variant blogBody - Body text for blog posts and long form content (text-lg, leading-loose)
18
- * @variant paragraphLead - Paragraph lead text for blog posts and long form content (text-lg)
19
- * @variant eyebrow - Eyebrow text for blog posts and long form content (text-xl)
20
- * @variant subHeadline - Secondary headings for subsections (text-2xl)
21
- * @variant headline - Primary headings for page/section titles (text-3xl)
22
- * @variant sectionTitle - Section titles (text-4xl, leading-relaxed)
23
- * @variant pageTitle - Page titles (text-5xl, leading-relaxed)
24
- * @variant displayTitle - Display titles (text-6xl, leading-snug)
25
- * @variant heroTitle - Hero titles (text-7xl, leading-snug)
26
- * @variant code - Monospace font for inline code, terminal commands, and technical references (text-base, font-mono)
12
+ * Design Philosophy:
13
+ * - Purpose-obvious naming (PageTitle, BodyText, Caption)
14
+ * - Semantic HTML defaults (h1, h2, p, etc.)
15
+ * - Tailwind-first with zero abstraction
16
+ * - Full className override control
17
+ * - Appropriate sizing for web apps (not marketing sites)
27
18
  *
28
- * @see {@link https://cva.style/docs} CVA documentation for variant patterns
29
- * @see {@link https://ui.shadcn.com/docs/components/typography} Typography component inspiration
30
- * @since 1.0.0
19
+ * @see {@link https://tailwindcss.com} Tailwind CSS documentation
20
+ * @since 2.0.0
31
21
  */
32
- const typographyVariants = cva("", {
33
- variants: {
34
- variant: {
35
- microcopy: "text-xs",
36
- detail: "text-sm",
37
- body: "text-base leading-snug",
38
- blogBody: "text-lg leading-loose",
39
- paragraphLead: "text-lg",
40
- eyebrow: "text-xl",
41
- subHeadline: "text-2xl",
42
- headline: "text-3xl",
43
- sectionTitle: "text-4xl leading-relaxed",
44
- pageTitle: "text-5xl leading-relaxed",
45
- displayTitle: "text-6xl leading-snug",
46
- heroTitle: "text-7xl leading-snug",
47
- code: "text-base font-mono",
48
- },
49
- /**
50
- * Color variants for different semantic meanings and visual hierarchy
51
- *
52
- * @variant default - Default text color that adapts to light/dark theme (text-foreground)
53
- * @variant muted - Subdued text color for secondary information and descriptions (text-muted-foreground)
54
- * @variant faint - Very subtle text color for minimal visual prominence (text-neynar-faint-foreground)
55
- * @variant accent - Accent color for emphasis, highlights, and interactive elements (text-accent-foreground)
56
- * @variant destructive - Red color for error messages, warnings, and destructive actions (text-destructive)
57
- * @variant success - Green color for success messages, confirmations, and positive states (text-success)
58
- * @variant warning - Orange/yellow color for warnings, cautions, and attention-seeking content (text-warning)
59
- */
60
- color: {
61
- default: "text-foreground",
62
- muted: "text-muted-foreground",
63
- faint: "text-neynar-faint-foreground",
64
- accent: "text-accent-foreground",
65
- destructive: "text-destructive",
66
- success: "text-success",
67
- warning: "text-warning",
68
- },
69
- /**
70
- * Text alignment options for layout control
71
- *
72
- * @variant left - Left-aligned text (default for LTR languages)
73
- * @variant center - Center-aligned text for headings and callouts
74
- * @variant right - Right-aligned text for numerical data and RTL content
75
- * @variant justify - Justified text for formal documents and articles
76
- */
77
- align: {
78
- left: "text-left",
79
- center: "text-center",
80
- right: "text-right",
81
- justify: "text-justify",
82
- },
83
- /**
84
- * Text transformation options for stylistic effects
85
- *
86
- * @variant uppercase - ALL CAPS for emphasis and labels
87
- * @variant lowercase - all lowercase for stylistic consistency
88
- * @variant capitalize - Title Case For Headings And Proper Nouns
89
- */
90
- transform: {
91
- uppercase: "uppercase",
92
- lowercase: "lowercase",
93
- capitalize: "capitalize",
94
- },
95
- /**
96
- * Font weight variations for visual hierarchy
97
- *
98
- * @variant normal - Normal font weight (400) for body text
99
- * @variant medium - Medium font weight (500) for subtle emphasis
100
- * @variant semibold - Semibold font weight (600) for headings and important text
101
- * @variant bold - Bold font weight (700) for strong emphasis
102
- */
103
- weight: {
104
- normal: "font-normal",
105
- medium: "font-medium",
106
- semibold: "font-semibold",
107
- bold: "font-bold",
108
- },
109
- },
110
- defaultVariants: {
111
- variant: "body",
112
- color: "default",
113
- align: "left",
114
- },
115
- });
116
22
 
117
- type TypographyVariant =
118
- | "microcopy"
119
- | "detail"
120
- | "body"
121
- | "blogBody"
122
- | "paragraphLead"
123
- | "eyebrow"
124
- | "subHeadline"
125
- | "headline"
126
- | "sectionTitle"
127
- | "pageTitle"
128
- | "displayTitle"
129
- | "heroTitle"
130
- | "code";
131
-
132
- type TypographyColor =
133
- | "default"
134
- | "muted"
135
- | "faint"
136
- | "accent"
137
- | "destructive"
138
- | "success"
139
- | "warning";
140
-
141
- // eslint-disable-next-line unused-imports/no-unused-vars
142
- type TypographyDocsProps = {
143
- /** Typography variant that determines text size, weight, and line height @default "body" */
144
- variant?: TypographyVariant;
145
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
146
- color?: TypographyColor;
147
- /** Text alignment within the container @default "left" */
148
- align?: "left" | "center" | "right" | "justify";
149
- /** Text transformation for stylistic effects */
150
- transform?: "uppercase" | "lowercase" | "capitalize";
151
- /** Font weight override for visual emphasis */
152
- weight?: "normal" | "medium" | "semibold" | "bold";
153
- /** The HTML element or component to render as @default "p" */
154
- as?: React.ElementType;
155
- /** For label elements, the associated input ID for accessibility */
156
- htmlFor?: string;
157
- /** Whether to render as a Slot component for composition patterns. When true, the component merges its props onto its immediate child instead of rendering its own DOM element @default false */
158
- asChild?: boolean;
159
- /** Whether the text should be rendered in italic style @default false */
160
- italic?: boolean;
161
- /** Whether the text should have underline decoration @default false */
162
- underline?: boolean;
163
- /** Whether the text should have strikethrough decoration @default false */
164
- strikethrough?: boolean;
165
- /** Whether text should be truncated with ellipsis on overflow @default false */
166
- truncate?: boolean;
167
- /** Hide visually but keep accessible to screen readers @default false */
168
- srOnly?: boolean;
23
+ /**
24
+ * Base typography component props
25
+ *
26
+ * All typography components accept these props:
27
+ * - `as` - The HTML element to render (each component has a sensible default)
28
+ * - `className` - Additional Tailwind classes to merge with defaults
29
+ * - `children` - Content to render
30
+ * - All standard HTML attributes for the underlying element
31
+ */
32
+ type TypographyBaseProps<T extends React.ElementType> = {
33
+ /** The HTML element or component to render as */
34
+ as?: T;
169
35
  /** Additional CSS classes for custom styling */
170
36
  className?: string;
171
37
  /** Content to render within the typography element */
172
38
  children?: React.ReactNode;
173
- } & React.HTMLAttributes<HTMLElement>;
39
+ };
40
+
41
+ type TypographyProps<T extends React.ElementType> = TypographyBaseProps<T> &
42
+ Omit<React.ComponentPropsWithoutRef<T>, keyof TypographyBaseProps<T>>;
174
43
 
175
44
  /**
176
- * Base props for all Typography components
45
+ * Props for PageTitle (Documentation only - NOT used in component implementation)
177
46
  */
178
- type TypographyBaseProps = {
179
- /** Typography variant that determines text size, weight, and line height */
180
- variant?: TypographyVariant;
181
- /** Color variant for semantic meaning and visual hierarchy */
182
- color?: TypographyColor;
183
- /** Text alignment within the container */
184
- align?: VariantProps<typeof typographyVariants>["align"];
185
- /** Text transformation for stylistic effects */
186
- transform?: VariantProps<typeof typographyVariants>["transform"];
187
- /** Font weight override for visual emphasis */
188
- weight?: VariantProps<typeof typographyVariants>["weight"];
189
- /** The HTML element or component to render as @default "p" */
47
+ // eslint-disable-next-line unused-imports/no-unused-vars
48
+ type PageTitleDocsProps = {
49
+ /** The HTML element to render @default "h1" */
190
50
  as?: React.ElementType;
191
- /** For label elements, the associated input ID for accessibility */
192
- htmlFor?: string;
193
- /** Whether to render as a Slot component for composition patterns @default false */
194
- asChild?: boolean;
195
- /** Whether the text should be rendered in italic style @default false */
196
- italic?: boolean;
197
- /** Whether the text should have underline decoration @default false */
198
- underline?: boolean;
199
- /** Whether the text should have strikethrough decoration @default false */
200
- strikethrough?: boolean;
201
- /** Whether text should be truncated with ellipsis on overflow @default false */
202
- truncate?: boolean;
203
- /** Hide visually but keep accessible to screen readers @default false */
204
- srOnly?: boolean;
205
- /** Additional CSS classes for custom styling */
51
+ /** Additional Tailwind CSS classes to customize styling */
206
52
  className?: string;
207
- /** Content to render within the typography element */
53
+ /** Content to render within the page title */
208
54
  children?: React.ReactNode;
209
- };
55
+ } & React.HTMLAttributes<HTMLHeadingElement>;
210
56
 
211
57
  /**
212
- * Complete props for the Typography component
58
+ * Props for SectionTitle (Documentation only - NOT used in component implementation)
213
59
  */
214
- type TypographyProps = TypographyBaseProps &
215
- Omit<React.HTMLAttributes<HTMLElement>, keyof TypographyBaseProps>;
60
+ // eslint-disable-next-line unused-imports/no-unused-vars
61
+ type SectionTitleDocsProps = {
62
+ /** The HTML element to render @default "h2" */
63
+ as?: React.ElementType;
64
+ /** Additional Tailwind CSS classes to customize styling */
65
+ className?: string;
66
+ /** Content to render within the section title */
67
+ children?: React.ReactNode;
68
+ } & React.HTMLAttributes<HTMLHeadingElement>;
216
69
 
217
70
  /**
218
- * Typography - Comprehensive text styling component for consistent design system implementation
219
- *
220
- * A flexible typography component that provides semantic text variants, color options, and accessibility features.
221
- * Built with class-variance-authority (CVA) for type-safe variant management and supports both semantic HTML
222
- * elements and composition patterns via Radix UI Slot. Designed to handle all text styling needs across
223
- * the application with consistent visual hierarchy and accessibility compliance.
224
- *
225
- * @example
226
- * ```tsx
227
- * // Basic heading with semantic HTML
228
- * <Typography variant="heading" as="h1">
229
- * Welcome to Neynar
230
- * </Typography>
231
- *
232
- * // Body text with color variant
233
- * <Typography variant="body" color="muted">
234
- * This is secondary body text with reduced visual prominence.
235
- * </Typography>
236
- *
237
- * // Code snippet with proper semantics
238
- * <Typography variant="code" as="code">
239
- * const message = "Hello, world!";
240
- * </Typography>
241
- * ```
242
- *
243
- * @example
244
- * ```tsx
245
- * // Advanced styling with multiple variants
246
- * <Typography
247
- * variant="subheading"
248
- * color="accent"
249
- * align="center"
250
- * weight="semibold"
251
- * italic
252
- * underline
253
- * className="mb-4"
254
- * >
255
- * Styled Subheading with Multiple Variants
256
- * </Typography>
257
- *
258
- * // Truncated text for constrained layouts
259
- * <Typography variant="body" truncate className="max-w-xs">
260
- * This is a very long text that will be truncated with ellipsis when it exceeds the container width
261
- * </Typography>
262
- * ```
263
- *
264
- * @example
265
- * ```tsx
266
- * // Accessibility features
267
- * <Typography variant="details" srOnly>
268
- * Additional context for screen readers only
269
- * </Typography>
270
- *
271
- * // Form label with proper association
272
- * <Typography variant="field" as="label" htmlFor="email-input">
273
- * Email Address
274
- * </Typography>
275
- *
276
- * // Composition with asChild for complex structures
277
- * <Typography variant="body" asChild>
278
- * <a href="/about" className="hover:underline">
279
- * Learn more about our platform
280
- * </a>
281
- * </Typography>
282
- * ```
283
- *
284
- * @accessibility
285
- * - **Semantic HTML**: Uses appropriate HTML elements via `as` prop for proper document structure
286
- * - **Screen Reader Support**: `srOnly` prop provides content accessible only to assistive technologies
287
- * - **Color Contrast**: All color variants meet WCAG 2.1 AA contrast requirements (4.5:1 minimum)
288
- * - **Label Association**: `htmlFor` prop properly associates labels with form controls
289
- * - **Focus Management**: Interactive elements receive proper focus indicators
290
- * - **Text Scaling**: All font sizes scale appropriately with user's browser text size preferences
291
- * - **High Contrast Mode**: Respects system high contrast mode preferences
292
- *
293
- * @performance
294
- * - Uses CVA for efficient class generation and tree-shaking
295
- * - Minimal runtime overhead with compile-time optimizations
296
- * - Cached class combinations for repeated variant usage
297
- *
298
- * @see {@link H1} Semantic H1 heading component
299
- * @see {@link H2} Semantic H2 heading component
300
- * @see {@link P} Semantic paragraph component
301
- * @see {@link Code} Semantic code element component
302
- * @see {@link https://cva.style/docs} Class Variance Authority documentation
303
- * @see {@link https://ui.shadcn.com/docs/components/typography} shadcn/ui Typography reference
304
- * @since 1.0.0
71
+ * Props for SubsectionTitle (Documentation only - NOT used in component implementation)
305
72
  */
306
- function Typography({
307
- className,
308
- variant,
309
- color,
310
- align,
311
- transform,
312
- weight,
313
- as: Element = "p",
314
- asChild = false,
315
- italic = false,
316
- underline = false,
317
- strikethrough = false,
318
- truncate = false,
319
- srOnly = false,
320
- ...props
321
- }: TypographyProps) {
322
- const Comp = asChild ? Slot : Element;
323
-
324
- return (
325
- <Comp
326
- data-slot="typography"
327
- className={cn(
328
- typographyVariants({ variant, color, align, transform, weight }),
329
- {
330
- italic,
331
- underline,
332
- "line-through": strikethrough,
333
- "truncate overflow-hidden text-ellipsis whitespace-nowrap": truncate,
334
- "sr-only": srOnly,
335
- },
336
- className,
337
- )}
338
- {...props}
339
- />
340
- );
341
- }
73
+ // eslint-disable-next-line unused-imports/no-unused-vars
74
+ type SubsectionTitleDocsProps = {
75
+ /** The HTML element to render @default "h3" */
76
+ as?: React.ElementType;
77
+ /** Additional Tailwind CSS classes to customize styling */
78
+ className?: string;
79
+ /** Content to render within the subsection title */
80
+ children?: React.ReactNode;
81
+ } & React.HTMLAttributes<HTMLHeadingElement>;
342
82
 
343
83
  /**
344
- * Individual semantic typography components with pre-configured defaults
345
- *
346
- * These components provide semantic HTML elements with pre-configured typography variants,
347
- * ensuring consistent styling while maintaining proper document structure and accessibility.
348
- * Each component uses the appropriate HTML element and typography variant for its semantic meaning.
84
+ * Props for BodyText (Documentation only - NOT used in component implementation)
349
85
  */
350
-
351
86
  // eslint-disable-next-line unused-imports/no-unused-vars
352
- type H1DocsProps = {
353
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
354
- color?: TypographyColor;
355
- /** Text alignment within the container @default "left" */
356
- align?: "left" | "center" | "right" | "justify";
357
- /** Text transformation for stylistic effects */
358
- transform?: "uppercase" | "lowercase" | "capitalize";
359
- /** Font weight override for visual emphasis */
360
- weight?: "normal" | "medium" | "semibold" | "bold";
361
- /** For label elements, the associated input ID for accessibility */
362
- htmlFor?: string;
363
- /** Whether to render as a Slot component for composition patterns @default false */
364
- asChild?: boolean;
365
- /** Whether the text should be rendered in italic style @default false */
366
- italic?: boolean;
367
- /** Whether the text should have underline decoration @default false */
368
- underline?: boolean;
369
- /** Whether the text should have strikethrough decoration @default false */
370
- strikethrough?: boolean;
371
- /** Whether text should be truncated with ellipsis on overflow @default false */
372
- truncate?: boolean;
373
- /** Hide visually but keep accessible to screen readers @default false */
374
- srOnly?: boolean;
375
- /** Additional CSS classes for custom styling */
87
+ type BodyTextDocsProps = {
88
+ /** The HTML element to render @default "p" */
89
+ as?: React.ElementType;
90
+ /** Additional Tailwind CSS classes to customize styling */
376
91
  className?: string;
377
- /** Content to render within the typography element */
92
+ /** Content to render within the body text */
378
93
  children?: React.ReactNode;
379
- } & React.HTMLAttributes<HTMLHeadingElement>;
380
-
381
- /** Props for H1 heading component */
382
- type H1Props = Omit<TypographyProps, "as">;
94
+ } & React.HTMLAttributes<HTMLParagraphElement>;
383
95
 
384
96
  /**
385
- * H1 - Primary page heading component
386
- *
387
- * The main heading for a page or major section. Uses the "displayTitle" variant with h1 semantic element.
388
- * Should be used once per page for proper document outline and SEO.
389
- *
390
- * @example
391
- * ```tsx
392
- * // Page title
393
- * <H1>Welcome to Neynar Platform</H1>
394
- *
395
- * // With color variant
396
- * <H1 color="muted">Draft: Article Title</H1>
397
- *
398
- * // With custom styling
399
- * <H1 align="center" className="mb-8">
400
- * Centered Page Heading
401
- * </H1>
402
- * ```
403
- *
404
- * @accessibility
405
- * - Creates proper document outline structure
406
- * - Should be the first heading on the page
407
- * - Provides main page topic for screen readers
408
- * - Helps with keyboard navigation landmarks
409
- *
410
- * @see {@link H2} Secondary heading component
411
- * @see {@link Typography} Base typography component
97
+ * Props for BodyTextLarge (Documentation only - NOT used in component implementation)
412
98
  */
413
- function H1({ variant = "displayTitle", weight = "bold", ...props }: H1Props) {
414
- return <Typography variant={variant} weight={weight} as="h1" {...props} />;
415
- }
416
-
417
99
  // eslint-disable-next-line unused-imports/no-unused-vars
418
- type H2DocsProps = {
419
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
420
- color?: TypographyColor;
421
- /** Text alignment within the container @default "left" */
422
- align?: "left" | "center" | "right" | "justify";
423
- /** Text transformation for stylistic effects */
424
- transform?: "uppercase" | "lowercase" | "capitalize";
425
- /** Font weight override for visual emphasis */
426
- weight?: "normal" | "medium" | "semibold" | "bold";
427
- /** For label elements, the associated input ID for accessibility */
428
- htmlFor?: string;
429
- /** Whether to render as a Slot component for composition patterns @default false */
430
- asChild?: boolean;
431
- /** Whether the text should be rendered in italic style @default false */
432
- italic?: boolean;
433
- /** Whether the text should have underline decoration @default false */
434
- underline?: boolean;
435
- /** Whether the text should have strikethrough decoration @default false */
436
- strikethrough?: boolean;
437
- /** Whether text should be truncated with ellipsis on overflow @default false */
438
- truncate?: boolean;
439
- /** Hide visually but keep accessible to screen readers @default false */
440
- srOnly?: boolean;
441
- /** Additional CSS classes for custom styling */
100
+ type BodyTextLargeDocsProps = {
101
+ /** The HTML element to render @default "p" */
102
+ as?: React.ElementType;
103
+ /** Additional Tailwind CSS classes to customize styling */
442
104
  className?: string;
443
- /** Content to render within the typography element */
105
+ /** Content to render within the large body text */
444
106
  children?: React.ReactNode;
445
- } & React.HTMLAttributes<HTMLHeadingElement>;
446
-
447
- /** Props for H2 heading component */
448
- type H2Props = Omit<TypographyProps, "as">;
107
+ } & React.HTMLAttributes<HTMLParagraphElement>;
449
108
 
450
109
  /**
451
- * H2 - Secondary section heading component
452
- *
453
- * Section headings that divide page content into logical groups. Uses the "sectionTitle" variant
454
- * with h2 semantic element. Essential for creating proper document hierarchy.
455
- *
456
- * @example
457
- * ```tsx
458
- * // Section heading
459
- * <H2>Getting Started</H2>
460
- *
461
- * // With accent color
462
- * <H2 color="accent">Featured Content</H2>
463
- *
464
- * // With additional styling
465
- * <H2 weight="bold" className="border-b pb-2">
466
- * Section with Border
467
- * </H2>
468
- * ```
469
- *
470
- * @accessibility
471
- * - Maintains document outline hierarchy
472
- * - Should follow H1 and precede H3 elements
473
- * - Provides section navigation for screen readers
474
- * - Essential for skip navigation functionality
475
- *
476
- * @see {@link H1} Primary heading component
477
- * @see {@link H3} Tertiary heading component
110
+ * Props for BodyTextSmall (Documentation only - NOT used in component implementation)
478
111
  */
479
- function H2({ variant = "sectionTitle", weight = "bold", ...props }: H2Props) {
480
- return <Typography variant={variant} weight={weight} as="h2" {...props} />;
481
- }
482
-
483
112
  // eslint-disable-next-line unused-imports/no-unused-vars
484
- type H3DocsProps = {
485
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
486
- color?: TypographyColor;
487
- /** Text alignment within the container @default "left" */
488
- align?: "left" | "center" | "right" | "justify";
489
- /** Text transformation for stylistic effects */
490
- transform?: "uppercase" | "lowercase" | "capitalize";
491
- /** Font weight override for visual emphasis */
492
- weight?: "normal" | "medium" | "semibold" | "bold";
493
- /** For label elements, the associated input ID for accessibility */
494
- htmlFor?: string;
495
- /** Whether to render as a Slot component for composition patterns @default false */
496
- asChild?: boolean;
497
- /** Whether the text should be rendered in italic style @default false */
498
- italic?: boolean;
499
- /** Whether the text should have underline decoration @default false */
500
- underline?: boolean;
501
- /** Whether the text should have strikethrough decoration @default false */
502
- strikethrough?: boolean;
503
- /** Whether text should be truncated with ellipsis on overflow @default false */
504
- truncate?: boolean;
505
- /** Hide visually but keep accessible to screen readers @default false */
506
- srOnly?: boolean;
507
- /** Additional CSS classes for custom styling */
113
+ type BodyTextSmallDocsProps = {
114
+ /** The HTML element to render @default "p" */
115
+ as?: React.ElementType;
116
+ /** Additional Tailwind CSS classes to customize styling */
508
117
  className?: string;
509
- /** Content to render within the typography element */
118
+ /** Content to render within the small body text */
510
119
  children?: React.ReactNode;
511
- } & React.HTMLAttributes<HTMLHeadingElement>;
512
-
513
- /** Props for H3 heading component */
514
- type H3Props = Omit<TypographyProps, "as">;
120
+ } & React.HTMLAttributes<HTMLParagraphElement>;
515
121
 
516
122
  /**
517
- * H3 - Tertiary subsection heading component
518
- *
519
- * Subsection headings for further content division. Uses the "headline" variant
520
- * with h3 semantic element for consistent visual hierarchy.
521
- *
522
- * @example
523
- * ```tsx
524
- * // Subsection heading
525
- * <H3>Installation Guide</H3>
526
- *
527
- * // In a card or content block
528
- * <H3 color="muted" className="mb-3">
529
- * Optional Configuration
530
- * </H3>
531
- * ```
532
- *
533
- * @accessibility
534
- * - Should follow H2 elements in document flow
535
- * - Helps create detailed content structure
536
- * - Improves navigation with assistive technologies
537
- * - Supports table of contents generation
123
+ * Props for Caption (Documentation only - NOT used in component implementation)
538
124
  */
539
- function H3({ variant = "headline", weight = "bold", ...props }: H3Props) {
540
- return <Typography variant={variant} weight={weight} as="h3" {...props} />;
541
- }
542
-
543
125
  // eslint-disable-next-line unused-imports/no-unused-vars
544
- type H4DocsProps = {
545
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
546
- color?: TypographyColor;
547
- /** Text alignment within the container @default "left" */
548
- align?: "left" | "center" | "right" | "justify";
549
- /** Text transformation for stylistic effects */
550
- transform?: "uppercase" | "lowercase" | "capitalize";
551
- /** Font weight override for visual emphasis */
552
- weight?: "normal" | "medium" | "semibold" | "bold";
553
- /** For label elements, the associated input ID for accessibility */
554
- htmlFor?: string;
555
- /** Whether to render as a Slot component for composition patterns @default false */
556
- asChild?: boolean;
557
- /** Whether the text should be rendered in italic style @default false */
558
- italic?: boolean;
559
- /** Whether the text should have underline decoration @default false */
560
- underline?: boolean;
561
- /** Whether the text should have strikethrough decoration @default false */
562
- strikethrough?: boolean;
563
- /** Whether text should be truncated with ellipsis on overflow @default false */
564
- truncate?: boolean;
565
- /** Hide visually but keep accessible to screen readers @default false */
566
- srOnly?: boolean;
567
- /** Additional CSS classes for custom styling */
126
+ type CaptionDocsProps = {
127
+ /** The HTML element to render @default "span" */
128
+ as?: React.ElementType;
129
+ /** Additional Tailwind CSS classes to customize styling */
568
130
  className?: string;
569
- /** Content to render within the typography element */
131
+ /** Content to render within the caption */
570
132
  children?: React.ReactNode;
571
- } & React.HTMLAttributes<HTMLHeadingElement>;
572
-
573
- /** Props for H4 heading component */
574
- type H4Props = Omit<TypographyProps, "as">;
133
+ } & React.HTMLAttributes<HTMLSpanElement>;
575
134
 
576
135
  /**
577
- * H4 - Minor heading component for detailed sections
578
- *
579
- * Minor headings for detailed content organization. Uses "subHeadline" variant
580
- * with h4 semantic element for subtle but distinct hierarchy.
581
- *
582
- * @example
583
- * ```tsx
584
- * // Minor section heading
585
- * <H4>Configuration Options</H4>
586
- *
587
- * // In detailed documentation
588
- * <H4 color="muted">Advanced Settings</H4>
589
- * ```
590
- *
591
- * @accessibility
592
- * - Maintains proper heading hierarchy flow
593
- * - Provides fine-grained content organization
594
- * - Supports screen reader document navigation
136
+ * Props for Overline (Documentation only - NOT used in component implementation)
595
137
  */
596
- function H4({ variant = "subHeadline", weight = "bold", ...props }: H4Props) {
597
- return <Typography variant={variant} weight={weight} as="h4" {...props} />;
598
- }
599
-
600
138
  // eslint-disable-next-line unused-imports/no-unused-vars
601
- type H5DocsProps = {
602
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
603
- color?: TypographyColor;
604
- /** Text alignment within the container @default "left" */
605
- align?: "left" | "center" | "right" | "justify";
606
- /** Text transformation for stylistic effects */
607
- transform?: "uppercase" | "lowercase" | "capitalize";
608
- /** Font weight override for visual emphasis */
609
- weight?: "normal" | "medium" | "semibold" | "bold";
610
- /** For label elements, the associated input ID for accessibility */
611
- htmlFor?: string;
612
- /** Whether to render as a Slot component for composition patterns @default false */
613
- asChild?: boolean;
614
- /** Whether the text should be rendered in italic style @default false */
615
- italic?: boolean;
616
- /** Whether the text should have underline decoration @default false */
617
- underline?: boolean;
618
- /** Whether the text should have strikethrough decoration @default false */
619
- strikethrough?: boolean;
620
- /** Whether text should be truncated with ellipsis on overflow @default false */
621
- truncate?: boolean;
622
- /** Hide visually but keep accessible to screen readers @default false */
623
- srOnly?: boolean;
624
- /** Additional CSS classes for custom styling */
139
+ type OverlineDocsProps = {
140
+ /** The HTML element to render @default "span" */
141
+ as?: React.ElementType;
142
+ /** Additional Tailwind CSS classes to customize styling */
625
143
  className?: string;
626
- /** Content to render within the typography element */
144
+ /** Content to render within the overline */
627
145
  children?: React.ReactNode;
628
- } & React.HTMLAttributes<HTMLHeadingElement>;
629
-
630
- /** Props for H5 heading component */
631
- type H5Props = Omit<TypographyProps, "as">;
146
+ } & React.HTMLAttributes<HTMLSpanElement>;
632
147
 
633
148
  /**
634
- * H5 - Small heading component for micro-sections
635
- *
636
- * Small headings for very specific content divisions. Uses "eyebrow" variant
637
- * with h5 semantic element.
638
- *
639
- * @example
640
- * ```tsx
641
- * // Small section heading
642
- * <H5>Error Codes</H5>
643
- *
644
- * // In lists or detailed breakdowns
645
- * <H5 weight="semibold">Step 1: Setup</H5>
646
- * ```
149
+ * Props for Code (Documentation only - NOT used in component implementation)
647
150
  */
648
- function H5({ variant = "eyebrow", weight = "bold", ...props }: H5Props) {
649
- return <Typography variant={variant} weight={weight} as="h5" {...props} />;
650
- }
651
-
652
151
  // eslint-disable-next-line unused-imports/no-unused-vars
653
- type H6DocsProps = {
654
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
655
- color?: TypographyColor;
656
- /** Text alignment within the container @default "left" */
657
- align?: "left" | "center" | "right" | "justify";
658
- /** Text transformation for stylistic effects */
659
- transform?: "uppercase" | "lowercase" | "capitalize";
660
- /** Font weight override for visual emphasis */
661
- weight?: "normal" | "medium" | "semibold" | "bold";
662
- /** For label elements, the associated input ID for accessibility */
663
- htmlFor?: string;
664
- /** Whether to render as a Slot component for composition patterns @default false */
665
- asChild?: boolean;
666
- /** Whether the text should be rendered in italic style @default false */
667
- italic?: boolean;
668
- /** Whether the text should have underline decoration @default false */
669
- underline?: boolean;
670
- /** Whether the text should have strikethrough decoration @default false */
671
- strikethrough?: boolean;
672
- /** Whether text should be truncated with ellipsis on overflow @default false */
673
- truncate?: boolean;
674
- /** Hide visually but keep accessible to screen readers @default false */
675
- srOnly?: boolean;
676
- /** Additional CSS classes for custom styling */
152
+ type CodeDocsProps = {
153
+ /** The HTML element to render @default "code" */
154
+ as?: React.ElementType;
155
+ /** Additional Tailwind CSS classes to customize styling */
677
156
  className?: string;
678
- /** Content to render within the typography element */
157
+ /** Content to render within the code element */
679
158
  children?: React.ReactNode;
680
- } & React.HTMLAttributes<HTMLHeadingElement>;
681
-
682
- /** Props for H6 heading component */
683
- type H6Props = Omit<TypographyProps, "as">;
159
+ } & React.HTMLAttributes<HTMLElement>;
684
160
 
685
161
  /**
686
- * H6 - Smallest heading component for minimal emphasis
687
- *
688
- * The smallest semantic heading level. Uses "details" variant with h6 element
689
- * for minimal but semantic emphasis.
690
- *
691
- * @example
692
- * ```tsx
693
- * // Smallest heading
694
- * <H6>Notes and Disclaimers</H6>
695
- *
696
- * // In deeply nested content
697
- * <H6 color="muted">Technical Details</H6>
698
- * ```
162
+ * Props for Blockquote (Documentation only - NOT used in component implementation)
699
163
  */
700
- function H6({ variant = "body", weight = "bold", ...props }: H6Props) {
701
- return <Typography variant={variant} weight={weight} as="h6" {...props} />;
702
- }
703
-
704
164
  // eslint-disable-next-line unused-imports/no-unused-vars
705
- type PDocsProps = {
706
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
707
- color?: TypographyColor;
708
- /** Text alignment within the container @default "left" */
709
- align?: "left" | "center" | "right" | "justify";
710
- /** Text transformation for stylistic effects */
711
- transform?: "uppercase" | "lowercase" | "capitalize";
712
- /** Font weight override for visual emphasis */
713
- weight?: "normal" | "medium" | "semibold" | "bold";
714
- /** For label elements, the associated input ID for accessibility */
715
- htmlFor?: string;
716
- /** Whether to render as a Slot component for composition patterns @default false */
717
- asChild?: boolean;
718
- /** Whether the text should be rendered in italic style @default false */
719
- italic?: boolean;
720
- /** Whether the text should have underline decoration @default false */
721
- underline?: boolean;
722
- /** Whether the text should have strikethrough decoration @default false */
723
- strikethrough?: boolean;
724
- /** Whether text should be truncated with ellipsis on overflow @default false */
725
- truncate?: boolean;
726
- /** Hide visually but keep accessible to screen readers @default false */
727
- srOnly?: boolean;
728
- /** Additional CSS classes for custom styling */
165
+ type BlockquoteDocsProps = {
166
+ /** The HTML element to render @default "blockquote" */
167
+ as?: React.ElementType;
168
+ /** Additional Tailwind CSS classes to customize styling */
729
169
  className?: string;
730
- /** Content to render within the typography element */
170
+ /** Content to render within the blockquote */
731
171
  children?: React.ReactNode;
732
- } & React.HTMLAttributes<HTMLParagraphElement>;
733
-
734
- /** Props for P paragraph component */
735
- type PProps = Omit<TypographyProps, "as">;
172
+ } & React.HTMLAttributes<HTMLQuoteElement>;
736
173
 
737
174
  /**
738
- * P - Paragraph component for body text content
175
+ * PageTitle - Primary page heading component
739
176
  *
740
- * Standard paragraph element for readable body text. Uses "body" variant with p semantic element.
741
- * Optimized for readability with appropriate line height and font size.
177
+ * The main heading for a page, typically used once per page. Uses text-3xl (30px)
178
+ * which is appropriate for web application page titles. Defaults to h1 element.
179
+ *
180
+ * @param as - HTML element to render @default "h1"
181
+ * @param className - Additional Tailwind classes (e.g., "text-4xl text-accent")
182
+ * @param children - Content to render
183
+ * @param ...props - All standard HTMLHeadingElement attributes
742
184
  *
743
185
  * @example
744
186
  * ```tsx
745
- * // Standard paragraph
746
- * <P>This is standard body text that provides information to the user.</P>
187
+ * // Default usage
188
+ * <PageTitle>User Dashboard</PageTitle>
747
189
  *
748
- * // With color variants
749
- * <P color="muted">Secondary information with reduced visual prominence.</P>
190
+ * // With custom styling
191
+ * <PageTitle className="text-4xl text-accent">
192
+ * Custom Styled Title
193
+ * </PageTitle>
750
194
  *
751
- * // With custom spacing
752
- * <P className="mb-6">Paragraph with custom bottom margin for layout control.</P>
195
+ * // As different element
196
+ * <PageTitle as="h2">Section Title as H2</PageTitle>
753
197
  *
754
- * // Truncated paragraph
755
- * <P truncate className="max-w-md">
756
- * Long paragraph content that will be truncated with ellipsis
757
- * </P>
198
+ * // Responsive sizing
199
+ * <PageTitle className="text-2xl md:text-3xl lg:text-4xl">
200
+ * Responsive Title
201
+ * </PageTitle>
758
202
  * ```
759
203
  *
760
204
  * @accessibility
761
- * - Provides proper semantic structure for body content
762
- * - Maintains readable line height for accessibility
763
- * - Supports screen reader text flow and navigation
764
- *
765
- * @see {@link Typography} Base typography component
205
+ * - Should be used once per page for proper document outline
206
+ * - Provides main page topic for screen readers
207
+ * - Helps with keyboard navigation landmarks
766
208
  */
767
- function P(props: PProps) {
768
- return <Typography as="p" {...props} />;
209
+ export function PageTitle<T extends React.ElementType = "h1">({
210
+ className,
211
+ as,
212
+ ...props
213
+ }: TypographyProps<T>) {
214
+ const Component = as || "h1";
215
+ return (
216
+ <Component
217
+ className={cn("text-3xl font-bold leading-tight tracking-wide", className)}
218
+ {...props}
219
+ />
220
+ );
769
221
  }
770
222
 
771
- // eslint-disable-next-line unused-imports/no-unused-vars
772
- type SpanDocsProps = {
773
- /** Typography variant that determines text size, weight, and line height @default "body" */
774
- variant?: TypographyVariant;
775
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
776
- color?: TypographyColor;
777
- /** Text alignment within the container @default "left" */
778
- align?: "left" | "center" | "right" | "justify";
779
- /** Text transformation for stylistic effects */
780
- transform?: "uppercase" | "lowercase" | "capitalize";
781
- /** Font weight override for visual emphasis */
782
- weight?: "normal" | "medium" | "semibold" | "bold";
783
- /** For label elements, the associated input ID for accessibility */
784
- htmlFor?: string;
785
- /** Whether to render as a Slot component for composition patterns @default false */
786
- asChild?: boolean;
787
- /** Whether the text should be rendered in italic style @default false */
788
- italic?: boolean;
789
- /** Whether the text should have underline decoration @default false */
790
- underline?: boolean;
791
- /** Whether the text should have strikethrough decoration @default false */
792
- strikethrough?: boolean;
793
- /** Whether text should be truncated with ellipsis on overflow @default false */
794
- truncate?: boolean;
795
- /** Hide visually but keep accessible to screen readers @default false */
796
- srOnly?: boolean;
797
- /** Additional CSS classes for custom styling */
798
- className?: string;
799
- /** Content to render within the typography element */
800
- children?: React.ReactNode;
801
- } & React.HTMLAttributes<HTMLSpanElement>;
802
-
803
- /** Props for Span inline component */
804
- type SpanProps = Omit<TypographyProps, "as">;
805
-
806
223
  /**
807
- * Span - Inline text component for text fragments and styling
224
+ * SectionTitle - Secondary section heading component
225
+ *
226
+ * Section headings that divide page content into logical groups. Uses text-2xl (24px)
227
+ * for clear hierarchy below PageTitle. Defaults to h2 element.
808
228
  *
809
- * Generic inline element for styling text fragments within other content.
810
- * Supports all typography variants while maintaining inline display behavior.
229
+ * @param as - HTML element to render @default "h2"
230
+ * @param className - Additional Tailwind classes
231
+ * @param children - Content to render
232
+ * @param ...props - All standard HTMLHeadingElement attributes
811
233
  *
812
234
  * @example
813
235
  * ```tsx
814
- * // Inline text styling
815
- * <p>
816
- * Regular text with <Span color="accent" weight="semibold">highlighted</Span> content
817
- * </p>
236
+ * // Default usage
237
+ * <SectionTitle>Recent Activity</SectionTitle>
818
238
  *
819
- * // Small inline details
820
- * <Span variant="details" color="muted">
821
- * Updated 5 minutes ago
822
- * </Span>
239
+ * // With custom color
240
+ * <SectionTitle className="text-accent">
241
+ * Featured Section
242
+ * </SectionTitle>
823
243
  *
824
- * // Inline code reference
825
- * <Span variant="code" className="bg-muted px-1 rounded">
826
- * onClick
827
- * </Span>
244
+ * // As h3 element
245
+ * <SectionTitle as="h3">Subsection Title</SectionTitle>
828
246
  * ```
829
247
  *
830
248
  * @accessibility
831
- * - Maintains inline text flow for screen readers
832
- * - Preserves semantic meaning within larger text blocks
833
- * - Does not interrupt document structure or navigation
249
+ * - Maintains document outline hierarchy
250
+ * - Should follow PageTitle (h1) in document flow
251
+ * - Provides section navigation for screen readers
834
252
  */
835
- function Span(props: SpanProps) {
836
- return <Typography as="span" {...props} />;
253
+ export function SectionTitle<T extends React.ElementType = "h2">({
254
+ className,
255
+ as,
256
+ ...props
257
+ }: TypographyProps<T>) {
258
+ const Component = as || "h2";
259
+ return (
260
+ <Component
261
+ className={cn("text-2xl font-semibold leading-tight tracking-wide", className)}
262
+ {...props}
263
+ />
264
+ );
837
265
  }
838
266
 
839
- // eslint-disable-next-line unused-imports/no-unused-vars
840
- type CodeDocsProps = {
841
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
842
- color?: TypographyColor;
843
- /** Text alignment within the container @default "left" */
844
- align?: "left" | "center" | "right" | "justify";
845
- /** Text transformation for stylistic effects */
846
- transform?: "uppercase" | "lowercase" | "capitalize";
847
- /** Font weight override for visual emphasis */
848
- weight?: "normal" | "medium" | "semibold" | "bold";
849
- /** For label elements, the associated input ID for accessibility */
850
- htmlFor?: string;
851
- /** Whether to render as a Slot component for composition patterns @default false */
852
- asChild?: boolean;
853
- /** Whether the text should be rendered in italic style @default false */
854
- italic?: boolean;
855
- /** Whether the text should have underline decoration @default false */
856
- underline?: boolean;
857
- /** Whether the text should have strikethrough decoration @default false */
858
- strikethrough?: boolean;
859
- /** Whether text should be truncated with ellipsis on overflow @default false */
860
- truncate?: boolean;
861
- /** Hide visually but keep accessible to screen readers @default false */
862
- srOnly?: boolean;
863
- /** Additional CSS classes for custom styling */
864
- className?: string;
865
- /** Content to render within the typography element */
866
- children?: React.ReactNode;
867
- } & React.HTMLAttributes<HTMLElement>;
868
-
869
- /** Props for Code component */
870
- type CodeProps = Omit<TypographyProps, "as" | "variant">;
871
-
872
267
  /**
873
- * Code - Inline code component for technical content
268
+ * SubsectionTitle - Tertiary subsection heading component
269
+ *
270
+ * Subsection headings for further content division. Uses text-xl (20px) for
271
+ * subtle distinction from SectionTitle. Defaults to h3 element.
874
272
  *
875
- * Semantic code element for inline code snippets, variable names, and technical references.
876
- * Uses monospace font and "code" variant for clear distinction from regular text.
273
+ * @param as - HTML element to render @default "h3"
274
+ * @param className - Additional Tailwind classes
275
+ * @param children - Content to render
276
+ * @param ...props - All standard HTMLHeadingElement attributes
877
277
  *
878
278
  * @example
879
279
  * ```tsx
880
- * // Inline code snippet
881
- * <Code>const message = "Hello, world!";</Code>
882
- *
883
- * // Terminal command
884
- * <Code color="muted">npm install @neynar/react</Code>
280
+ * // Default usage
281
+ * <SubsectionTitle>Configuration Options</SubsectionTitle>
885
282
  *
886
- * // Variable reference
887
- * <p>Set the <Code>API_KEY</Code> environment variable.</p>
888
- *
889
- * // With background styling
890
- * <Code className="bg-muted px-2 py-1 rounded">
891
- * function handleClick()
892
- * </Code>
283
+ * // With custom styling
284
+ * <SubsectionTitle className="text-muted-foreground">
285
+ * Optional Settings
286
+ * </SubsectionTitle>
893
287
  * ```
894
288
  *
895
289
  * @accessibility
896
- * - Uses semantic code element for proper meaning
897
- * - Monospace font aids in code readability
898
- * - Screen readers understand this as technical content
899
- * - Maintains proper inline behavior within text
900
- *
901
- * @see {@link Typography} Base typography component for multi-line code blocks
290
+ * - Should follow SectionTitle (h2) in document flow
291
+ * - Helps create detailed content structure
292
+ * - Supports screen reader document navigation
902
293
  */
903
- function Code(props: CodeProps) {
904
- return <Typography variant="code" as="code" {...props} />;
294
+ export function SubsectionTitle<T extends React.ElementType = "h3">({
295
+ className,
296
+ as,
297
+ ...props
298
+ }: TypographyProps<T>) {
299
+ const Component = as || "h3";
300
+ return (
301
+ <Component
302
+ className={cn("text-xl font-semibold leading-snug tracking-wide", className)}
303
+ {...props}
304
+ />
305
+ );
905
306
  }
906
307
 
907
- // eslint-disable-next-line unused-imports/no-unused-vars
908
- type SmallDocsProps = {
909
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
910
- color?: TypographyColor;
911
- /** Text alignment within the container @default "left" */
912
- align?: "left" | "center" | "right" | "justify";
913
- /** Text transformation for stylistic effects */
914
- transform?: "uppercase" | "lowercase" | "capitalize";
915
- /** Font weight override for visual emphasis */
916
- weight?: "normal" | "medium" | "semibold" | "bold";
917
- /** For label elements, the associated input ID for accessibility */
918
- htmlFor?: string;
919
- /** Whether to render as a Slot component for composition patterns @default false */
920
- asChild?: boolean;
921
- /** Whether the text should be rendered in italic style @default false */
922
- italic?: boolean;
923
- /** Whether the text should have underline decoration @default false */
924
- underline?: boolean;
925
- /** Whether the text should have strikethrough decoration @default false */
926
- strikethrough?: boolean;
927
- /** Whether text should be truncated with ellipsis on overflow @default false */
928
- truncate?: boolean;
929
- /** Hide visually but keep accessible to screen readers @default false */
930
- srOnly?: boolean;
931
- /** Additional CSS classes for custom styling */
932
- className?: string;
933
- /** Content to render within the typography element */
934
- children?: React.ReactNode;
935
- } & React.HTMLAttributes<HTMLElement>;
936
-
937
- /** Props for Small component */
938
- type SmallProps = Omit<TypographyProps, "as">;
939
-
940
308
  /**
941
- * Small - Fine print component for supplementary information
309
+ * BodyText - Primary paragraph text component
310
+ *
311
+ * Standard paragraph element for readable body text. Uses text-base (16px) with
312
+ * relaxed line height for optimal readability. Defaults to p element.
942
313
  *
943
- * Semantic small element for fine print, disclaimers, timestamps, and supplementary information.
944
- * Uses "microcopy" variant for reduced visual prominence while maintaining readability.
314
+ * @param as - HTML element to render @default "p"
315
+ * @param className - Additional Tailwind classes
316
+ * @param children - Content to render
317
+ * @param ...props - All standard HTMLParagraphElement attributes
945
318
  *
946
319
  * @example
947
320
  * ```tsx
948
- * // Legal disclaimer
949
- * <Small>Terms and conditions apply. See details for more information.</Small>
950
- *
951
- * // Timestamp or metadata
952
- * <Small color="muted">Last updated 2 minutes ago</Small>
953
- *
954
- * // Copyright notice
955
- * <Small className="text-center">
956
- * © 2024 Neynar. All rights reserved.
957
- * </Small>
321
+ * // Default usage
322
+ * <BodyText>
323
+ * This is standard body text that provides information to the user.
324
+ * </BodyText>
958
325
  *
959
- * // Form help text
960
- * <Small color="muted">Password must be at least 8 characters long.</Small>
326
+ * // With custom styling
327
+ * <BodyText className="text-muted-foreground">
328
+ * Secondary information with reduced visual prominence.
329
+ * </BodyText>
330
+ *
331
+ * // As different element
332
+ * <BodyText as="div">
333
+ * Body text in a div container.
334
+ * </BodyText>
961
335
  * ```
962
336
  *
963
337
  * @accessibility
964
- * - Uses semantic small element for proper meaning
965
- * - Indicates fine print or less important information
966
- * - Maintains sufficient contrast for readability
967
- * - Works well with form help text and descriptions
338
+ * - Provides proper semantic structure for body content
339
+ * - Maintains readable line height for accessibility
340
+ * - Supports screen reader text flow and navigation
968
341
  */
969
- function Small({ variant = "detail", ...props }: SmallProps) {
970
- return <Typography variant={variant} as="small" {...props} />;
342
+ export function BodyText<T extends React.ElementType = "p">({
343
+ className,
344
+ as,
345
+ ...props
346
+ }: TypographyProps<T>) {
347
+ const Component = as || "p";
348
+ return (
349
+ <Component
350
+ className={cn("text-base leading-relaxed tracking-wide", className)}
351
+ {...props}
352
+ />
353
+ );
971
354
  }
972
355
 
973
- // eslint-disable-next-line unused-imports/no-unused-vars
974
- type StrongDocsProps = {
975
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
976
- color?: TypographyColor;
977
- /** Text alignment within the container @default "left" */
978
- align?: "left" | "center" | "right" | "justify";
979
- /** Text transformation for stylistic effects */
980
- transform?: "uppercase" | "lowercase" | "capitalize";
981
- /** Font weight override for visual emphasis */
982
- weight?: "normal" | "medium" | "semibold" | "bold";
983
- /** For label elements, the associated input ID for accessibility */
984
- htmlFor?: string;
985
- /** Whether to render as a Slot component for composition patterns @default false */
986
- asChild?: boolean;
987
- /** Whether the text should be rendered in italic style @default false */
988
- italic?: boolean;
989
- /** Whether the text should have underline decoration @default false */
990
- underline?: boolean;
991
- /** Whether the text should have strikethrough decoration @default false */
992
- strikethrough?: boolean;
993
- /** Whether text should be truncated with ellipsis on overflow @default false */
994
- truncate?: boolean;
995
- /** Hide visually but keep accessible to screen readers @default false */
996
- srOnly?: boolean;
997
- /** Additional CSS classes for custom styling */
998
- className?: string;
999
- /** Content to render within the typography element */
1000
- children?: React.ReactNode;
1001
- } & React.HTMLAttributes<HTMLElement>;
1002
-
1003
- /** Props for Strong component */
1004
- type StrongProps = Omit<TypographyProps, "as">;
1005
-
1006
356
  /**
1007
- * Strong - Emphasized text component for important content
357
+ * BodyTextLarge - Emphasized body text component
358
+ *
359
+ * Larger body text for lead paragraphs and emphasized content. Uses text-lg (18px)
360
+ * with relaxed line height. Defaults to p element.
1008
361
  *
1009
- * Semantic strong element for text that needs strong emphasis or importance.
1010
- * Uses "bodyEmphasized" variant with strong semantic meaning.
362
+ * @param as - HTML element to render @default "p"
363
+ * @param className - Additional Tailwind classes
364
+ * @param children - Content to render
365
+ * @param ...props - All standard HTMLParagraphElement attributes
1011
366
  *
1012
367
  * @example
1013
368
  * ```tsx
1014
- * // Important information
1015
- * <Strong>Important: This action cannot be undone.</Strong>
369
+ * // Lead paragraph
370
+ * <BodyTextLarge>
371
+ * This is a lead paragraph that introduces the main content.
372
+ * </BodyTextLarge>
373
+ *
374
+ * // Emphasized content
375
+ * <BodyTextLarge className="font-medium text-accent">
376
+ * Important announcement text.
377
+ * </BodyTextLarge>
378
+ * ```
379
+ */
380
+ export function BodyTextLarge<T extends React.ElementType = "p">({
381
+ className,
382
+ as,
383
+ ...props
384
+ }: TypographyProps<T>) {
385
+ const Component = as || "p";
386
+ return (
387
+ <Component
388
+ className={cn("text-lg leading-relaxed tracking-wide", className)}
389
+ {...props}
390
+ />
391
+ );
392
+ }
393
+
394
+ /**
395
+ * BodyTextSmall - De-emphasized body text component
1016
396
  *
1017
- * // Critical warning
1018
- * <Strong color="destructive">Error: Invalid credentials provided.</Strong>
397
+ * Smaller body text for less prominent content. Uses text-sm (14px) with
398
+ * normal line height. Defaults to p element.
1019
399
  *
1020
- * // In body text
1021
- * <p>
1022
- * Make sure to <Strong>save your changes</Strong> before leaving the page.
1023
- * </p>
400
+ * @param as - HTML element to render @default "p"
401
+ * @param className - Additional Tailwind classes
402
+ * @param children - Content to render
403
+ * @param ...props - All standard HTMLParagraphElement attributes
1024
404
  *
1025
- * // Success message
1026
- * <Strong color="success">Account created successfully!</Strong>
405
+ * @example
406
+ * ```tsx
407
+ * // Small body text
408
+ * <BodyTextSmall>
409
+ * This is smaller, less prominent body text.
410
+ * </BodyTextSmall>
411
+ *
412
+ * // Helper text
413
+ * <BodyTextSmall className="text-muted-foreground">
414
+ * Additional context or helper information.
415
+ * </BodyTextSmall>
1027
416
  * ```
1028
- *
1029
- * @accessibility
1030
- * - Uses semantic strong element for emphasis
1031
- * - Screen readers understand this as important content
1032
- * - Provides semantic meaning beyond visual styling
1033
- * - Maintains proper emphasis hierarchy in content
1034
417
  */
1035
- function Strong(props: StrongProps) {
1036
- return <Typography weight="bold" as="strong" {...props} />;
418
+ export function BodyTextSmall<T extends React.ElementType = "p">({
419
+ className,
420
+ as,
421
+ ...props
422
+ }: TypographyProps<T>) {
423
+ const Component = as || "p";
424
+ return (
425
+ <Component
426
+ className={cn("text-sm leading-normal tracking-wide", className)}
427
+ {...props}
428
+ />
429
+ );
1037
430
  }
1038
431
 
1039
- // eslint-disable-next-line unused-imports/no-unused-vars
1040
- type LeadDocsProps = {
1041
- /** Color variant for semantic meaning and visual hierarchy @default "muted" */
1042
- color?: TypographyColor;
1043
- /** Text alignment within the container @default "left" */
1044
- align?: "left" | "center" | "right" | "justify";
1045
- /** Text transformation for stylistic effects */
1046
- transform?: "uppercase" | "lowercase" | "capitalize";
1047
- /** Font weight override for visual emphasis */
1048
- weight?: "normal" | "medium" | "semibold" | "bold";
1049
- /** For label elements, the associated input ID for accessibility */
1050
- htmlFor?: string;
1051
- /** Whether to render as a Slot component for composition patterns @default false */
1052
- asChild?: boolean;
1053
- /** Whether the text should be rendered in italic style @default false */
1054
- italic?: boolean;
1055
- /** Whether the text should have underline decoration @default false */
1056
- underline?: boolean;
1057
- /** Whether the text should have strikethrough decoration @default false */
1058
- strikethrough?: boolean;
1059
- /** Whether text should be truncated with ellipsis on overflow @default false */
1060
- truncate?: boolean;
1061
- /** Hide visually but keep accessible to screen readers @default false */
1062
- srOnly?: boolean;
1063
- /** Additional CSS classes for custom styling */
1064
- className?: string;
1065
- /** Content to render within the typography element */
1066
- children?: React.ReactNode;
1067
- } & React.HTMLAttributes<HTMLParagraphElement>;
1068
-
1069
- /** Props for Lead component */
1070
- type LeadProps = Omit<TypographyProps, "as">;
1071
-
1072
432
  /**
1073
- * Lead - Introductory paragraph component for article openings
433
+ * Caption - Small supplementary text component
434
+ *
435
+ * Small text for metadata, timestamps, and supplementary information. Uses text-sm (14px)
436
+ * with muted color. Defaults to span element for inline usage.
1074
437
  *
1075
- * Lead paragraph for article introductions, page descriptions, and summary content.
1076
- * Uses "subheading" variant with muted color for visual hierarchy.
438
+ * @param as - HTML element to render @default "span"
439
+ * @param className - Additional Tailwind classes
440
+ * @param children - Content to render
441
+ * @param ...props - All standard HTMLSpanElement attributes
1077
442
  *
1078
443
  * @example
1079
444
  * ```tsx
1080
- * // Article introduction
1081
- * <Lead>
1082
- * This comprehensive guide covers everything you need to know about
1083
- * building modern web applications with React and TypeScript.
1084
- * </Lead>
445
+ * // Timestamp
446
+ * <Caption>Last updated 2 minutes ago</Caption>
1085
447
  *
1086
- * // Page description
1087
- * <Lead className="mb-8">
1088
- * Discover powerful APIs and tools to build the next generation
1089
- * of social applications on Farcaster.
1090
- * </Lead>
448
+ * // Image caption
449
+ * <Caption>Figure 1: System architecture diagram</Caption>
1091
450
  *
1092
- * // With custom color
1093
- * <Lead color="default">
1094
- * This lead paragraph uses the default text color for more prominence.
1095
- * </Lead>
451
+ * // Metadata
452
+ * <Caption className="block mt-2">
453
+ * Created by John Doe on Jan 15, 2025
454
+ * </Caption>
1096
455
  * ```
1097
456
  *
1098
457
  * @accessibility
1099
- * - Provides clear content hierarchy for screen readers
1100
- * - Larger text size improves readability for introductory content
1101
- * - Maintains proper document flow and structure
458
+ * - Maintains inline text flow for screen readers
459
+ * - Sufficient contrast with muted color
460
+ * - Works well for supplementary information
1102
461
  */
1103
- function Lead({
1104
- variant = "paragraphLead",
1105
- color = "muted",
462
+ export function Caption<T extends React.ElementType = "span">({
463
+ className,
464
+ as,
1106
465
  ...props
1107
- }: LeadProps) {
1108
- return <Typography variant={variant} as="p" color={color} {...props} />;
466
+ }: TypographyProps<T>) {
467
+ const Component = as || "span";
468
+ return (
469
+ <Component
470
+ className={cn("text-sm text-muted-foreground leading-normal tracking-wide", className)}
471
+ {...props}
472
+ />
473
+ );
1109
474
  }
1110
475
 
1111
- // eslint-disable-next-line unused-imports/no-unused-vars
1112
- type ADocsProps = {
1113
- /** Typography variant that determines text size, weight, and line height @default "body" */
1114
- variant?: TypographyVariant;
1115
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
1116
- color?: TypographyColor;
1117
- /** Text alignment within the container @default "left" */
1118
- align?: "left" | "center" | "right" | "justify";
1119
- /** Text transformation for stylistic effects */
1120
- transform?: "uppercase" | "lowercase" | "capitalize";
1121
- /** Font weight override for visual emphasis */
1122
- weight?: "normal" | "medium" | "semibold" | "bold";
1123
- /** For label elements, the associated input ID for accessibility */
1124
- htmlFor?: string;
1125
- /** Whether to render as a Slot component for composition patterns @default false */
1126
- asChild?: boolean;
1127
- /** Whether the text should be rendered in italic style @default false */
1128
- italic?: boolean;
1129
- /** Whether the text should have underline decoration @default false */
1130
- underline?: boolean;
1131
- /** Whether the text should have strikethrough decoration @default false */
1132
- strikethrough?: boolean;
1133
- /** Whether text should be truncated with ellipsis on overflow @default false */
1134
- truncate?: boolean;
1135
- /** Hide visually but keep accessible to screen readers @default false */
1136
- srOnly?: boolean;
1137
- /** Link destination URL */
1138
- href?: string;
1139
- /** Additional CSS classes for custom styling */
1140
- className?: string;
1141
- /** Content to render within the typography element */
1142
- children?: React.ReactNode;
1143
- } & React.AnchorHTMLAttributes<HTMLAnchorElement>;
1144
-
1145
- /** Props for A anchor component */
1146
- type AProps = Omit<TypographyProps, "as"> & {
1147
- /** Link destination URL */
1148
- href?: string;
1149
- } & React.AnchorHTMLAttributes<HTMLAnchorElement>;
1150
476
 
1151
477
  /**
1152
- * A - Anchor component for interactive text links
478
+ * Overline - Small uppercase label component
479
+ *
480
+ * Small uppercase text for category tags and eyebrow labels. Uses text-xs (12px)
481
+ * with uppercase transformation and wide tracking. Defaults to span element.
1153
482
  *
1154
- * Semantic anchor element for links with built-in hover states and accessibility features.
1155
- * Uses "body" variant with underline and smooth color transitions.
483
+ * @param as - HTML element to render @default "span"
484
+ * @param className - Additional Tailwind classes
485
+ * @param children - Content to render
486
+ * @param ...props - All standard HTMLSpanElement attributes
1156
487
  *
1157
488
  * @example
1158
489
  * ```tsx
1159
- * // External link
1160
- * <A href="https://neynar.com" target="_blank" rel="noopener noreferrer">
1161
- * Visit Neynar Website
1162
- * </A>
490
+ * // Category label
491
+ * <Overline>Featured</Overline>
492
+ *
493
+ * // Section eyebrow
494
+ * <Overline className="text-accent-foreground">
495
+ * New Feature
496
+ * </Overline>
497
+ *
498
+ * // Tag
499
+ * <Overline className="bg-accent px-2 py-1 rounded">
500
+ * Beta
501
+ * </Overline>
502
+ * ```
503
+ */
504
+ export function Overline<T extends React.ElementType = "span">({
505
+ className,
506
+ as,
507
+ ...props
508
+ }: TypographyProps<T>) {
509
+ const Component = as || "span";
510
+ return (
511
+ <Component
512
+ className={cn("text-xs font-medium uppercase tracking-wider", className)}
513
+ {...props}
514
+ />
515
+ );
516
+ }
517
+
518
+ /**
519
+ * Code - Inline code component
520
+ *
521
+ * Monospace text for inline code snippets and technical references. Uses text-sm
522
+ * with monospace font and subtle background. Defaults to code element.
523
+ *
524
+ * @param as - HTML element to render @default "code"
525
+ * @param className - Additional Tailwind classes
526
+ * @param children - Content to render
527
+ * @param ...props - All standard HTMLElement attributes
1163
528
  *
1164
- * // Internal navigation
1165
- * <A href="/dashboard" color="accent">
1166
- * Go to Dashboard
1167
- * </A>
529
+ * @example
530
+ * ```tsx
531
+ * // Inline code
532
+ * <Code>const message = "Hello, world!";</Code>
1168
533
  *
1169
- * // Composition with Next.js Link
1170
- * <A asChild>
1171
- * <Link href="/about">
1172
- * Learn More About Us
1173
- * </Link>
1174
- * </A>
534
+ * // Variable reference
535
+ * <p>Set the <Code>API_KEY</Code> environment variable.</p>
1175
536
  *
1176
- * // In paragraph text
1177
- * <P>
1178
- * For more information, <A href="/docs">check our documentation</A> or
1179
- * contact support.
1180
- * </P>
537
+ * // Terminal command
538
+ * <Code className="bg-accent">npm install @neynar/ui</Code>
1181
539
  * ```
1182
540
  *
1183
541
  * @accessibility
1184
- * - Uses semantic anchor element for proper link behavior
1185
- * - Includes hover and focus states for interaction feedback
1186
- * - Supports keyboard navigation (Enter key activation)
1187
- * - Maintains color contrast requirements for links
1188
- * - Works with screen reader link navigation modes
1189
- * - Supports external link indicators when needed
1190
- *
1191
- * @see {@link Typography} Base typography component with asChild
542
+ * - Uses semantic code element for proper meaning
543
+ * - Monospace font aids in code readability
544
+ * - Screen readers understand this as technical content
1192
545
  */
1193
- function A({ href, asChild = false, className, ...props }: AProps) {
546
+ export function Code<T extends React.ElementType = "code">({
547
+ className,
548
+ as,
549
+ ...props
550
+ }: TypographyProps<T>) {
551
+ const Component = as || "code";
1194
552
  return (
1195
- <Typography
1196
- as={asChild ? undefined : "a"}
1197
- asChild={asChild}
1198
- className={cn(
1199
- "underline underline-offset-2 hover:text-primary transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
1200
- className,
1201
- )}
1202
- {...(href ? { href } : {})}
553
+ <Component
554
+ className={cn("font-mono text-sm bg-muted px-1 rounded", className)}
1203
555
  {...props}
1204
556
  />
1205
557
  );
1206
558
  }
1207
559
 
1208
- // eslint-disable-next-line unused-imports/no-unused-vars
1209
- type BlockquoteDocsProps = {
1210
- /** Color variant for semantic meaning and visual hierarchy @default "default" */
1211
- color?: TypographyColor;
1212
- /** Text alignment within the container @default "left" */
1213
- align?: "left" | "center" | "right" | "justify";
1214
- /** Text transformation for stylistic effects */
1215
- transform?: "uppercase" | "lowercase" | "capitalize";
1216
- /** Font weight override for visual emphasis */
1217
- weight?: "normal" | "medium" | "semibold" | "bold";
1218
- /** For label elements, the associated input ID for accessibility */
1219
- htmlFor?: string;
1220
- /** Whether to render as a Slot component for composition patterns @default false */
1221
- asChild?: boolean;
1222
- /** Whether the text should be rendered in italic style @default false */
1223
- italic?: boolean;
1224
- /** Whether the text should have underline decoration @default false */
1225
- underline?: boolean;
1226
- /** Whether the text should have strikethrough decoration @default false */
1227
- strikethrough?: boolean;
1228
- /** Whether text should be truncated with ellipsis on overflow @default false */
1229
- truncate?: boolean;
1230
- /** Hide visually but keep accessible to screen readers @default false */
1231
- srOnly?: boolean;
1232
- /** Additional CSS classes for custom styling */
1233
- className?: string;
1234
- /** Content to render within the typography element */
1235
- children?: React.ReactNode;
1236
- } & React.HTMLAttributes<HTMLQuoteElement>;
1237
-
1238
- /** Props for Blockquote component */
1239
- type BlockquoteProps = Omit<TypographyProps, "as">;
1240
-
1241
560
  /**
1242
- * Blockquote - Quoted text component for citations and excerpts
561
+ * Blockquote - Quoted text component
562
+ *
563
+ * Semantic blockquote element for extended quotations and excerpts. Features
564
+ * italic styling and left border for visual distinction. Defaults to blockquote element.
1243
565
  *
1244
- * Semantic blockquote element for extended quotations, testimonials, and excerpts.
1245
- * Features italic styling and left border for visual distinction.
566
+ * @param as - HTML element to render @default "blockquote"
567
+ * @param className - Additional Tailwind classes
568
+ * @param children - Content to render
569
+ * @param ...props - All standard HTMLQuoteElement attributes
1246
570
  *
1247
571
  * @example
1248
572
  * ```tsx
@@ -1253,17 +577,15 @@ type BlockquoteProps = Omit<TypographyProps, "as">;
1253
577
  *
1254
578
  * // With attribution
1255
579
  * <div>
1256
- * <Blockquote className="mb-2">
1257
- * "Building great products requires deep understanding of user needs
1258
- * and technical excellence in equal measure."
580
+ * <Blockquote>
581
+ * "Building great products requires deep understanding of user needs."
1259
582
  * </Blockquote>
1260
- * <Small>— Product Engineering Team</Small>
583
+ * <Caption className="mt-2">— Product Team</Caption>
1261
584
  * </div>
1262
585
  *
1263
- * // Customer testimonial
1264
- * <Blockquote color="muted" className="bg-muted/50 p-4 rounded-lg">
1265
- * "Neynar's APIs have transformed how we build social features.
1266
- * The developer experience is exceptional."
586
+ * // Custom styling
587
+ * <Blockquote className="bg-muted/50 p-4 rounded-lg">
588
+ * Customer testimonial or feedback.
1267
589
  * </Blockquote>
1268
590
  * ```
1269
591
  *
@@ -1271,59 +593,17 @@ type BlockquoteProps = Omit<TypographyProps, "as">;
1271
593
  * - Uses semantic blockquote element for proper quotation meaning
1272
594
  * - Screen readers understand this as quoted content
1273
595
  * - Maintains proper text flow and readability
1274
- * - Supports citation attribution when paired with cite element
1275
- *
1276
- * @see {@link Small} For attribution text
1277
- * @see {@link Typography} Base typography component
1278
596
  */
1279
- function Blockquote({ className, ...props }: BlockquoteProps) {
597
+ export function Blockquote<T extends React.ElementType = "blockquote">({
598
+ className,
599
+ as,
600
+ ...props
601
+ }: TypographyProps<T>) {
602
+ const Component = as || "blockquote";
1280
603
  return (
1281
- <Typography
1282
- as="blockquote"
1283
- italic
1284
- className={cn("border-l-4 border-border pl-4 my-2", className)}
604
+ <Component
605
+ className={cn("border-l-4 border-border pl-4 italic tracking-wide", className)}
1285
606
  {...props}
1286
607
  />
1287
608
  );
1288
609
  }
1289
-
1290
- export {
1291
- Typography,
1292
- H1,
1293
- H2,
1294
- H3,
1295
- H4,
1296
- H5,
1297
- H6,
1298
- P,
1299
- Span,
1300
- Code,
1301
- Small,
1302
- Strong,
1303
- Lead,
1304
- A,
1305
- Blockquote,
1306
- };
1307
-
1308
- export type {
1309
- TypographyProps,
1310
- H1Props,
1311
- H2Props,
1312
- H3Props,
1313
- H4Props,
1314
- H5Props,
1315
- H6Props,
1316
- PProps,
1317
- SpanProps,
1318
- CodeProps,
1319
- SmallProps,
1320
- StrongProps,
1321
- LeadProps,
1322
- AProps,
1323
- BlockquoteProps,
1324
- };
1325
-
1326
- /**
1327
- * Type export for CVA variant props
1328
- */
1329
- export type { VariantProps as TypographyVariantProps } from "class-variance-authority";