@eluan/core 0.5.1 → 0.6.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 (322) hide show
  1. package/README.md +33 -1
  2. package/dist/{action-popover-D6K9aVFk.cjs → action-popover-DrHKPGqw.cjs} +1 -1
  3. package/dist/{action-popover-BVJQBuky.js → action-popover-NkXDAHJT.js} +1 -1
  4. package/dist/action-popover.cjs +1 -1
  5. package/dist/action-popover.js +1 -1
  6. package/dist/{avatar-Co-k8KqV.cjs → avatar-B-t3ctR4.cjs} +1 -1
  7. package/dist/{avatar-CS5f1irF.js → avatar-kDEa0rjF.js} +1 -1
  8. package/dist/avatar.cjs +1 -1
  9. package/dist/avatar.js +1 -1
  10. package/dist/{badge-D9NYZFWH.js → badge-BLZ8V-KC.js} +10 -10
  11. package/dist/{badge-DXKWztL-.cjs → badge-D1A0Tc79.cjs} +1 -1
  12. package/dist/badge.cjs +1 -1
  13. package/dist/badge.js +1 -1
  14. package/dist/{banner-COlEFRuK.cjs → banner-CNdwDPqA.cjs} +1 -1
  15. package/dist/{banner-CyYFLZXw.js → banner-DzSp5WfQ.js} +9 -9
  16. package/dist/banner.cjs +1 -1
  17. package/dist/banner.js +1 -1
  18. package/dist/box-DG-tkaYi.cjs +1 -0
  19. package/dist/box-DKbNgGGG.js +17 -0
  20. package/dist/box.cjs +1 -0
  21. package/dist/box.d.ts +1 -0
  22. package/dist/box.js +5 -0
  23. package/dist/{breadcrumb-NWXeCH5q.cjs → breadcrumb-BuxXkm6O.cjs} +1 -1
  24. package/dist/{breadcrumb-Cm1nb9Xj.js → breadcrumb-C6qj-tDx.js} +1 -1
  25. package/dist/breadcrumb.cjs +1 -1
  26. package/dist/breadcrumb.js +1 -1
  27. package/dist/button--_WI-fM6.cjs +1 -0
  28. package/dist/{button-ANAPDrvs.js → button-DNSNShUc.js} +28 -26
  29. package/dist/button.cjs +1 -1
  30. package/dist/button.js +1 -1
  31. package/dist/{calendar-BpBsomy5.js → calendar-BA2tSwZD.js} +6 -6
  32. package/dist/{calendar-7LX5YGGT.cjs → calendar-DS5821-k.cjs} +3 -3
  33. package/dist/calendar.cjs +1 -1
  34. package/dist/calendar.js +1 -1
  35. package/dist/{card-C88--zB4.cjs → card-BNdR5aDa.cjs} +1 -1
  36. package/dist/{card-BC_4C3ns.js → card-BSgN7WSe.js} +1 -1
  37. package/dist/card.cjs +1 -1
  38. package/dist/card.js +1 -1
  39. package/dist/{carousel-BfL7oy_q.cjs → carousel-4AERgboz.cjs} +1 -1
  40. package/dist/{carousel-DuP0hvF-.js → carousel-Bb7jpzep.js} +1 -1
  41. package/dist/carousel.cjs +1 -1
  42. package/dist/carousel.js +1 -1
  43. package/dist/{checkbox-Bi0Kmuut.js → checkbox-CGUTGery.js} +1 -1
  44. package/dist/{checkbox-M8DmWKiC.cjs → checkbox-Cq9sHU_S.cjs} +1 -1
  45. package/dist/{checkbox-group-KBwPhjmW.cjs → checkbox-group-DGXZ4o2-.cjs} +1 -1
  46. package/dist/{checkbox-group-CQMEJnhD.js → checkbox-group-Tkio3IhK.js} +1 -1
  47. package/dist/checkbox-group.cjs +1 -1
  48. package/dist/checkbox-group.js +1 -1
  49. package/dist/checkbox.cjs +1 -1
  50. package/dist/checkbox.js +1 -1
  51. package/dist/{command-BCl0seLL.cjs → command-D02vvta9.cjs} +1 -1
  52. package/dist/{command-Chs5VlBL.js → command-sUMAxm8S.js} +1 -1
  53. package/dist/command.cjs +1 -1
  54. package/dist/command.js +1 -1
  55. package/dist/components/box.d.ts +12 -0
  56. package/dist/components/grid.d.ts +35 -0
  57. package/dist/components/icon.d.ts +26 -0
  58. package/dist/components/layout-shared.d.ts +307 -0
  59. package/dist/components/navigation-drawer.d.ts +25 -5
  60. package/dist/components/row.d.ts +18 -0
  61. package/dist/components/stack.d.ts +14 -0
  62. package/dist/components/tone-shared.d.ts +39 -0
  63. package/dist/components/typography.d.ts +22 -2
  64. package/dist/components/visually-hidden.d.ts +11 -0
  65. package/dist/{credit-card-input-DN-8vaFj.js → credit-card-input-9VPlzvDm.js} +1 -1
  66. package/dist/{credit-card-input-CUqA9CX3.cjs → credit-card-input-DppPJBne.cjs} +1 -1
  67. package/dist/credit-card-input.cjs +1 -1
  68. package/dist/credit-card-input.js +1 -1
  69. package/dist/{date-picker-ni8td8Ru.js → date-picker-M5hLx_1s.js} +2 -2
  70. package/dist/{date-picker-DGBsfZXx.cjs → date-picker-hE7cDg2B.cjs} +1 -1
  71. package/dist/date-picker.cjs +1 -1
  72. package/dist/date-picker.js +1 -1
  73. package/dist/{datetime-picker-C1d63MaA.cjs → datetime-picker-BeRUPJ7s.cjs} +1 -1
  74. package/dist/{datetime-picker-DsnHYRK-.js → datetime-picker-CIqBZYMH.js} +3 -3
  75. package/dist/datetime-picker.cjs +1 -1
  76. package/dist/datetime-picker.js +1 -1
  77. package/dist/{decimal-input-yTk35W_5.js → decimal-input-Bg2BPKIr.js} +38 -38
  78. package/dist/decimal-input-CkTEjo2J.cjs +1 -0
  79. package/dist/decimal-input.cjs +1 -1
  80. package/dist/decimal-input.js +1 -1
  81. package/dist/{dialog-B8eWKqzS.js → dialog-Bsfviqvy.js} +2 -2
  82. package/dist/dialog-DRAoumvB.cjs +1 -0
  83. package/dist/dialog.cjs +1 -1
  84. package/dist/dialog.js +1 -1
  85. package/dist/{email-input-DFI4h_KN.cjs → email-input-CehmtNUq.cjs} +1 -1
  86. package/dist/{email-input-pX0hlYV3.js → email-input-DIiY9Q3S.js} +1 -1
  87. package/dist/email-input.cjs +1 -1
  88. package/dist/email-input.js +1 -1
  89. package/dist/{footer-DB0_-IwN.cjs → footer-fovIsy-0.cjs} +1 -1
  90. package/dist/{footer-B3KUIwXW.js → footer-jWaFq3qk.js} +9 -9
  91. package/dist/footer.cjs +1 -1
  92. package/dist/footer.js +1 -1
  93. package/dist/grid-BDz4Xs6M.cjs +1 -0
  94. package/dist/grid-BX5vZjDo.js +612 -0
  95. package/dist/grid.cjs +1 -0
  96. package/dist/grid.d.ts +1 -0
  97. package/dist/grid.js +5 -0
  98. package/dist/{header-CDOWlOAR.js → header-Dnf8AnIx.js} +2 -2
  99. package/dist/{header-CiZQY_7S.cjs → header-DzItWqW4.cjs} +1 -1
  100. package/dist/header.cjs +1 -1
  101. package/dist/header.js +1 -1
  102. package/dist/icon-BmLOodCQ.cjs +1 -0
  103. package/dist/icon-BwDfkIdR.js +153 -0
  104. package/dist/icon.cjs +1 -0
  105. package/dist/icon.d.ts +1 -0
  106. package/dist/icon.js +5 -0
  107. package/dist/index.cjs +10 -5
  108. package/dist/index.d.ts +6 -0
  109. package/dist/index.js +612 -541
  110. package/dist/{input-BrGJn-D9.cjs → input-BcjL2oxv.cjs} +1 -1
  111. package/dist/{input-Cccufiqn.js → input-CPb9yVU5.js} +8 -8
  112. package/dist/input-otp-BhJ3ERrY.cjs +1 -0
  113. package/dist/{input-otp-DmEGB1nu.js → input-otp-CTvJztkH.js} +32 -32
  114. package/dist/input-otp.cjs +1 -1
  115. package/dist/input-otp.js +1 -1
  116. package/dist/input.cjs +1 -1
  117. package/dist/input.js +1 -1
  118. package/dist/layout-shared-B_1iX4Hj.js +319 -0
  119. package/dist/layout-shared-CsBZcT4V.cjs +1 -0
  120. package/dist/{multi-select-B6NBbDCW.js → multi-select-CVxkWW29.js} +30 -30
  121. package/dist/multi-select-DBFINH3F.cjs +1 -0
  122. package/dist/multi-select.cjs +1 -1
  123. package/dist/multi-select.js +1 -1
  124. package/dist/navigation-drawer-BCBFtLEq.cjs +1 -0
  125. package/dist/navigation-drawer-BMyHXhhX.js +198 -0
  126. package/dist/navigation-drawer.cjs +1 -1
  127. package/dist/navigation-drawer.js +1 -1
  128. package/dist/{number-input-vICbRc2y.js → number-input-Cm9YPBOX.js} +1 -1
  129. package/dist/{number-input-Bc7jUsu-.cjs → number-input-Dr9MbuRV.cjs} +1 -1
  130. package/dist/number-input.cjs +1 -1
  131. package/dist/number-input.js +1 -1
  132. package/dist/{pagination-DTWRjiOm.js → pagination-D2tjMpVU.js} +2 -2
  133. package/dist/{pagination-4IuE_APs.cjs → pagination-yKmFlFMR.cjs} +1 -1
  134. package/dist/pagination.cjs +1 -1
  135. package/dist/pagination.js +1 -1
  136. package/dist/{password-input-BwnlHPbX.cjs → password-input-CmHubHuU.cjs} +1 -1
  137. package/dist/{password-input-B9V45d3Q.js → password-input-ljwdGCO6.js} +2 -2
  138. package/dist/password-input.cjs +1 -1
  139. package/dist/password-input.js +1 -1
  140. package/dist/{phone-input-BQjZj5jI.cjs → phone-input-B8VksCer.cjs} +1 -1
  141. package/dist/{phone-input-CSBpGHvI.js → phone-input-qTL6K8rT.js} +2 -2
  142. package/dist/phone-input.cjs +1 -1
  143. package/dist/phone-input.js +1 -1
  144. package/dist/progress-BpdmBGaX.cjs +1 -0
  145. package/dist/{progress-Dz_it5I-.js → progress-ChFf9bIq.js} +1 -1
  146. package/dist/progress.cjs +1 -1
  147. package/dist/progress.js +1 -1
  148. package/dist/providers/create-theme.d.ts +10 -1
  149. package/dist/{radio-group-C--1neiq.cjs → radio-group-9gozRouT.cjs} +1 -1
  150. package/dist/{radio-group-CNMPZx_2.js → radio-group-Bs9933bk.js} +6 -6
  151. package/dist/radio-group.cjs +1 -1
  152. package/dist/radio-group.js +1 -1
  153. package/dist/{rich-text-BZSyuYSo.js → rich-text-DImwK9hN.js} +1 -1
  154. package/dist/{rich-text-DerWxzdn.cjs → rich-text-DzHLeG7W.cjs} +1 -1
  155. package/dist/rich-text.cjs +1 -1
  156. package/dist/rich-text.js +1 -1
  157. package/dist/row-BYAk7G5d.js +37 -0
  158. package/dist/row-Bjn-GQAC.cjs +1 -0
  159. package/dist/row.cjs +1 -0
  160. package/dist/row.d.ts +1 -0
  161. package/dist/row.js +5 -0
  162. package/dist/{search-input-Dmmo-BEL.cjs → search-input-BKTjebg7.cjs} +1 -1
  163. package/dist/{search-input-bFNW6oiE.js → search-input-Dgr9kT1a.js} +1 -1
  164. package/dist/search-input.cjs +1 -1
  165. package/dist/search-input.js +1 -1
  166. package/dist/select-Cdh991T-.cjs +1 -0
  167. package/dist/{select-DDSYjKtj.js → select-Dp5AJ6I-.js} +15 -15
  168. package/dist/select.cjs +1 -1
  169. package/dist/select.js +1 -1
  170. package/dist/sheet-CkXjinUG.cjs +1 -0
  171. package/dist/{sheet-D5HWF66e.js → sheet-uiyHNKEw.js} +6 -6
  172. package/dist/sheet.cjs +1 -1
  173. package/dist/sheet.js +1 -1
  174. package/dist/{slider-CZQBAXup.js → slider-BQmbh0Nl.js} +1 -1
  175. package/dist/{slider-DdEOapYP.cjs → slider-DK2yk-YK.cjs} +1 -1
  176. package/dist/slider.cjs +1 -1
  177. package/dist/slider.js +1 -1
  178. package/dist/stack-Ck1w2iJu.cjs +1 -0
  179. package/dist/stack-D2btWM1t.js +27 -0
  180. package/dist/stack.cjs +1 -0
  181. package/dist/stack.d.ts +1 -0
  182. package/dist/stack.js +5 -0
  183. package/dist/{stepper-D5nDwJUz.cjs → stepper-ByYKX7qw.cjs} +1 -1
  184. package/dist/{stepper-BtlKiHtd.js → stepper-Copsj87A.js} +4 -4
  185. package/dist/stepper.cjs +1 -1
  186. package/dist/stepper.js +1 -1
  187. package/dist/styles.css +935 -59
  188. package/dist/{switch-KzBijHMJ.cjs → switch-C2OPCq5Z.cjs} +1 -1
  189. package/dist/{switch-C7EBLT5H.js → switch-CXBWUZcq.js} +3 -3
  190. package/dist/switch.cjs +1 -1
  191. package/dist/switch.js +1 -1
  192. package/dist/{tabs-DztJ2iVc.cjs → tabs-D8p6Tr5i.cjs} +1 -1
  193. package/dist/{tabs-C9NKBmH0.js → tabs-TV4_2wi1.js} +9 -9
  194. package/dist/tabs.cjs +1 -1
  195. package/dist/tabs.js +1 -1
  196. package/dist/{textarea-Dl-daLHR.cjs → textarea-BnpQmE74.cjs} +1 -1
  197. package/dist/{textarea-DXUk1b_-.js → textarea-CJRmnazN.js} +1 -1
  198. package/dist/textarea.cjs +1 -1
  199. package/dist/textarea.js +1 -1
  200. package/dist/{time-input-BPoFvoeM.js → time-input-A603mEFQ.js} +38 -38
  201. package/dist/time-input-qxljhdEb.cjs +1 -0
  202. package/dist/time-input.cjs +1 -1
  203. package/dist/time-input.js +1 -1
  204. package/dist/{toggle-Dv1VZ5Le.js → toggle-Bx3q15Pu.js} +6 -6
  205. package/dist/{toggle-Bvh1v32T.cjs → toggle-Z3t4jPdv.cjs} +1 -1
  206. package/dist/{toggle-group-SyHMwO90.cjs → toggle-group-BZIW4wJp.cjs} +1 -1
  207. package/dist/{toggle-group-DE8BPZih.js → toggle-group-LaZmOMx_.js} +7 -7
  208. package/dist/toggle-group.cjs +1 -1
  209. package/dist/toggle-group.js +1 -1
  210. package/dist/toggle.cjs +1 -1
  211. package/dist/toggle.js +1 -1
  212. package/dist/{tree-view-CyeJR7cW.js → tree-view-DRmm6oL6.js} +23 -23
  213. package/dist/tree-view-DVQyRQDg.cjs +1 -0
  214. package/dist/tree-view.cjs +1 -1
  215. package/dist/tree-view.js +1 -1
  216. package/dist/visually-hidden-BQMRYGxP.js +14 -0
  217. package/dist/visually-hidden-DzxxOswl.cjs +1 -0
  218. package/dist/visually-hidden.cjs +1 -0
  219. package/dist/visually-hidden.d.ts +1 -0
  220. package/dist/visually-hidden.js +5 -0
  221. package/package.json +8 -8
  222. package/skills/eluan/DESIGN.md +409 -0
  223. package/skills/eluan/SKILL.md +166 -0
  224. package/skills/eluan/components/accordion.md +212 -0
  225. package/skills/eluan/components/action-popover.md +266 -0
  226. package/skills/eluan/components/aspect-ratio.md +169 -0
  227. package/skills/eluan/components/avatar.md +277 -0
  228. package/skills/eluan/components/badge.md +190 -0
  229. package/skills/eluan/components/banner.md +247 -0
  230. package/skills/eluan/components/box.md +166 -0
  231. package/skills/eluan/components/breadcrumb.md +240 -0
  232. package/skills/eluan/components/button.md +214 -0
  233. package/skills/eluan/components/calendar.md +192 -0
  234. package/skills/eluan/components/card.md +270 -0
  235. package/skills/eluan/components/carousel.md +274 -0
  236. package/skills/eluan/components/checkbox-group.md +228 -0
  237. package/skills/eluan/components/checkbox.md +226 -0
  238. package/skills/eluan/components/code-block.md +193 -0
  239. package/skills/eluan/components/collapsible.md +240 -0
  240. package/skills/eluan/components/command.md +359 -0
  241. package/skills/eluan/components/context-menu.md +296 -0
  242. package/skills/eluan/components/credit-card-input.md +217 -0
  243. package/skills/eluan/components/date-picker.md +255 -0
  244. package/skills/eluan/components/date-time-picker.md +196 -0
  245. package/skills/eluan/components/decimal-input.md +232 -0
  246. package/skills/eluan/components/dialog.md +322 -0
  247. package/skills/eluan/components/drawer.md +292 -0
  248. package/skills/eluan/components/dropdown-menu.md +450 -0
  249. package/skills/eluan/components/email-input.md +200 -0
  250. package/skills/eluan/components/fieldset.md +219 -0
  251. package/skills/eluan/components/file-input.md +249 -0
  252. package/skills/eluan/components/footer.md +290 -0
  253. package/skills/eluan/components/form-label.md +254 -0
  254. package/skills/eluan/components/grid.md +192 -0
  255. package/skills/eluan/components/header.md +242 -0
  256. package/skills/eluan/components/hover-card.md +215 -0
  257. package/skills/eluan/components/icon.md +161 -0
  258. package/skills/eluan/components/input-otp.md +227 -0
  259. package/skills/eluan/components/input.md +249 -0
  260. package/skills/eluan/components/kbd.md +216 -0
  261. package/skills/eluan/components/media.md +244 -0
  262. package/skills/eluan/components/menubar.md +300 -0
  263. package/skills/eluan/components/multi-select.md +221 -0
  264. package/skills/eluan/components/navigation-drawer.md +297 -0
  265. package/skills/eluan/components/navigation-menu.md +291 -0
  266. package/skills/eluan/components/number-input.md +190 -0
  267. package/skills/eluan/components/pagination.md +262 -0
  268. package/skills/eluan/components/password-input.md +218 -0
  269. package/skills/eluan/components/phone-input.md +205 -0
  270. package/skills/eluan/components/popover.md +250 -0
  271. package/skills/eluan/components/progress.md +185 -0
  272. package/skills/eluan/components/radio-group.md +232 -0
  273. package/skills/eluan/components/rich-text.md +195 -0
  274. package/skills/eluan/components/row.md +174 -0
  275. package/skills/eluan/components/scroll-area.md +203 -0
  276. package/skills/eluan/components/search-input.md +281 -0
  277. package/skills/eluan/components/segmented-control.md +201 -0
  278. package/skills/eluan/components/select.md +296 -0
  279. package/skills/eluan/components/separator.md +179 -0
  280. package/skills/eluan/components/sheet.md +326 -0
  281. package/skills/eluan/components/skeleton.md +202 -0
  282. package/skills/eluan/components/slider.md +195 -0
  283. package/skills/eluan/components/spinner.md +187 -0
  284. package/skills/eluan/components/stack.md +158 -0
  285. package/skills/eluan/components/stepper.md +236 -0
  286. package/skills/eluan/components/switch.md +218 -0
  287. package/skills/eluan/components/table.md +348 -0
  288. package/skills/eluan/components/tabs.md +277 -0
  289. package/skills/eluan/components/textarea.md +202 -0
  290. package/skills/eluan/components/time-input.md +181 -0
  291. package/skills/eluan/components/toast.md +251 -0
  292. package/skills/eluan/components/toggle-group.md +241 -0
  293. package/skills/eluan/components/toggle.md +198 -0
  294. package/skills/eluan/components/tooltip.md +222 -0
  295. package/skills/eluan/components/tree-view.md +213 -0
  296. package/skills/eluan/components/typography.md +207 -0
  297. package/skills/eluan/components/visually-hidden.md +132 -0
  298. package/skills/eluan/foundations/colour.md +252 -0
  299. package/skills/eluan/foundations/elevation.md +57 -0
  300. package/skills/eluan/foundations/iconography.md +70 -0
  301. package/skills/eluan/foundations/motion.md +60 -0
  302. package/skills/eluan/foundations/radius.md +61 -0
  303. package/skills/eluan/foundations/spacing.md +98 -0
  304. package/skills/eluan/foundations/theming.md +197 -0
  305. package/skills/eluan/foundations/typography.md +163 -0
  306. package/skills/eluan/patterns/empty-states.md +84 -0
  307. package/skills/eluan/patterns/feedback.md +95 -0
  308. package/skills/eluan/patterns/forms.md +138 -0
  309. package/skills/eluan/patterns/navigation.md +95 -0
  310. package/skills/eluan/patterns/page-layout.md +101 -0
  311. package/dist/button-Ny6OF8Un.cjs +0 -1
  312. package/dist/decimal-input-BLmifKF2.cjs +0 -1
  313. package/dist/dialog-DWYtFhZl.cjs +0 -1
  314. package/dist/input-otp-DcZ7wyjs.cjs +0 -1
  315. package/dist/multi-select-kcoUbSwE.cjs +0 -1
  316. package/dist/navigation-drawer-BbeDYPhu.js +0 -171
  317. package/dist/navigation-drawer-DOOHfbY3.cjs +0 -1
  318. package/dist/progress-DpQjGEyn.cjs +0 -1
  319. package/dist/select-1Eb3NSrR.cjs +0 -1
  320. package/dist/sheet-7NP1LuHy.cjs +0 -1
  321. package/dist/time-input-DR2snTgB.cjs +0 -1
  322. package/dist/tree-view-CNvEc1TT.cjs +0 -1
@@ -0,0 +1,348 @@
1
+ ---
2
+ name: Table
3
+ use_when: Showing items the user compares across the same attributes, such as users, invoices or plan features.
4
+ instead_of: Card for items browsed on their own; TreeView for hierarchical data; your own grid of divs for tabular data.
5
+ source: packages/core/src/components/table.tsx
6
+ ---
7
+
8
+ # Table
9
+
10
+ ## 1. Overview
11
+
12
+ Table is a set of styled native table elements: `<table>` inside a horizontally scrolling wrapper, plus header, body, footer, row, head cell, data cell and caption parts. It has no data model, sorting, selection logic or pagination; you render the rows and own the state.
13
+
14
+ ## 2. When to use
15
+
16
+ - A list of records with the same fields that users scan and compare: users, invoices, deployments.
17
+ - A feature comparison across plans, with the feature names in the first column and the recommended plan's column highlighted.
18
+ - Totals under a list of figures (TableFooter).
19
+ - A list with row actions or row selection, composed with [DropdownMenu](./dropdown-menu.md) and [Checkbox](./checkbox.md).
20
+
21
+ ### When not to use
22
+
23
+ - Items that stand alone and are browsed (projects, articles), or a few plans to choose from → use [Card](./card.md) in a grid.
24
+ - Hierarchical data (folders, org charts) → use [TreeView](./tree-view.md).
25
+ - Page or form layout → use your own flex or grid wrapper; see [page-layout.md](../patterns/page-layout.md).
26
+ - No rows yet → follow [empty-states.md](../patterns/empty-states.md) instead of an empty table.
27
+ - Many pages of rows → keep Table and add [Pagination](./pagination.md) below it.
28
+
29
+ ## 3. Anatomy
30
+
31
+ 1. **Table**: a full-width wrapper `<div>` with `overflow: auto`, holding the `<table>`. Text is `--font-size-sm`. The ref and your props go to the `<table>`.
32
+ 2. **TableCaption** (optional): a `<caption>`, shown below the table in muted text. Names the table for assistive tech.
33
+ 3. **TableHeader**: the `<thead>`.
34
+ 4. **TableBody**: the `<tbody>`.
35
+ 5. **TableFooter** (optional): the `<tfoot>`, on `--container-bg-alt` with a top border and medium weight. For totals.
36
+ 6. **TableRow**: a `<tr>` with a bottom border, a hover background and a selected style.
37
+ 7. **TableHead**: a `<th>` header cell, `--size-xl` tall, muted medium-weight text.
38
+ 8. **TableCell**: a `<td>` data cell, padded `--spacing-md`.
39
+
40
+ ## 4. Variants
41
+
42
+ Table has no `variant` prop. Cell props control the look:
43
+
44
+ | Prop | On | Use for |
45
+ | --- | --- | --- |
46
+ | `align="center"` | TableHead, TableCell | Short centred values: check marks, icons, status dots in a comparison table. |
47
+ | `highlighted` | TableHead, TableCell | The recommended plan's column in a comparison table (`--interactive-bg-alt2` background). Set it on every cell in that column. |
48
+ | `weight="medium"` | TableCell | The identifying column of each row: invoice number, user name. |
49
+ | `width="feature"` | TableHead | The feature-name column of a comparison table (fixed wider column). |
50
+
51
+ There is no right or end alignment. For numbers, wrap the cell content in `<div style={{ textAlign: "right" }}>`, as the stories do.
52
+
53
+ ## 5. Sizes
54
+
55
+ Table has no size prop. Header cells are `--size-xl` tall and data cells pad `--spacing-md`; both scale with density.
56
+
57
+ ## 6. States
58
+
59
+ | State | Looks like | Notes |
60
+ | --- | --- | --- |
61
+ | Default | Rows separated by a `--container-border` line | |
62
+ | Hover | Row background `--interactive-bg-hover` | Every TableRow hovers, including header and footer rows. |
63
+ | Selected | Set `data-state="selected"` on TableRow: `--interactive-bg-selected` background with `--interactive-fg-selected` text | In the default theme this is a near-black band, and a Badge inside keeps its pale fill. Convey selection with a checked [Checkbox](./checkbox.md) in the row as well, never by colour alone. |
64
+ | Focus | Table parts aren't focusable | Buttons, checkboxes and links inside cells show their own focus ring. Never remove or restyle the focus ring. |
65
+
66
+ ## 7. Content guidelines
67
+
68
+ - Write header labels as short nouns in sentence case: "Name", "Last active", "Amount".
69
+ - Put units in the header, not in every cell: "Storage (GB)".
70
+ - Keep one format per column: same date format, same decimal places, same currency.
71
+ - Put the identifying column first and give it `weight="medium"`.
72
+ - Show an em dash for a missing value rather than leaving the cell blank.
73
+ - Write the caption as a sentence that says what the rows are: "Invoices from the last 30 days."
74
+
75
+ | Do | Don't |
76
+ | --- | --- |
77
+ | Last active | LAST ACTIVE DATE/TIME |
78
+ | Amount | $ |
79
+ | Invoices from the last 30 days. | Table 1 |
80
+
81
+ ## 8. Rules
82
+
83
+ 1. Give every table a name: a TableCaption, or `aria-label` on Table when the caption would repeat a visible heading.
84
+ 2. Put header cells in TableHeader as TableHead, never as bold TableCells.
85
+ 3. Table has no sorting. To sort, put a ghost Button inside the TableHead, set `aria-sort` on that TableHead, and sort the data yourself (see Examples).
86
+ 4. Put row actions in the last column, behind one [DropdownMenu](./dropdown-menu.md) trigger Button (`variant="ghost"`, `size="iconSm"`) with an `aria-label` naming the row.
87
+ 5. For a recommended plan in a comparison table, set `highlighted` on that column's TableHead and every TableCell in it. Don't put a primary Button in each column.
88
+ 6. Don't use Table for layout.
89
+ 7. Never pass `className` or `style`; they're dropped. Align numbers with a wrapper `<div>` inside the cell.
90
+
91
+ ## 9. Dos and don'ts
92
+
93
+ **Do:** name the table and keep headers in TableHead.
94
+
95
+ ```tsx
96
+ <Table>
97
+ <TableCaption>Invoices from the last 30 days.</TableCaption>
98
+ <TableHeader>
99
+ <TableRow>
100
+ <TableHead>Invoice</TableHead>
101
+ <TableHead>Status</TableHead>
102
+ </TableRow>
103
+ </TableHeader>
104
+ <TableBody>
105
+ <TableRow>
106
+ <TableCell weight="medium">INV-1042</TableCell>
107
+ <TableCell>Paid</TableCell>
108
+ </TableRow>
109
+ </TableBody>
110
+ </Table>
111
+ ```
112
+
113
+ **Don't:** fake headers with bold cells or leave the table unnamed.
114
+
115
+ ```tsx
116
+ <Table>
117
+ <TableBody>
118
+ <TableRow>
119
+ <TableCell weight="medium">Invoice</TableCell>
120
+ <TableCell weight="medium">Status</TableCell>
121
+ </TableRow>
122
+ </TableBody>
123
+ </Table>
124
+ ```
125
+
126
+ **Do:** align figures with a wrapper inside the cell.
127
+
128
+ ```tsx
129
+ <TableCell>
130
+ <div style={{ textAlign: "right" }}>$1,750.00</div>
131
+ </TableCell>
132
+ ```
133
+
134
+ **Don't:** style the cell itself.
135
+
136
+ ```tsx
137
+ <TableCell style={{ textAlign: "right", color: "#666" }}>$1,750.00</TableCell>
138
+ ```
139
+
140
+ ## 10. Accessibility
141
+
142
+ - Role: native `table`, with `columnheader` for TableHead and `cell` for TableCell (asserted in tests).
143
+ - Label: TableCaption names the table; or pass `aria-label` to Table.
144
+ - Keyboard: the table itself takes no focus. Tab moves through interactive content in cells (sort Buttons, checkboxes, menu triggers). Wide tables scroll inside the wrapper, which isn't focusable, so a keyboard user can only scroll it by tabbing to something inside.
145
+ - Sorting: set `aria-sort="ascending"`, `"descending"` or `"none"` on the sortable TableHead, and keep the Button label as the column name.
146
+ - Selection: `aria-selected` isn't valid on rows of a plain table. Use a Checkbox per row labelled with the row's name, plus a header Checkbox labelled "Select all". Cells holding a checkbox lose their end padding automatically.
147
+ - Focus: interactive children keep their own focus rings.
148
+ - Contrast: handled by the theme. Don't override colours.
149
+
150
+ ## 11. Behaviour
151
+
152
+ - Responsive: Table is full width. When columns don't fit, the wrapper scrolls horizontally; the page doesn't. Drop low-priority columns on narrow screens rather than squeezing them.
153
+ - Overflow and truncation: cells wrap by default. Keep identifiers short; nothing truncates.
154
+ - Motion: row colours transition over 150ms. Don't add your own.
155
+
156
+ ## 12. API
157
+
158
+ <!-- api:start -->
159
+ ### Table
160
+
161
+ | Prop | Type | Default | Description |
162
+ | --- | --- | --- | --- |
163
+ | `aria-label` | `string` | | Names the table when there's no TableCaption. |
164
+ | `...props` | `HTMLAttributes<HTMLTableElement>` without `className`, `style` | | Native table attributes. The ref goes to the `<table>`, not the scroll wrapper. |
165
+
166
+ ### TableHeader, TableBody, TableFooter
167
+
168
+ | Prop | Type | Default | Description |
169
+ | --- | --- | --- | --- |
170
+ | `...props` | `HTMLAttributes<HTMLTableSectionElement>` without `className`, `style` | | Renders `<thead>`, `<tbody>` or `<tfoot>`. |
171
+
172
+ ### TableRow
173
+
174
+ | Prop | Type | Default | Description |
175
+ | --- | --- | --- | --- |
176
+ | `data-state` | `"selected"` | | Applies the selected row style. |
177
+ | `...props` | `HTMLAttributes<HTMLTableRowElement>` without `className`, `style` | | Native row attributes. |
178
+
179
+ ### TableHead
180
+
181
+ | Prop | Type | Default | Description |
182
+ | --- | --- | --- | --- |
183
+ | `align` | `"left" \| "center"` | `"left"` | Text alignment. |
184
+ | `highlighted` | `boolean` | `false` | Highlights the column with `--interactive-bg-alt2`. |
185
+ | `width` | `"auto" \| "feature"` | `"auto"` | `"feature"` fixes a wider first column for comparison tables. |
186
+ | `aria-sort` | `"ascending" \| "descending" \| "none" \| "other"` | | Set on sortable columns. |
187
+ | `...props` | `ThHTMLAttributes` without `className`, `style` | | Native `<th>` attributes: `scope`, `colSpan`. |
188
+
189
+ ### TableCell
190
+
191
+ | Prop | Type | Default | Description |
192
+ | --- | --- | --- | --- |
193
+ | `align` | `"left" \| "center"` | `"left"` | Text alignment. |
194
+ | `highlighted` | `boolean` | `false` | Highlights the column with `--interactive-bg-alt2`. |
195
+ | `weight` | `"normal" \| "medium"` | `"normal"` | `"medium"` for the identifying column. |
196
+ | `...props` | `TdHTMLAttributes` without `className`, `style` | | Native `<td>` attributes: `colSpan`, `rowSpan`. |
197
+
198
+ ### TableCaption
199
+
200
+ | Prop | Type | Default | Description |
201
+ | --- | --- | --- | --- |
202
+ | `...props` | `HTMLAttributes<HTMLTableCaptionElement>` without `className`, `style` | | Renders `<caption>` below the table. |
203
+ <!-- api:end -->
204
+
205
+ ## 13. Examples
206
+
207
+ A users table with sortable columns, row selection and a row action menu (eval t09).
208
+
209
+ ```tsx
210
+ import * as React from "react";
211
+ import {
212
+ Badge,
213
+ Button,
214
+ Checkbox,
215
+ DropdownMenu,
216
+ DropdownMenuContent,
217
+ DropdownMenuItem,
218
+ DropdownMenuSeparator,
219
+ DropdownMenuTrigger,
220
+ Table,
221
+ TableBody,
222
+ TableCaption,
223
+ TableCell,
224
+ TableHead,
225
+ TableHeader,
226
+ TableRow,
227
+ } from "@eluan/core";
228
+ import { ArrowDown, ArrowUp, ArrowUpDown, Ellipsis } from "lucide-react";
229
+
230
+ type User = { id: string; name: string; email: string; role: string; lastActive: string; active: boolean };
231
+ type SortKey = "name" | "lastActive";
232
+
233
+ const users: User[] = [
234
+ { id: "u1", name: "Ana Lima", email: "ana@northwind.io", role: "Owner", lastActive: "2026-10-26", active: true },
235
+ { id: "u2", name: "Ben Okafor", email: "ben@northwind.io", role: "Admin", lastActive: "2026-10-21", active: true },
236
+ { id: "u3", name: "Chloe Martin", email: "chloe@northwind.io", role: "Member", lastActive: "2026-09-30", active: false },
237
+ ];
238
+
239
+ const iconStyle = { width: "var(--size-xxs)", height: "var(--size-xxs)" };
240
+
241
+ function SortButton({ label, active, direction, onClick }: { label: string; active: boolean; direction: "ascending" | "descending"; onClick: () => void }) {
242
+ const Icon = !active ? ArrowUpDown : direction === "ascending" ? ArrowUp : ArrowDown;
243
+ return (
244
+ <Button type="button" variant="ghost" size="sm" onClick={onClick}>
245
+ {label}
246
+ <Icon aria-hidden="true" style={iconStyle} />
247
+ </Button>
248
+ );
249
+ }
250
+
251
+ export function UsersTable() {
252
+ const [sort, setSort] = React.useState<{ key: SortKey; direction: "ascending" | "descending" }>({ key: "name", direction: "ascending" });
253
+ const [selected, setSelected] = React.useState<string[]>([]);
254
+
255
+ const rows = [...users].sort((a, b) => {
256
+ const order = a[sort.key].localeCompare(b[sort.key]);
257
+ return sort.direction === "ascending" ? order : -order;
258
+ });
259
+
260
+ const toggleSort = (key: SortKey) =>
261
+ setSort((s) => ({ key, direction: s.key === key && s.direction === "ascending" ? "descending" : "ascending" }));
262
+ const ariaSort = (key: SortKey) => (sort.key === key ? sort.direction : "none");
263
+ const allSelected = selected.length === users.length;
264
+
265
+ return (
266
+ <Table>
267
+ <TableCaption>People with access to the Northwind workspace.</TableCaption>
268
+ <TableHeader>
269
+ <TableRow>
270
+ <TableHead>
271
+ <Checkbox
272
+ aria-label="Select all"
273
+ checked={allSelected}
274
+ onCheckedChange={() => setSelected(allSelected ? [] : users.map((u) => u.id))}
275
+ />
276
+ </TableHead>
277
+ <TableHead aria-sort={ariaSort("name")}>
278
+ <SortButton label="Name" active={sort.key === "name"} direction={sort.direction} onClick={() => toggleSort("name")} />
279
+ </TableHead>
280
+ <TableHead>Role</TableHead>
281
+ <TableHead aria-sort={ariaSort("lastActive")}>
282
+ <SortButton label="Last active" active={sort.key === "lastActive"} direction={sort.direction} onClick={() => toggleSort("lastActive")} />
283
+ </TableHead>
284
+ <TableHead>Status</TableHead>
285
+ <TableHead aria-label="Actions" />
286
+ </TableRow>
287
+ </TableHeader>
288
+ <TableBody>
289
+ {rows.map((user) => {
290
+ const isSelected = selected.includes(user.id);
291
+ return (
292
+ <TableRow key={user.id} data-state={isSelected ? "selected" : undefined}>
293
+ <TableCell>
294
+ <Checkbox
295
+ aria-label={`Select ${user.name}`}
296
+ checked={isSelected}
297
+ onCheckedChange={(checked) =>
298
+ setSelected((ids) => (checked ? [...ids, user.id] : ids.filter((id) => id !== user.id)))
299
+ }
300
+ />
301
+ </TableCell>
302
+ <TableCell weight="medium">
303
+ {user.name}
304
+ <div style={{ color: "var(--container-fg-alt)" }}>{user.email}</div>
305
+ </TableCell>
306
+ <TableCell>{user.role}</TableCell>
307
+ <TableCell>{user.lastActive}</TableCell>
308
+ <TableCell>
309
+ <Badge variant={user.active ? "positive" : "secondary"}>{user.active ? "Active" : "Suspended"}</Badge>
310
+ </TableCell>
311
+ <TableCell>
312
+ <div style={{ textAlign: "right" }}>
313
+ <DropdownMenu>
314
+ <DropdownMenuTrigger asChild>
315
+ <Button type="button" variant="ghost" size="iconSm" aria-label={`Actions for ${user.name}`}>
316
+ <Ellipsis aria-hidden="true" style={iconStyle} />
317
+ </Button>
318
+ </DropdownMenuTrigger>
319
+ <DropdownMenuContent align="end">
320
+ <DropdownMenuItem>Change role</DropdownMenuItem>
321
+ <DropdownMenuItem>Resend invite</DropdownMenuItem>
322
+ <DropdownMenuSeparator />
323
+ <DropdownMenuItem tone="destructive">Remove from workspace</DropdownMenuItem>
324
+ </DropdownMenuContent>
325
+ </DropdownMenu>
326
+ </div>
327
+ </TableCell>
328
+ </TableRow>
329
+ );
330
+ })}
331
+ </TableBody>
332
+ </Table>
333
+ );
334
+ }
335
+ ```
336
+
337
+ ## 14. Related components
338
+
339
+ - [Card](./card.md): browse standalone items instead of comparing them.
340
+ - [Checkbox](./checkbox.md): row selection and "Select all".
341
+ - [DropdownMenu](./dropdown-menu.md): the row action menu.
342
+ - [Pagination](./pagination.md): split long tables into pages.
343
+ - [Badge](./badge.md): status values in a cell.
344
+ - [Button](./button.md): sortable header controls (`ghost`, `sm`).
345
+
346
+ ## 15. Common agent mistakes
347
+
348
+ _Filled from evals._
@@ -0,0 +1,277 @@
1
+ ---
2
+ name: Tabs
3
+ use_when: One area of a page switches between a few peer views of the same subject, such as Overview, Activity and Settings for one project.
4
+ instead_of: SegmentedControl to switch a value or filter without separate panels; NavigationMenu, NavigationDrawer or links to go to another page; Accordion to stack sections the user can open together.
5
+ source: packages/core/src/components/tabs.tsx
6
+ ---
7
+
8
+ # Tabs
9
+
10
+ ## 1. Overview
11
+
12
+ Tabs show one panel at a time from a set of peer views on the same page, chosen from a row of tab triggers. It wraps Radix Tabs: a pill-shaped list on `--interactive-bg-alt` with the active tab raised on `--container-bg`, and panels that swap in place without changing the URL.
13
+
14
+ ## 2. When to use
15
+
16
+ - Splitting one object's details into peer views: a project's Overview, Activity and Settings.
17
+ - Settings or profile pages with a few sections the user visits one at a time: Account, Password, Notifications.
18
+ - Alternate presentations of the same content: Preview and Code.
19
+
20
+ ### When not to use
21
+
22
+ - Going to another page or URL → use links: [NavigationMenu](./navigation-menu.md), [NavigationDrawer](./navigation-drawer.md), [Header](./header.md), or [Button](./button.md) `variant="link"` with `asChild` around an `<a>`. Never style links or buttons to look like tabs.
23
+ - Switching a value, filter or mode that changes the same content (List / Board, Day / Week / Month) → use [SegmentedControl](./segmented-control.md).
24
+ - Sections the user may want open at the same time, or long content to scan → use [Accordion](./accordion.md).
25
+ - Steps that must happen in order → use [Stepper](./stepper.md).
26
+ - A pressed/unpressed option → use [ToggleGroup](./toggle-group.md).
27
+
28
+ ## 3. Anatomy
29
+
30
+ 1. **Root** (`Tabs`): holds the selected value. Renders a `<div>`.
31
+ 2. **List** (`TabsList`): the row of triggers. An inline pill on `--interactive-bg-alt` with `--curves-md` radius and `--spacing-xs` padding. It sizes to its triggers; it doesn't stretch.
32
+ 3. **Trigger** (`TabsTrigger`): one tab, `--font-size-sm` at weight 500, `--interactive-fg-alt` text. The active trigger sits on a `--container-bg` cap with `--interactive-fg` text.
33
+ 4. **Content** (`TabsContent`): the panel for one trigger, `--spacing-sm` below the list. Only the active panel is rendered.
34
+
35
+ ## 4. Variants
36
+
37
+ Tabs has no variants. The list always draws as a pill with a raised active tab.
38
+
39
+ ## 5. Sizes
40
+
41
+ Tabs has no size prop. Triggers use `--font-size-sm` and `--spacing-sm` padding, so they follow the density axis.
42
+
43
+ ## 6. States
44
+
45
+ | State | Looks like | Notes |
46
+ | --- | --- | --- |
47
+ | Default | Inactive trigger, `--interactive-fg-alt` text on the list | |
48
+ | Hover | No visible change | The hover rule repeats the resting colour, so inactive tabs give no hover feedback. Don't add your own. |
49
+ | Focus | 1px outline in `--focus-ring`, 1px offset, on triggers and panels | Never remove or restyle the focus ring. |
50
+ | Active | `--container-bg` cap, `--interactive-fg` text, a faint shadow | Exactly one trigger is active. |
51
+ | Disabled | `--interactive-fg-disabled` text, no pointer events | Arrow keys skip disabled triggers. |
52
+
53
+ ## 7. Content guidelines
54
+
55
+ - Label tabs with one or two nouns naming the view: "Overview", "Activity", "Billing".
56
+ - Use sentence case. No icons-only tabs; if you add an icon, keep the text.
57
+ - Keep labels about the same length and the set small, two to six tabs. Triggers don't wrap.
58
+ - Order tabs by how often they are used, most used first, and make the first tab the default.
59
+ - Don't put counts or status in the label unless they change what the user does: "Issues 3" is fine; "Settings (new!)" isn't.
60
+
61
+ | Do | Don't |
62
+ | --- | --- |
63
+ | Overview | Click for overview |
64
+ | Activity | Recent activity log and history |
65
+ | Billing | Billing info ⚡ |
66
+
67
+ ## 8. Rules
68
+
69
+ 1. Use Tabs only for views inside the same page. If choosing an option changes the URL to another page, it's navigation; use links.
70
+ 2. Give every `TabsTrigger` a `value` that matches exactly one `TabsContent`.
71
+ 3. Set `defaultValue` (or control `value` with `onValueChange`) so one tab is always selected.
72
+ 4. Put the content in `TabsContent`. Don't show and hide your own panels from a SegmentedControl or Buttons to fake tabs.
73
+ 5. Keep the list horizontal. `orientation="vertical"` changes only the arrow keys; the list still lays out as a row.
74
+ 6. Never pass `className` or `style` to any part, including the `Tabs` root. Put width and spacing on a wrapper you own.
75
+
76
+ ## 9. Dos and don'ts
77
+
78
+ **Do:** switch peer views of one project with Tabs.
79
+
80
+ ```tsx
81
+ <Tabs defaultValue="overview">
82
+ <TabsList>
83
+ <TabsTrigger value="overview">Overview</TabsTrigger>
84
+ <TabsTrigger value="activity">Activity</TabsTrigger>
85
+ </TabsList>
86
+ <TabsContent value="overview">{overview}</TabsContent>
87
+ <TabsContent value="activity">{activity}</TabsContent>
88
+ </Tabs>
89
+ ```
90
+
91
+ **Don't:** build tabs out of buttons or links.
92
+
93
+ ```tsx
94
+ <div style={{ display: "flex" }}>
95
+ <Button variant={view === "overview" ? "secondary" : "ghost"} onClick={() => setView("overview")}>Overview</Button>
96
+ <Button variant={view === "activity" ? "secondary" : "ghost"} onClick={() => setView("activity")}>Activity</Button>
97
+ </div>
98
+ {view === "overview" ? overview : activity}
99
+ ```
100
+
101
+ **Do:** use links when each option is a separate page.
102
+
103
+ ```tsx
104
+ <NavigationMenu aria-label="Project">
105
+ <NavigationMenuList>
106
+ <NavigationMenuItem>
107
+ <NavigationMenuLink asChild>
108
+ <a href="/projects/apollo" className={navigationMenuTriggerStyle()} aria-current="page">Overview</a>
109
+ </NavigationMenuLink>
110
+ </NavigationMenuItem>
111
+ </NavigationMenuList>
112
+ </NavigationMenu>
113
+ ```
114
+
115
+ **Don't:** make Tabs navigate.
116
+
117
+ ```tsx
118
+ <Tabs value="overview" onValueChange={(value) => router.push(`/projects/apollo/${value}`)}>
119
+ <TabsList>
120
+ <TabsTrigger value="overview">Overview</TabsTrigger>
121
+ <TabsTrigger value="activity">Activity</TabsTrigger>
122
+ </TabsList>
123
+ </Tabs>
124
+ ```
125
+
126
+ **Do:** use SegmentedControl to switch how the same content is shown.
127
+
128
+ ```tsx
129
+ <SegmentedControl value={layout} onValueChange={setLayout} aria-label="Layout">
130
+ <SegmentedControlItem value="list">List</SegmentedControlItem>
131
+ <SegmentedControlItem value="board">Board</SegmentedControlItem>
132
+ </SegmentedControl>
133
+ ```
134
+
135
+ **Don't:** use Tabs with empty panels as a filter switch.
136
+
137
+ ```tsx
138
+ <Tabs value={layout} onValueChange={setLayout}>
139
+ <TabsList>
140
+ <TabsTrigger value="list">List</TabsTrigger>
141
+ <TabsTrigger value="board">Board</TabsTrigger>
142
+ </TabsList>
143
+ </Tabs>
144
+ ```
145
+
146
+ ## 10. Accessibility
147
+
148
+ - Role: the list is `tablist`; triggers are `tab` with `aria-selected` and `aria-controls`; panels are `tabpanel`, labelled by their trigger.
149
+ - Label: each tab is named by its text. Give the list an `aria-label` when the tabs need context ("Project sections").
150
+ - Keyboard: Tab moves focus to the active tab, then into the panel. ArrowLeft and ArrowRight move between tabs and select them as focus moves (`activationMode="automatic"`); Home and End jump to the first and last tab. Use `activationMode="manual"` when a panel is slow to render, so Enter or Space selects instead.
151
+ - Focus: panels are focusable (`tabIndex` 0) and show the focus outline, so keyboard users can reach panels with no focusable content.
152
+ - Contrast: handled by the theme. Don't override colours.
153
+
154
+ ## 11. Behaviour
155
+
156
+ - Responsive: the list is `inline-flex` and sizes to its triggers; it doesn't scroll or wrap. Keep the set short enough to fit the narrowest screen, or switch to a [Select](./select.md) on phones.
157
+ - Overflow and truncation: trigger labels don't wrap (`white-space: nowrap`).
158
+ - Mounting: inactive panels unmount. Lift state you need to keep (form drafts, scroll position) above `Tabs`, or pass `forceMount` on `TabsContent`.
159
+ - URL: Tabs don't change the URL. If a tab must be linkable, control `value` from a query parameter.
160
+ - Motion: trigger colour, background and shadow transition over 150ms. Panels swap without animation. Don't add any.
161
+
162
+ ## 12. API
163
+
164
+ <!-- api:start -->
165
+ ### Tabs
166
+
167
+ | Prop | Type | Default | Description |
168
+ | --- | --- | --- | --- |
169
+ | `defaultValue` | `string` | | Selected tab when uncontrolled. |
170
+ | `value` | `string` | | Controlled selected tab. |
171
+ | `onValueChange` | `(value: string) => void` | | Called when the selected tab changes. |
172
+ | `activationMode` | `"automatic" \| "manual"` | `"automatic"` | Whether arrow keys select tabs as they move focus. |
173
+ | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Arrow-key direction only; the list always lays out as a row. |
174
+ | `...props` | Radix `Tabs.Root` props | | `dir`. Re-exported Radix part; it forwards `className` and `style`, but don't pass them. |
175
+
176
+ ### TabsList
177
+
178
+ | Prop | Type | Default | Description |
179
+ | --- | --- | --- | --- |
180
+ | `loop` | `boolean` | `true` | Wraps arrow-key focus from the last tab to the first. |
181
+ | `...props` | Radix `Tabs.List` props without `className`, `style` | | `aria-label`. |
182
+
183
+ ### TabsTrigger
184
+
185
+ | Prop | Type | Default | Description |
186
+ | --- | --- | --- | --- |
187
+ | `value` | `string` | | Required. Matches a `TabsContent` `value`. |
188
+ | `disabled` | `boolean` | `false` | Not selectable; skipped by arrow keys. |
189
+ | `...props` | Radix `Tabs.Trigger` props without `className`, `style` | | |
190
+
191
+ ### TabsContent
192
+
193
+ | Prop | Type | Default | Description |
194
+ | --- | --- | --- | --- |
195
+ | `value` | `string` | | Required. Matches a `TabsTrigger` `value`. |
196
+ | `forceMount` | `true` | | Keeps the panel mounted while inactive. |
197
+ | `...props` | Radix `Tabs.Content` props without `className`, `style` | | |
198
+ <!-- api:end -->
199
+
200
+ ## 13. Examples
201
+
202
+ ```tsx
203
+ import * as React from "react";
204
+ import {
205
+ Badge,
206
+ Button,
207
+ Card,
208
+ CardContent,
209
+ CardDescription,
210
+ CardFooter,
211
+ CardHeader,
212
+ CardTitle,
213
+ Tabs,
214
+ TabsContent,
215
+ TabsList,
216
+ TabsTrigger,
217
+ Typography,
218
+ } from "@eluan/core";
219
+
220
+ export function ProjectDetails({
221
+ summary,
222
+ openIssues,
223
+ onArchive,
224
+ }: {
225
+ summary: string;
226
+ openIssues: number;
227
+ onArchive: () => void;
228
+ }) {
229
+ return (
230
+ <div style={{ display: "flex", flexDirection: "column", gap: "var(--spacing-lg)" }}>
231
+ <Typography variant="title" as="h1">Apollo redesign</Typography>
232
+ <Tabs defaultValue="overview">
233
+ <TabsList aria-label="Project sections">
234
+ <TabsTrigger value="overview">Overview</TabsTrigger>
235
+ <TabsTrigger value="issues">Issues</TabsTrigger>
236
+ <TabsTrigger value="settings">Settings</TabsTrigger>
237
+ </TabsList>
238
+ <TabsContent value="overview">
239
+ <Typography variant="body">{summary}</Typography>
240
+ </TabsContent>
241
+ <TabsContent value="issues">
242
+ <div style={{ display: "flex", alignItems: "center", gap: "var(--spacing-sm)" }}>
243
+ <Typography variant="body">Open issues</Typography>
244
+ <Badge>{openIssues}</Badge>
245
+ </div>
246
+ </TabsContent>
247
+ <TabsContent value="settings">
248
+ <Card>
249
+ <CardHeader>
250
+ <CardTitle>Archive project</CardTitle>
251
+ <CardDescription>Archived projects are read-only and hidden from the dashboard.</CardDescription>
252
+ </CardHeader>
253
+ <CardContent>
254
+ <Typography variant="caption" tone="muted">You can restore it from the archive at any time.</Typography>
255
+ </CardContent>
256
+ <CardFooter>
257
+ <Button type="button" variant="outline" onClick={onArchive}>Archive project</Button>
258
+ </CardFooter>
259
+ </Card>
260
+ </TabsContent>
261
+ </Tabs>
262
+ </div>
263
+ );
264
+ }
265
+ ```
266
+
267
+ ## 14. Related components
268
+
269
+ - [SegmentedControl](./segmented-control.md): switches a value or layout with no panels; also built on Radix Tabs.
270
+ - [Accordion](./accordion.md): sections that can be open together.
271
+ - [NavigationMenu](./navigation-menu.md) and [NavigationDrawer](./navigation-drawer.md): navigation between pages.
272
+ - [ToggleGroup](./toggle-group.md): pressable options.
273
+ - See [navigation patterns](../patterns/navigation.md).
274
+
275
+ ## 15. Common agent mistakes
276
+
277
+ _Filled from evals._