@sanity/ui 5.0.0-alpha.22 → 5.0.0-alpha.24

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 (377) hide show
  1. package/README.md +10 -0
  2. package/dist/index.d.ts +15 -7
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +76 -59
  5. package/dist/index.js.map +1 -1
  6. package/dist/styles.css +1 -1
  7. package/docs/components/avatar-counter.dsds.yaml +78 -0
  8. package/docs/components/avatar-stack.dsds.yaml +96 -0
  9. package/docs/components/avatar.dsds.yaml +115 -0
  10. package/docs/components/badge.dsds.yaml +126 -0
  11. package/docs/components/box.dsds.yaml +223 -0
  12. package/docs/components/button.dsds.yaml +296 -0
  13. package/docs/components/card.dsds.yaml +317 -0
  14. package/docs/components/checkbox.dsds.yaml +204 -0
  15. package/docs/components/code.dsds.yaml +169 -0
  16. package/docs/components/container.dsds.yaml +189 -0
  17. package/docs/components/dialog.dsds.yaml +343 -0
  18. package/docs/components/divider.dsds.yaml +93 -0
  19. package/docs/components/eyebrow.dsds.yaml +198 -0
  20. package/docs/components/flex.dsds.yaml +237 -0
  21. package/docs/components/grid.dsds.yaml +217 -0
  22. package/docs/components/h-stack.dsds.yaml +127 -0
  23. package/docs/components/heading.dsds.yaml +233 -0
  24. package/docs/components/hotkeys.dsds.yaml +60 -0
  25. package/docs/components/icon-button.dsds.yaml +227 -0
  26. package/docs/components/icon.dsds.yaml +275 -0
  27. package/docs/components/indicator-stack.dsds.yaml +98 -0
  28. package/docs/components/indicator.dsds.yaml +108 -0
  29. package/docs/components/inline.dsds.yaml +127 -0
  30. package/docs/components/kbd.dsds.yaml +59 -0
  31. package/docs/components/link.dsds.yaml +108 -0
  32. package/docs/components/list-button-item.dsds.yaml +103 -0
  33. package/docs/components/list-item-image.dsds.yaml +82 -0
  34. package/docs/components/list-item-text.dsds.yaml +80 -0
  35. package/docs/components/list-item.dsds.yaml +148 -0
  36. package/docs/components/list.dsds.yaml +162 -0
  37. package/docs/components/popover.dsds.yaml +214 -0
  38. package/docs/components/press-area.dsds.yaml +279 -0
  39. package/docs/components/radio.dsds.yaml +198 -0
  40. package/docs/components/select.dsds.yaml +214 -0
  41. package/docs/components/skip-to-content.dsds.yaml +110 -0
  42. package/docs/components/spinner.dsds.yaml +119 -0
  43. package/docs/components/switch.dsds.yaml +202 -0
  44. package/docs/components/tab.dsds.yaml +54 -0
  45. package/docs/components/tabs-list.dsds.yaml +56 -0
  46. package/docs/components/tabs-panel.dsds.yaml +54 -0
  47. package/docs/components/tabs.dsds.yaml +104 -0
  48. package/docs/components/text-area.dsds.yaml +170 -0
  49. package/docs/components/text-input.dsds.yaml +189 -0
  50. package/docs/components/text.dsds.yaml +268 -0
  51. package/docs/components/tooltip-group.dsds.yaml +90 -0
  52. package/docs/components/tooltip.dsds.yaml +216 -0
  53. package/docs/components/v-stack.dsds.yaml +155 -0
  54. package/docs/components/visually-hidden.dsds.yaml +112 -0
  55. package/docs/evals/cases.yaml +1319 -0
  56. package/docs/examples/checkbox-2.tsx +57 -0
  57. package/docs/examples/confirmation-dialogs-1.tsx +27 -0
  58. package/docs/examples/confirmation-dialogs-2.tsx +55 -0
  59. package/docs/examples/confirmation-dialogs-3.tsx +28 -0
  60. package/docs/examples/confirmation-dialogs-4.tsx +38 -0
  61. package/docs/examples/popover-1.tsx +48 -0
  62. package/docs/examples/popover-2.tsx +53 -0
  63. package/docs/foundations/accessibility-guidelines.dsds.yaml +301 -0
  64. package/docs/foundations/color-guidelines.dsds.yaml +308 -0
  65. package/docs/foundations/content-guidelines.dsds.yaml +285 -0
  66. package/docs/foundations/semantics.dsds.yaml +125 -0
  67. package/docs/foundations/spacing-guidelines.dsds.yaml +226 -0
  68. package/docs/foundations/typography-guidelines.dsds.yaml +322 -0
  69. package/docs/icons/icon-access-denied.dsds.yaml +40 -0
  70. package/docs/icons/icon-activity.dsds.yaml +40 -0
  71. package/docs/icons/icon-add-circle.dsds.yaml +14 -0
  72. package/docs/icons/icon-add-comment.dsds.yaml +34 -0
  73. package/docs/icons/icon-add-document.dsds.yaml +34 -0
  74. package/docs/icons/icon-add-user.dsds.yaml +30 -0
  75. package/docs/icons/icon-add.dsds.yaml +57 -0
  76. package/docs/icons/icon-api.dsds.yaml +17 -0
  77. package/docs/icons/icon-archive.dsds.yaml +44 -0
  78. package/docs/icons/icon-arrow-down.dsds.yaml +38 -0
  79. package/docs/icons/icon-arrow-left.dsds.yaml +32 -0
  80. package/docs/icons/icon-arrow-right.dsds.yaml +32 -0
  81. package/docs/icons/icon-arrow-top-right.dsds.yaml +32 -0
  82. package/docs/icons/icon-arrow-up.dsds.yaml +44 -0
  83. package/docs/icons/icon-asterisk.dsds.yaml +18 -0
  84. package/docs/icons/icon-bar-chart.dsds.yaml +40 -0
  85. package/docs/icons/icon-basket.dsds.yaml +14 -0
  86. package/docs/icons/icon-bell.dsds.yaml +30 -0
  87. package/docs/icons/icon-bill.dsds.yaml +40 -0
  88. package/docs/icons/icon-binary-document.dsds.yaml +30 -0
  89. package/docs/icons/icon-block-content.dsds.yaml +30 -0
  90. package/docs/icons/icon-block-element.dsds.yaml +32 -0
  91. package/docs/icons/icon-blockquote.dsds.yaml +32 -0
  92. package/docs/icons/icon-bold.dsds.yaml +28 -0
  93. package/docs/icons/icon-bolt.dsds.yaml +18 -0
  94. package/docs/icons/icon-book.dsds.yaml +34 -0
  95. package/docs/icons/icon-bookmark-filled.dsds.yaml +14 -0
  96. package/docs/icons/icon-bookmark.dsds.yaml +14 -0
  97. package/docs/icons/icon-bottle.dsds.yaml +18 -0
  98. package/docs/icons/icon-bug.dsds.yaml +28 -0
  99. package/docs/icons/icon-bulb-filled.dsds.yaml +14 -0
  100. package/docs/icons/icon-bulb-outline.dsds.yaml +30 -0
  101. package/docs/icons/icon-calendar.dsds.yaml +36 -0
  102. package/docs/icons/icon-case.dsds.yaml +18 -0
  103. package/docs/icons/icon-chart-upward.dsds.yaml +40 -0
  104. package/docs/icons/icon-checkmark-circle.dsds.yaml +40 -0
  105. package/docs/icons/icon-checkmark.dsds.yaml +36 -0
  106. package/docs/icons/icon-chevron-down.dsds.yaml +46 -0
  107. package/docs/icons/icon-chevron-left.dsds.yaml +42 -0
  108. package/docs/icons/icon-chevron-right.dsds.yaml +42 -0
  109. package/docs/icons/icon-chevron-up.dsds.yaml +44 -0
  110. package/docs/icons/icon-circle.dsds.yaml +28 -0
  111. package/docs/icons/icon-clipboard-image.dsds.yaml +30 -0
  112. package/docs/icons/icon-clipboard.dsds.yaml +34 -0
  113. package/docs/icons/icon-clock.dsds.yaml +39 -0
  114. package/docs/icons/icon-close-circle.dsds.yaml +18 -0
  115. package/docs/icons/icon-close.dsds.yaml +51 -0
  116. package/docs/icons/icon-code-block.dsds.yaml +38 -0
  117. package/docs/icons/icon-code.dsds.yaml +40 -0
  118. package/docs/icons/icon-cog.dsds.yaml +38 -0
  119. package/docs/icons/icon-collapse.dsds.yaml +40 -0
  120. package/docs/icons/icon-color-wheel.dsds.yaml +30 -0
  121. package/docs/icons/icon-comment.dsds.yaml +38 -0
  122. package/docs/icons/icon-component.dsds.yaml +18 -0
  123. package/docs/icons/icon-compose-sparkles.dsds.yaml +36 -0
  124. package/docs/icons/icon-compose.dsds.yaml +38 -0
  125. package/docs/icons/icon-confetti.dsds.yaml +18 -0
  126. package/docs/icons/icon-controls.dsds.yaml +36 -0
  127. package/docs/icons/icon-copy.dsds.yaml +31 -0
  128. package/docs/icons/icon-credit-card.dsds.yaml +18 -0
  129. package/docs/icons/icon-crop.dsds.yaml +32 -0
  130. package/docs/icons/icon-cube.dsds.yaml +36 -0
  131. package/docs/icons/icon-dashboard.dsds.yaml +34 -0
  132. package/docs/icons/icon-database.dsds.yaml +40 -0
  133. package/docs/icons/icon-desktop.dsds.yaml +31 -0
  134. package/docs/icons/icon-diamond.dsds.yaml +18 -0
  135. package/docs/icons/icon-document-pdf.dsds.yaml +34 -0
  136. package/docs/icons/icon-document-remove.dsds.yaml +30 -0
  137. package/docs/icons/icon-document-sheet.dsds.yaml +34 -0
  138. package/docs/icons/icon-document-text.dsds.yaml +30 -0
  139. package/docs/icons/icon-document-video.dsds.yaml +30 -0
  140. package/docs/icons/icon-document-word.dsds.yaml +34 -0
  141. package/docs/icons/icon-document-zip.dsds.yaml +30 -0
  142. package/docs/icons/icon-document.dsds.yaml +52 -0
  143. package/docs/icons/icon-documents.dsds.yaml +30 -0
  144. package/docs/icons/icon-dot.dsds.yaml +32 -0
  145. package/docs/icons/icon-double-chevron-down.dsds.yaml +38 -0
  146. package/docs/icons/icon-double-chevron-left.dsds.yaml +34 -0
  147. package/docs/icons/icon-double-chevron-right.dsds.yaml +34 -0
  148. package/docs/icons/icon-double-chevron-up.dsds.yaml +36 -0
  149. package/docs/icons/icon-double-quote.dsds.yaml +14 -0
  150. package/docs/icons/icon-download.dsds.yaml +40 -0
  151. package/docs/icons/icon-drag-handle.dsds.yaml +28 -0
  152. package/docs/icons/icon-drop.dsds.yaml +30 -0
  153. package/docs/icons/icon-earth-americas.dsds.yaml +34 -0
  154. package/docs/icons/icon-earth-globe.dsds.yaml +34 -0
  155. package/docs/icons/icon-edit.dsds.yaml +34 -0
  156. package/docs/icons/icon-ellipsis-horizontal.dsds.yaml +32 -0
  157. package/docs/icons/icon-ellipsis-vertical.dsds.yaml +14 -0
  158. package/docs/icons/icon-empty.dsds.yaml +28 -0
  159. package/docs/icons/icon-enter-right.dsds.yaml +18 -0
  160. package/docs/icons/icon-enter.dsds.yaml +18 -0
  161. package/docs/icons/icon-envelope.dsds.yaml +34 -0
  162. package/docs/icons/icon-equal.dsds.yaml +14 -0
  163. package/docs/icons/icon-error-filled.dsds.yaml +14 -0
  164. package/docs/icons/icon-error-outline.dsds.yaml +38 -0
  165. package/docs/icons/icon-error-screen.dsds.yaml +14 -0
  166. package/docs/icons/icon-expand.dsds.yaml +36 -0
  167. package/docs/icons/icon-eye-closed.dsds.yaml +38 -0
  168. package/docs/icons/icon-eye-open.dsds.yaml +38 -0
  169. package/docs/icons/icon-face-happy.dsds.yaml +14 -0
  170. package/docs/icons/icon-face-indifferent.dsds.yaml +14 -0
  171. package/docs/icons/icon-face-sad.dsds.yaml +14 -0
  172. package/docs/icons/icon-feedback.dsds.yaml +30 -0
  173. package/docs/icons/icon-filter.dsds.yaml +38 -0
  174. package/docs/icons/icon-folder.dsds.yaml +36 -0
  175. package/docs/icons/icon-generate.dsds.yaml +18 -0
  176. package/docs/icons/icon-github.dsds.yaml +14 -0
  177. package/docs/icons/icon-groq.dsds.yaml +31 -0
  178. package/docs/icons/icon-hash.dsds.yaml +18 -0
  179. package/docs/icons/icon-heart-filled.dsds.yaml +18 -0
  180. package/docs/icons/icon-heart.dsds.yaml +18 -0
  181. package/docs/icons/icon-help-circle.dsds.yaml +38 -0
  182. package/docs/icons/icon-highlight.dsds.yaml +18 -0
  183. package/docs/icons/icon-home.dsds.yaml +28 -0
  184. package/docs/icons/icon-ice-cream.dsds.yaml +18 -0
  185. package/docs/icons/icon-image-remove.dsds.yaml +32 -0
  186. package/docs/icons/icon-image.dsds.yaml +36 -0
  187. package/docs/icons/icon-images.dsds.yaml +34 -0
  188. package/docs/icons/icon-inbox.dsds.yaml +14 -0
  189. package/docs/icons/icon-info-filled.dsds.yaml +14 -0
  190. package/docs/icons/icon-info-outline.dsds.yaml +38 -0
  191. package/docs/icons/icon-inline-element.dsds.yaml +32 -0
  192. package/docs/icons/icon-inline.dsds.yaml +18 -0
  193. package/docs/icons/icon-insert-above.dsds.yaml +32 -0
  194. package/docs/icons/icon-insert-below.dsds.yaml +32 -0
  195. package/docs/icons/icon-italic.dsds.yaml +28 -0
  196. package/docs/icons/icon-joystick.dsds.yaml +18 -0
  197. package/docs/icons/icon-json.dsds.yaml +36 -0
  198. package/docs/icons/icon-launch.dsds.yaml +34 -0
  199. package/docs/icons/icon-leave.dsds.yaml +35 -0
  200. package/docs/icons/icon-lemon.dsds.yaml +18 -0
  201. package/docs/icons/icon-link-removed.dsds.yaml +30 -0
  202. package/docs/icons/icon-link.dsds.yaml +36 -0
  203. package/docs/icons/icon-linkedin.dsds.yaml +14 -0
  204. package/docs/icons/icon-list.dsds.yaml +14 -0
  205. package/docs/icons/icon-lock.dsds.yaml +39 -0
  206. package/docs/icons/icon-logo-js.dsds.yaml +18 -0
  207. package/docs/icons/icon-logo-ts.dsds.yaml +18 -0
  208. package/docs/icons/icon-marker-removed.dsds.yaml +14 -0
  209. package/docs/icons/icon-marker.dsds.yaml +14 -0
  210. package/docs/icons/icon-master-detail.dsds.yaml +28 -0
  211. package/docs/icons/icon-menu.dsds.yaml +40 -0
  212. package/docs/icons/icon-microphone-slash.dsds.yaml +14 -0
  213. package/docs/icons/icon-microphone.dsds.yaml +14 -0
  214. package/docs/icons/icon-mobile-device.dsds.yaml +32 -0
  215. package/docs/icons/icon-moon.dsds.yaml +30 -0
  216. package/docs/icons/icon-number.dsds.yaml +30 -0
  217. package/docs/icons/icon-ok-hand.dsds.yaml +18 -0
  218. package/docs/icons/icon-olist.dsds.yaml +36 -0
  219. package/docs/icons/icon-overage.dsds.yaml +42 -0
  220. package/docs/icons/icon-package.dsds.yaml +34 -0
  221. package/docs/icons/icon-panel-left.dsds.yaml +38 -0
  222. package/docs/icons/icon-panel-right.dsds.yaml +40 -0
  223. package/docs/icons/icon-pause.dsds.yaml +32 -0
  224. package/docs/icons/icon-pin-filled.dsds.yaml +28 -0
  225. package/docs/icons/icon-pin-removed.dsds.yaml +14 -0
  226. package/docs/icons/icon-pin.dsds.yaml +32 -0
  227. package/docs/icons/icon-play.dsds.yaml +32 -0
  228. package/docs/icons/icon-plug.dsds.yaml +35 -0
  229. package/docs/icons/icon-presentation.dsds.yaml +18 -0
  230. package/docs/icons/icon-progress50.dsds.yaml +14 -0
  231. package/docs/icons/icon-progress75.dsds.yaml +14 -0
  232. package/docs/icons/icon-projects.dsds.yaml +14 -0
  233. package/docs/icons/icon-publish.dsds.yaml +38 -0
  234. package/docs/icons/icon-read-only.dsds.yaml +36 -0
  235. package/docs/icons/icon-redo.dsds.yaml +38 -0
  236. package/docs/icons/icon-refresh.dsds.yaml +38 -0
  237. package/docs/icons/icon-remove-circle.dsds.yaml +14 -0
  238. package/docs/icons/icon-remove.dsds.yaml +30 -0
  239. package/docs/icons/icon-reset.dsds.yaml +40 -0
  240. package/docs/icons/icon-restore.dsds.yaml +45 -0
  241. package/docs/icons/icon-retrieve.dsds.yaml +14 -0
  242. package/docs/icons/icon-retry.dsds.yaml +14 -0
  243. package/docs/icons/icon-revert.dsds.yaml +14 -0
  244. package/docs/icons/icon-robot.dsds.yaml +17 -0
  245. package/docs/icons/icon-rocket.dsds.yaml +34 -0
  246. package/docs/icons/icon-schema.dsds.yaml +36 -0
  247. package/docs/icons/icon-search.dsds.yaml +34 -0
  248. package/docs/icons/icon-select.dsds.yaml +38 -0
  249. package/docs/icons/icon-share.dsds.yaml +36 -0
  250. package/docs/icons/icon-sort.dsds.yaml +40 -0
  251. package/docs/icons/icon-sparkle.dsds.yaml +26 -0
  252. package/docs/icons/icon-sparkles.dsds.yaml +34 -0
  253. package/docs/icons/icon-spinner.dsds.yaml +38 -0
  254. package/docs/icons/icon-split-horizontal.dsds.yaml +32 -0
  255. package/docs/icons/icon-split-vertical.dsds.yaml +30 -0
  256. package/docs/icons/icon-square.dsds.yaml +18 -0
  257. package/docs/icons/icon-stack-compact.dsds.yaml +30 -0
  258. package/docs/icons/icon-stack.dsds.yaml +44 -0
  259. package/docs/icons/icon-star-filled.dsds.yaml +48 -0
  260. package/docs/icons/icon-star.dsds.yaml +51 -0
  261. package/docs/icons/icon-stop.dsds.yaml +32 -0
  262. package/docs/icons/icon-strikethrough.dsds.yaml +28 -0
  263. package/docs/icons/icon-string.dsds.yaml +38 -0
  264. package/docs/icons/icon-sun.dsds.yaml +30 -0
  265. package/docs/icons/icon-sync.dsds.yaml +36 -0
  266. package/docs/icons/icon-tablet-device.dsds.yaml +30 -0
  267. package/docs/icons/icon-tag.dsds.yaml +32 -0
  268. package/docs/icons/icon-tags.dsds.yaml +36 -0
  269. package/docs/icons/icon-target.dsds.yaml +14 -0
  270. package/docs/icons/icon-task.dsds.yaml +30 -0
  271. package/docs/icons/icon-terminal.dsds.yaml +30 -0
  272. package/docs/icons/icon-text.dsds.yaml +32 -0
  273. package/docs/icons/icon-th-large.dsds.yaml +34 -0
  274. package/docs/icons/icon-th-list.dsds.yaml +30 -0
  275. package/docs/icons/icon-thumbs-down.dsds.yaml +27 -0
  276. package/docs/icons/icon-thumbs-up.dsds.yaml +30 -0
  277. package/docs/icons/icon-tiers.dsds.yaml +18 -0
  278. package/docs/icons/icon-timeline.dsds.yaml +32 -0
  279. package/docs/icons/icon-toggle-arrow-right.dsds.yaml +39 -0
  280. package/docs/icons/icon-token.dsds.yaml +30 -0
  281. package/docs/icons/icon-transfer.dsds.yaml +32 -0
  282. package/docs/icons/icon-translate.dsds.yaml +32 -0
  283. package/docs/icons/icon-trash.dsds.yaml +34 -0
  284. package/docs/icons/icon-trend-upward.dsds.yaml +42 -0
  285. package/docs/icons/icon-triangle-outline.dsds.yaml +18 -0
  286. package/docs/icons/icon-trolley.dsds.yaml +18 -0
  287. package/docs/icons/icon-truncate.dsds.yaml +18 -0
  288. package/docs/icons/icon-twitter.dsds.yaml +18 -0
  289. package/docs/icons/icon-ulist.dsds.yaml +36 -0
  290. package/docs/icons/icon-unarchive.dsds.yaml +32 -0
  291. package/docs/icons/icon-underline.dsds.yaml +28 -0
  292. package/docs/icons/icon-undo.dsds.yaml +34 -0
  293. package/docs/icons/icon-unknown.dsds.yaml +36 -0
  294. package/docs/icons/icon-unlink.dsds.yaml +32 -0
  295. package/docs/icons/icon-unlock.dsds.yaml +41 -0
  296. package/docs/icons/icon-unpublish.dsds.yaml +38 -0
  297. package/docs/icons/icon-upload.dsds.yaml +40 -0
  298. package/docs/icons/icon-user.dsds.yaml +34 -0
  299. package/docs/icons/icon-users.dsds.yaml +34 -0
  300. package/docs/icons/icon-versions.dsds.yaml +14 -0
  301. package/docs/icons/icon-video.dsds.yaml +32 -0
  302. package/docs/icons/icon-warning-filled.dsds.yaml +14 -0
  303. package/docs/icons/icon-warning-outline.dsds.yaml +38 -0
  304. package/docs/icons/icon-wrench.dsds.yaml +18 -0
  305. package/docs/icons.dsds.yaml +768 -0
  306. package/docs/index.dsds.yaml +506 -0
  307. package/docs/overview/api-essentials.dsds.yaml +221 -0
  308. package/docs/overview/component-reference.dsds.yaml +213 -0
  309. package/docs/overview/installation.dsds.yaml +254 -0
  310. package/docs/overview/quick-start.dsds.yaml +317 -0
  311. package/docs/patterns/confirmation-dialogs.dsds.yaml +140 -0
  312. package/docs/patterns/error-messaging.dsds.yaml +58 -0
  313. package/docs/patterns/forms.dsds.yaml +362 -0
  314. package/docs/patterns/layouts.dsds.yaml +403 -0
  315. package/docs/patterns/loading-states.dsds.yaml +41 -0
  316. package/docs/patterns/messaging.dsds.yaml +72 -0
  317. package/docs/patterns/navigation.dsds.yaml +153 -0
  318. package/docs/patterns/responsive.dsds.yaml +590 -0
  319. package/docs/tokens/color.dsds.yaml +1158 -0
  320. package/docs/tokens/container-widths.dsds.yaml +131 -0
  321. package/docs/tokens/content.dsds.yaml +258 -0
  322. package/docs/tokens/content.tokens.json +180 -0
  323. package/docs/tokens/dtcg/README.md +41 -0
  324. package/docs/tokens/dtcg/css/color.css +107 -0
  325. package/docs/tokens/dtcg/css/container.css +12 -0
  326. package/docs/tokens/dtcg/css/fontFamily.css +10 -0
  327. package/docs/tokens/dtcg/css/fontWeight.css +10 -0
  328. package/docs/tokens/dtcg/css/index.css +12 -0
  329. package/docs/tokens/dtcg/css/radius.css +14 -0
  330. package/docs/tokens/dtcg/css/semantic.css +42 -0
  331. package/docs/tokens/dtcg/css/shadow.css +22 -0
  332. package/docs/tokens/dtcg/css/space.css +16 -0
  333. package/docs/tokens/dtcg/css/typography.css +67 -0
  334. package/docs/tokens/dtcg/json/color.tokens.json +911 -0
  335. package/docs/tokens/dtcg/json/container.tokens.json +44 -0
  336. package/docs/tokens/dtcg/json/fontFamily.tokens.json +10 -0
  337. package/docs/tokens/dtcg/json/fontWeight.tokens.json +18 -0
  338. package/docs/tokens/dtcg/json/radius.tokens.json +58 -0
  339. package/docs/tokens/dtcg/json/semantic.tokens.json +372 -0
  340. package/docs/tokens/dtcg/json/shadow.tokens.json +599 -0
  341. package/docs/tokens/dtcg/json/space.tokens.json +72 -0
  342. package/docs/tokens/dtcg/json/typography.tokens.json +354 -0
  343. package/docs/tokens/font-family.dsds.yaml +79 -0
  344. package/docs/tokens/font-weight.dsds.yaml +103 -0
  345. package/docs/tokens/radius.dsds.yaml +153 -0
  346. package/docs/tokens/semantic.dsds.yaml +397 -0
  347. package/docs/tokens/shadow.dsds.yaml +125 -0
  348. package/docs/tokens/space.dsds.yaml +185 -0
  349. package/docs/tokens/typography.dsds.yaml +316 -0
  350. package/llms.txt +108 -0
  351. package/package.json +6 -3
  352. package/skills/sanity-ui-5/SKILL.md +158 -0
  353. package/skills/sanity-ui-5/references/component-choice.md +37 -0
  354. package/skills/sanity-ui-5/references/components.md +145 -0
  355. package/skills/sanity-ui-5/references/forms-and-accessibility.md +189 -0
  356. package/skills/sanity-ui-5/references/migrating-from-v3.md +250 -0
  357. package/skills/sanity-ui-5/references/props-and-imports.md +169 -0
  358. package/skills/sanity-ui-5/references/setup.md +177 -0
  359. package/skills/sanity-ui-5/references/silent-failures.md +33 -0
  360. package/skills/sanity-ui-5/references/taste.md +53 -0
  361. package/skills/sanity-ui-5/references/tone-and-color.md +55 -0
  362. package/src/components/button/Button.tsx +14 -3
  363. package/src/components/button/button.css +23 -25
  364. package/src/components/button/button.props.ts +4 -0
  365. package/src/components/code/code.props.ts +3 -2
  366. package/src/components/eyebrow/Eyebrow.tsx +8 -3
  367. package/src/components/eyebrow/eyebrow.props.ts +10 -2
  368. package/src/components/heading/Heading.tsx +1 -1
  369. package/src/components/heading/heading.props.ts +4 -3
  370. package/src/components/popover/Popover.tsx +4 -3
  371. package/src/components/popover/popover.css +5 -3
  372. package/src/components/popover/popover.props.ts +9 -0
  373. package/src/components/text/text.props.ts +6 -1
  374. package/src/css/classes/system/typography.css +6 -6
  375. package/src/css/tokens/semantic.css +7 -7
  376. package/src/props/typography.ts +1 -5
  377. package/src/version.ts +2 -2
@@ -0,0 +1,233 @@
1
+ kind: component
2
+ id: heading
3
+ name: Heading
4
+ description: Displays heading text to create logical hierarchy and page structure.
5
+ metadata:
6
+ tags: [typography, heading, title, hierarchy, semantic, h1, h2, h3, h4, h5, h6, section]
7
+ status:
8
+ status: stable
9
+ sections:
10
+ - kind: guidelines
11
+ for: all
12
+ framing: when-to-use
13
+ title: When to use
14
+ items:
15
+ - level: should
16
+ statement: To establish the semantic structure of a page (page title, section header, subsection).
17
+ - level: should
18
+ statement: To group text and elements into logical, navigable sections.
19
+ - level: should-not
20
+ statement: For visual emphasis or decorative purposes (stat values, hero numbers, big quotes). Use Text with size 3+ instead.
21
+ alternatives:
22
+ - to: text
23
+ - level: should-not
24
+ statement: To emphasize text inside a paragraph. Use Text with weight='bold'.
25
+ alternatives:
26
+ - to: text
27
+ - kind: guidelines
28
+ for: agent
29
+ framing: when-to-use
30
+ title: When to use
31
+ items:
32
+ - level: should-not
33
+ statement: Don't use Heading for body copy and non-structural typographic emphasis. Use Text instead.
34
+ alternatives:
35
+ - to: text
36
+ - level: should-not
37
+ statement: Don't use Heading to label a TextInput, Select or other input. Use a label element linked with htmlFor instead.
38
+ alternatives:
39
+ - to: text
40
+ note: Visible label text for a form field, set with as='label'.
41
+ - kind: guidelines
42
+ for: all
43
+ framing: how-to-use
44
+ items:
45
+ - refs:
46
+ - to: semantics#heading-as-explicit
47
+ rel: same-as
48
+ - refs:
49
+ - to: semantics#heading-level-from-outline
50
+ rel: same-as
51
+ - refs:
52
+ - to: semantics#one-h1-per-page
53
+ rel: same-as
54
+ - refs:
55
+ - to: semantics#heading-levels-sequential
56
+ rel: same-as
57
+ - id: heading-no-icons
58
+ level: should-not
59
+ statement: A Heading carries no icon — not a leading glyph, not a trailing one, and not an Icon composed beside the heading text. A heading is found by its level and its position in the outline, not by decoration. When a section genuinely needs a symbol, place it on an adjacent element that has its own accessible name rather than inside the Heading.
60
+ checks:
61
+ - href: ../evals/cases.yaml
62
+ role: agent-test
63
+ checkedBy: assisted
64
+ refines:
65
+ - to: shared-foundations#no-emojis
66
+ $extensions:
67
+ io.jev:
68
+ type: boolean
69
+ - id: heading-is-semantic-not-decorative
70
+ level: must-not
71
+ statement: Don't use Heading for visual differentiation alone — use Text with weight or size instead. Every Heading instance should introduce or label a distinct content section, not just make text appear large, bold, or visually prominent.
72
+ example:
73
+ title: How to satisfy this
74
+ description: Read the heading text in context and confirm it functions as a title or label for the content that follows. Check that removing the heading would leave a section without a navigable label in the page outline.
75
+ alternatives:
76
+ - to: text
77
+ checkedBy: manual
78
+ - id: heading-no-emojis
79
+ level: must-not
80
+ statement: Never use an emoji as a start-aligned icon on a Heading, and never place an emoji anywhere in heading text. In the leading position an emoji reads as an icon but carries none of Icon's sizing, alignment, or accessible-name behaviour, and assistive technology announces its CLDR name as part of the heading — corrupting the outline that heading levels exist to provide.
81
+ checks:
82
+ - href: ../evals/cases.yaml
83
+ role: agent-test
84
+ checkedBy: assisted
85
+ refines:
86
+ - to: shared-foundations#no-emojis
87
+ $extensions:
88
+ io.jev:
89
+ type: boolean
90
+ - kind: guidelines
91
+ for: agent
92
+ framing: how-to-use
93
+ items:
94
+ - level: must
95
+ statement: Set `as` on every Heading to `h1` through `h6`. `as` is required, and the level comes from the page outline. Use `size` for the visual size.
96
+ - level: must-not
97
+ statement: Don't pass a `level` prop to Heading. It has none. Use `as` for the level.
98
+ - level: must-not
99
+ statement: Don't pass `weight` or `muted` to Heading. It has neither. Use Text for other weights or muted text.
100
+ - level: must-not
101
+ statement: "Heading only accepts heading elements for `as`: `h1` through `h6`. Passing `as='p'`, `as='div'`, or any non-heading element causes a TypeScript error. For styled non-heading text, use `Text` with `size` and `weight`."
102
+ - kind: guidelines
103
+ for: all
104
+ title: Content
105
+ tags: [content]
106
+ items:
107
+ - refs:
108
+ - to: content-guidelines#sentence-case-all-system-set
109
+ rel: same-as
110
+ - level: should
111
+ statement: Keep headings to one sentence.
112
+ - level: should
113
+ statement: Headings should describe the content of the section they introduce.
114
+ - level: should-not
115
+ statement: Do not end headings with a period unless the heading is a question.
116
+
117
+ - kind: guidelines
118
+ for: all
119
+ title: Accessibility
120
+ tags: [accessibility]
121
+ items:
122
+ - level: should
123
+ statement: '**Zoom and reflow.** Headings must stay legible at 400% zoom / 320px viewport width (WCAG 1.4.10 AA). Long headings should wrap, not clip. When using `truncate`, verify the clipped text still makes sense. Spacing tokens use `rem` and scale with user font-size settings (WCAG 1.4.12 AA).'
124
+ alternatives:
125
+ - to: text
126
+ note: Body copy and UI text, not semantic headings
127
+ sourceFiles:
128
+ - platform: react
129
+ file: packages/ui/src/components/heading/Heading.tsx
130
+ imports:
131
+ - platform: react
132
+ code: import { Heading } from '@sanity/ui'
133
+ package: '@sanity/ui'
134
+ traits:
135
+ - traitType: variant
136
+ kind: enum
137
+ id: size
138
+ description: CSS font-size property.
139
+ values:
140
+ - id: '0'
141
+ description: Smallest. UI chrome headings — toolbars, sidebars, compact panels.
142
+ - id: '1'
143
+ description: Small. Content sub-section titles.
144
+ - id: '2'
145
+ description: Medium (default). Standard section headings.
146
+ - id: '3'
147
+ description: Large. Document titles in high-density layouts.
148
+ - id: '4'
149
+ description: Extra large. Document titles in moderate-density layouts.
150
+ - id: '5'
151
+ description: Largest size. Document titles in low-density layouts.
152
+ - traitType: variant
153
+ kind: enum
154
+ id: tone
155
+ description: Semantic text color.
156
+ values:
157
+ - id: neutral
158
+ description: Default. No semantic meaning.
159
+ - id: suggest
160
+ description: Suggestions or informational content. Pair with InfoOutlineIcon.
161
+ - id: positive
162
+ description: Success, published, healthy. Pair with CheckmarkIcon.
163
+ - id: caution
164
+ description: Needs attention. Pair with WarningOutlineIcon.
165
+ - id: critical
166
+ description: Error, failed, rejected. Pair with ErrorOutlineIcon.
167
+ - traitType: variant
168
+ kind: boolean
169
+ id: trim
170
+ description: Removes extra whitespace above and below the text box for precise alignment with icons or badges.
171
+ - traitType: variant
172
+ kind: enum
173
+ id: align
174
+ description: CSS text-align property.
175
+ values:
176
+ - id: left
177
+ description: Default. Titles, section headings, group headings.
178
+ - id: center
179
+ description: Rare. Empty-state titles.
180
+ - id: right
181
+ description: Rarely appropriate in UI.
182
+ $extensions:
183
+ com.sanity.ui:
184
+ implementationStatus:
185
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
186
+ implemented: true
187
+ migrationGuide:
188
+ context: 'Migration guide for this component, covering the codemod and the changes it cannot make. Held as an extension because it is temporary: migration tooling and porting agents read it, and it should be dropped when Sanity UI 3 support ends.'
189
+ codemod: |-
190
+ Heading now defaults to `<h2>` (v3 defaulted to `<div>`) — always set `as` explicitly. `textOverflow` is replaced by `truncate` — both `"ellipsis"` and `"clip"` map to `truncate={1}`. `accent` is removed — use `tone` instead. `trim` and margin props are new.
191
+
192
+ Run the codemod: `pnpx @sanity/ui-codemod latest:heading --paths <paths> --toPackage @sanity/ui`.
193
+ guidance: |-
194
+ Heading in the new system has a different approach to semantic levels and new typography props.
195
+
196
+ ### Key differences
197
+
198
+ - v5 components use CSS classes with a static stylesheet as opposed to `styled-components`.
199
+ - v3 Heading defaulted to rendering a `<div>`. In v5, `as` is required. Omitting it is a type error.
200
+ - `textOverflow` replaced by `truncate`. For single-line truncation, use `truncate={1}`. For multi-line, use `truncate={2}` or higher.
201
+ - `accent` removed. Use `tone` or a parent with a semantic tone.
202
+ - `trim` added to remove leading/trailing whitespace from the text box for precise alignment.
203
+ - Margin props added. Heading now accepts `margin`, `marginX`, `marginY`, and per-side margin props.
204
+
205
+ ### Detailed list of differences
206
+
207
+ | v3 prop | v5 prop | Notes |
208
+ | :---- | :---- | :---- |
209
+ | `accent` | — | Removed. No accent color prop in the new version. |
210
+ | `weight` | — | Removed. Heading is bold by default. Use `Text` for other weights. |
211
+ | `muted` | — | Removed. Use `Text` with `muted` for secondary text. |
212
+ | `textOverflow="ellipsis"` | `truncate={1}` | The codemod maps both `"ellipsis"` and `"clip"` to `truncate={1}`. |
213
+ | — | `trim` | New. Applies `text-box-trim` to remove whitespace above and below the text box. |
214
+ | — | `truncate` | New. Limit to N lines. Replaces `textOverflow` and adds multi-line clamping. |
215
+ | — | `margin*` | New. Heading accepts margin props directly (0–9, `'auto'`). |
216
+
217
+ ### Breaking changes
218
+
219
+ - `as` is required. v3 defaulted to `<div>`, and v5 has no default. A `<Heading>` without `as` fails to compile.
220
+ - `textOverflow` prop removed. `<Heading textOverflow="ellipsis">` does nothing. Use `<Heading truncate={1}>`.
221
+ - `accent` prop removed. `<Heading accent>` does nothing. Use `tone=”suggest”` or a parent element with a semantic tone for colored headings.
222
+ - `weight` and `muted` removed. Heading is bold by default. Use `Text` for other weights or muted text.
223
+ - `styled-components` no longer used. Custom styled-components extensions like `styled(Heading)` will not work.
224
+
225
+ ### Codemod
226
+
227
+ A codemod is available to make the changes above less painful. Run the command below with the path to the file or directory you want to migrate. Pass a space-delimited list for multiple paths.
228
+
229
+ ```
230
+ pnpx @sanity/ui-codemod latest:heading --paths <paths> --toPackage @sanity/ui
231
+ ```
232
+
233
+ Some components may need manual review. When a component cannot be migrated or has unclear changes, the codemod adds a “UI-POC-CODEMOD TODO” comment.
@@ -0,0 +1,60 @@
1
+ kind: component
2
+ id: hotkeys
3
+ name: Hotkeys
4
+ description: Presents multi-key keyboard shortcuts.
5
+ metadata:
6
+ tags: [keyboard, shortcut, hotkey, keycap, display, hotkeys, keyboard shortcut, modifier]
7
+ status:
8
+ status: experimental
9
+ note: Exported from @sanity/ui 5.0.0-alpha.16, marked @alpha in the source. Its API can change without notice.
10
+ sections:
11
+ - kind: guidelines
12
+ for: all
13
+ framing: when-to-use
14
+ title: When to use
15
+ items:
16
+ - level: should
17
+ statement: To show keyboard shortcuts next to menu items or toolbar actions.
18
+ - level: should
19
+ statement: For help dialogs or keyboard shortcut cheat sheets.
20
+ - level: should
21
+ statement: Tooltips that reveal the shortcut for an action.
22
+ - level: should-not
23
+ statement: Inline references to a single key within running text — use KBD instead.
24
+ alternatives:
25
+ - to: kbd
26
+ - kind: guidelines
27
+ for: all
28
+ framing: how-to-use
29
+ items:
30
+ - level: should
31
+ statement: 'Use platform-appropriate labels: Ctrl on Windows/Linux, ⌘ on Mac. Detect the platform at runtime.'
32
+ - level: should
33
+ statement: Keep shortcuts to 2–3 keys. Anything longer is difficult to press and read.
34
+ - level: should
35
+ statement: Pair the key caps with a visible action label so the shortcut has context.
36
+ - level: must-not
37
+ statement: Don't display more than 3 keys in a single Hotkeys instance.
38
+ - level: must-not
39
+ statement: Don't rely on the Hotkeys display as the only way to discover a feature.
40
+ - level: must-not
41
+ statement: Don't use Hotkeys inside body text — use KBD for inline key references.
42
+ - kind: guidelines
43
+ for: agent
44
+ framing: how-to-use
45
+ items:
46
+ - level: should
47
+ statement: Detect the platform at runtime and pass the correct platform-specific key labels.
48
+ - level: must-not
49
+ statement: 'Using Hotkeys as the sole mechanism to discover a feature. Instead: Shortcuts should supplement visible UI — never gate functionality.'
50
+ alternatives:
51
+ - to: kbd
52
+ refs:
53
+ - href: https://www.figma.com/design/NWmchNlsNdG66VBaCsTdSL/pjo-ui4-component-buildout?node-id=144-7
54
+ rel: design
55
+ role: Figma component
56
+ $extensions:
57
+ com.sanity.ui:
58
+ implementationStatus:
59
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
60
+ implemented: true
@@ -0,0 +1,227 @@
1
+ kind: component
2
+ id: icon-button
3
+ name: IconButton
4
+ description: Triggers an action using an icon as the primary communicator.
5
+ metadata:
6
+ tags: [action, button, icon, icon-only, interactive, toolbar, destructive, loading]
7
+ status:
8
+ status: beta
9
+ sections:
10
+ - kind: guidelines
11
+ for: all
12
+ framing: when-to-use
13
+ title: When to use
14
+ items:
15
+ - level: must
16
+ statement: For icon-only buttons
17
+ - level: should
18
+ statement: In toolbars where space is limited.
19
+ - level: should
20
+ statement: In button groups with many actions where labels would clutter the layout.
21
+ - level: should
22
+ statement: As action triggers in list rows — such as edit, delete, or more options.
23
+ - level: should-not
24
+ statement: When users may not know the icon. Use Button with iconStart and text instead.
25
+ alternatives:
26
+ - to: button
27
+ - level: must-not
28
+ statement: In dialogs or confirmation prompts. Use Button with a visible label.
29
+ alternatives:
30
+ - to: button
31
+ - refs:
32
+ - to: forms#no-pressed-for-form-values
33
+ rel: relates-to
34
+ - kind: guidelines
35
+ for: all
36
+ framing: how-to-use
37
+ items:
38
+ - id: aria-label-required
39
+ level: must
40
+ statement: "Every IconButton needs an `aria-label`. It is the button's only accessible name. Describe the action, not the icon: 'Delete document', not 'Trash'."
41
+ example:
42
+ title: How to satisfy this
43
+ description: Pass aria-label directly on the IconButton element. Describe the action — use 'Delete document', not 'Trash'.
44
+ checks:
45
+ - href: eslint:sanity-ui/require-icon-button-aria-label
46
+ role: lint-rule
47
+ note: eslint rule
48
+ checkedBy: automated
49
+ refines:
50
+ - to: content-guidelines#name-the-action
51
+ - to: shared-foundations#icon-only-control-needs-name
52
+ - refs:
53
+ - to: shared-foundations#tone-signals-state
54
+ rel: same-as
55
+ - refs:
56
+ - to: shared-foundations#tone-paired-with-second-channel
57
+ rel: same-as
58
+ - id: tooltip-paired
59
+ level: should
60
+ statement: Pair each IconButton with a Tooltip so its label is visible on hover and keyboard focus.
61
+ example:
62
+ title: How to satisfy this
63
+ description: Wrap IconButton with Tooltip and set the tooltip content to match the aria-label.
64
+ checkedBy: manual
65
+ - id: no-tooltip-on-disabled
66
+ refs:
67
+ - to: tooltip#no-tooltip-on-disabled
68
+ rel: same-as
69
+ example:
70
+ title: How to satisfy this
71
+ description: Remove or skip rendering the Tooltip when the button is disabled. Add a nearby status message or info icon to explain why the action is blocked.
72
+ checkedBy: manual
73
+ refines:
74
+ - to: accessibility-guidelines#disabled-control-no-tooltip
75
+ - id: no-icon-button-in-dialogs
76
+ level: must-not
77
+ statement: Don't use IconButton in dialogs or decision prompts — use Button with a visible label instead.
78
+ example:
79
+ title: How to satisfy this
80
+ description: Use Button with text prop for confirm and cancel actions in dialogs.
81
+ checkedBy: manual
82
+ - kind: guidelines
83
+ for: agent
84
+ framing: how-to-use
85
+ items:
86
+ - level: must
87
+ statement: '`icon` and `aria-label` are both required. Omitting either causes a TypeScript error.'
88
+ - level: must
89
+ statement: "Use tone='critical' for destructive actions, with an icon that signals the action, like TrashIcon."
90
+ refines:
91
+ - to: shared-foundations#destructive-actions-use-critical-tone
92
+ - level: should
93
+ statement: IconButton defaults to level='primary', like Button. Set level='tertiary' on toolbar and list row actions. Leave `level` out only on the single most critical action in a group.
94
+ - level: should
95
+ statement: Pass `ref` straight to IconButton when you need the rendered element — to move focus to it, or to anchor a Popover to its trigger. It reaches the underlying element; there is no wrapper to add and no forwardRef to wait for.
96
+ - level: must-not
97
+ statement: IconButton does not accept Box layout props. Wrap in Box to control sizing or position.
98
+ - level: must-not
99
+ statement: 'Do not hand-write a native `<button>` to get a `ref` or an attribute the prop table does not list. Standard DOM attributes and event handlers — `ref`, `id`, `title`, `tabIndex`, `data-*`, `aria-*`, `onKeyDown` — pass through to the rendered element, so a stripped-down native button is never the way to reach one.'
100
+ checkedBy: assisted
101
+ - kind: guidelines
102
+ for: all
103
+ title: Accessibility
104
+ description: 'Target conformance: WCAG Level AA.'
105
+ tags: [accessibility]
106
+ items:
107
+ - refs:
108
+ - to: shared-foundations#aria-disabled-keeps-focus
109
+ rel: same-as
110
+ - refs:
111
+ - to: shared-foundations#aria-pressed-toggle
112
+ rel: same-as
113
+ - kind: section
114
+ for: agent
115
+ freeform:
116
+ - title: Required props
117
+ body: |-
118
+ Both `icon` and `aria-label` are required — omitting either causes a TypeScript error.
119
+
120
+ ```tsx
121
+ <IconButton icon={AddIcon} aria-label="Add item" />
122
+ ```
123
+
124
+ `aria-label` is the only accessible name. Screen readers read it aloud. Describe the action, not the icon: `aria-label="Delete document"`, not `aria-label="Trash"`.
125
+ - title: Tooltip pairing
126
+ body: |-
127
+ Always wrap IconButton in a Tooltip so the label is visible on hover and keyboard focus.
128
+
129
+ ```tsx
130
+ <Tooltip content="Delete document">
131
+ <IconButton icon={TrashIcon} aria-label="Delete document" tone="critical" />
132
+ </Tooltip>
133
+ ```
134
+
135
+ Don't place a Tooltip on a disabled or loading IconButton. See Tooltip for the rule.
136
+
137
+ uses:
138
+ - to: icons
139
+ note: IconButton requires an icon from @sanity/icons as its icon prop.
140
+ alternatives:
141
+ - to: button
142
+ refs:
143
+ - href: https://www.figma.com/design/5mhVqXlldJEEB2VWZeKQ4i/Sanity-UI?node-id=32594-1782
144
+ rel: design
145
+ role: Figma component (v5)
146
+ sourceFiles:
147
+ - platform: react
148
+ file: packages/ui/src/components/icon-button/IconButton.tsx
149
+ imports:
150
+ - platform: react
151
+ code: import { IconButton } from '@sanity/ui'
152
+ package: '@sanity/ui'
153
+ traits:
154
+ - traitType: variant
155
+ kind: enum
156
+ id: level
157
+ description: Controls the visual weight of the button. Use tertiary for most actions, secondary for important but non-primary actions, and primary sparingly for the single most critical action per section.
158
+ values:
159
+ - id: tertiary
160
+ description: No background, low visual weight. For rare or background actions such as close or dismiss.
161
+ - id: secondary
162
+ description: Outlined/bordered look. For common but not the most critical actions.
163
+ - id: primary
164
+ description: Solid background, full visual weight. The most critical action in a group.
165
+ - traitType: variant
166
+ kind: enum
167
+ id: tone
168
+ description: Semantic color of the button.
169
+ values:
170
+ - id: neutral
171
+ description: Neutral gray for general toolbar and list actions.
172
+ - id: critical
173
+ description: Red for destructive or unsafe actions. Always pair with an icon that signals a destructive action, like TrashIcon.
174
+ - traitType: variant
175
+ kind: enum
176
+ id: density
177
+ description: Composite prop setting padding and minimum hit area together.
178
+ values:
179
+ - id: regular
180
+ description: Padding 2, minimum size 25x25px. Default.
181
+ - id: loose
182
+ description: Padding 3, minimum size 33x33px. For spacious contexts.
183
+ - traitType: variant
184
+ kind: enum
185
+ id: type
186
+ description: The native HTML type attribute passes through to the underlying <button> element.
187
+ values:
188
+ - id: button
189
+ description: Standard button (default). For all actions outside of a form context.
190
+ - id: submit
191
+ description: Submits form data.
192
+ - id: reset
193
+ description: Resets form data.
194
+ - traitType: state
195
+ kind: boolean
196
+ id: loading
197
+ description: Button action is in progress. Sets aria-busy and aria-disabled, hides the icon behind a spinner, and ignores clicks. The button stays focusable. Use for tasks over 200ms. For tasks over three seconds, show a confirmation message when the task completes.
198
+ - traitType: state
199
+ kind: boolean
200
+ id: enabled
201
+ description: Button's standard state, clickable.
202
+ - traitType: state
203
+ kind: boolean
204
+ id: hovered
205
+ description: Cursor is resting over the button.
206
+ - traitType: state
207
+ kind: boolean
208
+ id: active
209
+ description: Button is being pressed down (:active). Not the same as the pressed prop.
210
+ - traitType: variant
211
+ kind: boolean
212
+ id: pressed
213
+ description: Toggle state for a button that switches a view, filter, or option on and off. Sets aria-pressed to the given value and shows the pressed style.
214
+ - traitType: state
215
+ kind: boolean
216
+ id: focused
217
+ description: Button has keyboard focus.
218
+ - traitType: state
219
+ kind: boolean
220
+ id: disabled
221
+ description: Interaction is blocked. Removed from tab order via HTML disabled. Only use when the action could be harmful. Icon-only buttons give no context when disabled — add a nearby status message or info icon to explain why the action is blocked.
222
+
223
+ $extensions:
224
+ com.sanity.ui:
225
+ implementationStatus:
226
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
227
+ implemented: true