@commercetools/nimbus-mcp 3.2.0 → 3.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 (223) hide show
  1. package/README.md +9 -1
  2. package/data/docs/route-manifest.json +1608 -143
  3. package/data/docs/routes/components-buttons-button.json +25 -2
  4. package/data/docs/routes/components-chat-chat-message-list.json +448 -0
  5. package/data/docs/routes/components-chat-chat-message.json +580 -0
  6. package/data/docs/routes/components-content-markdown.json +548 -0
  7. package/data/docs/routes/components-data-display-item-group.json +413 -0
  8. package/data/docs/routes/components-data-display-item.json +611 -0
  9. package/data/docs/routes/components-feedback-activity-indicator.json +396 -0
  10. package/data/docs/routes/components-feedback-skeleton.json +481 -0
  11. package/data/docs/routes/components-feedback-skeletoncircle.json +429 -0
  12. package/data/docs/routes/components-feedback-skeletontext.json +417 -0
  13. package/data/docs/routes/components-feedback-tooltip.json +23 -1
  14. package/data/docs/routes/components-inputs-drop-zone.json +562 -0
  15. package/data/docs/routes/components-inputs-file-trigger.json +421 -0
  16. package/data/docs/routes/components-inputs-range-slider.json +633 -0
  17. package/data/docs/routes/components-inputs-slider.json +611 -0
  18. package/data/docs/routes/components-layout-splitter.json +3 -3
  19. package/data/docs/routes/components-media-avatar.json +16 -5
  20. package/data/docs/routes/components-navigation-breadcrumbs.json +565 -0
  21. package/data/docs/routes/components-navigation-menu.json +1 -1
  22. package/data/docs/routes/components-navigation-tabnav.json +80 -14
  23. package/data/docs/routes/components-navigation-tabs.json +44 -11
  24. package/data/docs/routes/components-navigation-tree.json +445 -0
  25. package/data/docs/routes/home-getting-started-mcp-server-overview.json +2 -2
  26. package/data/docs/routes/home-getting-started-mcp-server-setup.json +2 -2
  27. package/data/docs/routes/icons.json +3 -3
  28. package/data/docs/routes/patterns-buttons-floating-action-button.json +392 -0
  29. package/data/docs/routes/patterns-buttons.json +58 -0
  30. package/data/docs/search-index.json +1 -1
  31. package/data/docs/types/AccordionContent.json +24 -24
  32. package/data/docs/types/AccordionHeader.json +88 -88
  33. package/data/docs/types/AccordionItem.json +20 -20
  34. package/data/docs/types/AccordionRoot.json +14 -14
  35. package/data/docs/types/ActivityIndicator.json +202 -0
  36. package/data/docs/types/AlertDescription.json +8 -8
  37. package/data/docs/types/AlertDismissButton.json +98 -81
  38. package/data/docs/types/AlertTitle.json +8 -8
  39. package/data/docs/types/Avatar.json +19 -2
  40. package/data/docs/types/Badge.json +2 -2
  41. package/data/docs/types/Body.json +6 -6
  42. package/data/docs/types/Box.json +6 -6
  43. package/data/docs/types/Breadcrumbs.json +12 -0
  44. package/data/docs/types/BreadcrumbsItem.json +296 -0
  45. package/data/docs/types/BreadcrumbsItemProps.json +9 -0
  46. package/data/docs/types/BreadcrumbsProps.json +9 -0
  47. package/data/docs/types/BreadcrumbsRoot.json +110 -0
  48. package/data/docs/types/Button.json +106 -89
  49. package/data/docs/types/Calendar.json +56 -56
  50. package/data/docs/types/Caption.json +6 -6
  51. package/data/docs/types/CardRoot.json +2 -2
  52. package/data/docs/types/Cell.json +6 -6
  53. package/data/docs/types/ChatMessage.json +12 -0
  54. package/data/docs/types/ChatMessageActions.json +42 -0
  55. package/data/docs/types/ChatMessageAvatar.json +140 -0
  56. package/data/docs/types/ChatMessageBody.json +42 -0
  57. package/data/docs/types/ChatMessageList.json +12 -0
  58. package/data/docs/types/ChatMessageListItem.json +42 -0
  59. package/data/docs/types/ChatMessageListRoot.json +78 -0
  60. package/data/docs/types/ChatMessageMeta.json +42 -0
  61. package/data/docs/types/ChatMessageRoot.json +119 -0
  62. package/data/docs/types/ChatMessageTyping.json +42 -0
  63. package/data/docs/types/Checkbox.json +86 -86
  64. package/data/docs/types/Code.json +11 -11
  65. package/data/docs/types/Column.json +6 -6
  66. package/data/docs/types/ColumnGroup.json +6 -6
  67. package/data/docs/types/ColumnHeader.json +6 -6
  68. package/data/docs/types/ComboBoxListBox.json +70 -70
  69. package/data/docs/types/ComboBoxOption.json +64 -64
  70. package/data/docs/types/ComboBoxPopover.json +91 -70
  71. package/data/docs/types/ComboBoxRoot.json +8 -8
  72. package/data/docs/types/ComboBoxSection.json +24 -24
  73. package/data/docs/types/ComboBoxTrigger.json +6 -6
  74. package/data/docs/types/DataTable.json +2 -2
  75. package/data/docs/types/DataTableBody.json +20 -20
  76. package/data/docs/types/DataTableHeader.json +25 -25
  77. package/data/docs/types/DataTableRoot.json +2 -2
  78. package/data/docs/types/DataTableTable.json +6 -6
  79. package/data/docs/types/DateInput.json +73 -73
  80. package/data/docs/types/DatePicker.json +58 -58
  81. package/data/docs/types/DateRangePicker.json +86 -86
  82. package/data/docs/types/DateRangePickerField.json +86 -86
  83. package/data/docs/types/DefaultPageRoot.json +2 -2
  84. package/data/docs/types/DialogCloseTrigger.json +96 -79
  85. package/data/docs/types/DraggableListField.json +88 -60
  86. package/data/docs/types/DraggableListItem.json +52 -52
  87. package/data/docs/types/DraggableListRoot.json +88 -60
  88. package/data/docs/types/DrawerCloseTrigger.json +96 -79
  89. package/data/docs/types/DropZone.json +161 -0
  90. package/data/docs/types/FieldErrors.json +2 -2
  91. package/data/docs/types/FileTrigger.json +130 -0
  92. package/data/docs/types/Flex.json +22 -22
  93. package/data/docs/types/FloatingActionButton.json +1036 -0
  94. package/data/docs/types/Footer.json +6 -6
  95. package/data/docs/types/FormActionBar.json +1 -1
  96. package/data/docs/types/FormFieldRoot.json +2 -2
  97. package/data/docs/types/Grid.json +24 -24
  98. package/data/docs/types/Group.json +12 -12
  99. package/data/docs/types/Header.json +6 -6
  100. package/data/docs/types/Heading.json +8 -8
  101. package/data/docs/types/Icon.json +4 -4
  102. package/data/docs/types/IconButton.json +106 -89
  103. package/data/docs/types/IconToggleButton.json +71 -71
  104. package/data/docs/types/Image.json +43 -43
  105. package/data/docs/types/Indicator.json +6 -6
  106. package/data/docs/types/InlineSvg.json +2 -2
  107. package/data/docs/types/Item.json +6 -6
  108. package/data/docs/types/ItemActions.json +27 -0
  109. package/data/docs/types/ItemContent.json +27 -0
  110. package/data/docs/types/ItemDescription.json +27 -0
  111. package/data/docs/types/ItemFooter.json +27 -0
  112. package/data/docs/types/ItemGroup.json +12 -0
  113. package/data/docs/types/ItemGroupRoot.json +27 -0
  114. package/data/docs/types/ItemGroupSeparator.json +27 -0
  115. package/data/docs/types/ItemHeader.json +27 -0
  116. package/data/docs/types/ItemMedia.json +56 -0
  117. package/data/docs/types/ItemRoot.json +239 -0
  118. package/data/docs/types/ItemTitle.json +27 -0
  119. package/data/docs/types/Kbd.json +8 -8
  120. package/data/docs/types/Link.json +14 -14
  121. package/data/docs/types/ListIndicator.json +6 -6
  122. package/data/docs/types/ListItem.json +6 -6
  123. package/data/docs/types/ListRoot.json +11 -11
  124. package/data/docs/types/LoadingSpinner.json +2 -2
  125. package/data/docs/types/MakeElementFocusable.json +18 -18
  126. package/data/docs/types/Markdown.json +183 -0
  127. package/data/docs/types/MenuItem.json +62 -62
  128. package/data/docs/types/MenuRoot.json +55 -55
  129. package/data/docs/types/MenuSection.json +30 -30
  130. package/data/docs/types/MenuSubmenuTrigger.json +4 -4
  131. package/data/docs/types/MenuTrigger.json +88 -88
  132. package/data/docs/types/MultilineTextInput.json +104 -104
  133. package/data/docs/types/MultilineTextInputField.json +102 -102
  134. package/data/docs/types/NumberInput.json +86 -86
  135. package/data/docs/types/NumberInputField.json +82 -82
  136. package/data/docs/types/PageContentColumn.json +6 -6
  137. package/data/docs/types/PageContentRoot.json +6 -6
  138. package/data/docs/types/PasswordInput.json +100 -100
  139. package/data/docs/types/PasswordInputField.json +100 -100
  140. package/data/docs/types/ProgressBar.json +13 -13
  141. package/data/docs/types/RadioInputOption.json +56 -56
  142. package/data/docs/types/RadioInputRoot.json +48 -48
  143. package/data/docs/types/RangeCalendar.json +58 -58
  144. package/data/docs/types/RangeSlider.json +337 -0
  145. package/data/docs/types/RangeSliderProps.json +9 -0
  146. package/data/docs/types/Region.json +6 -6
  147. package/data/docs/types/RegionTarget.json +6 -6
  148. package/data/docs/types/RichTextInput.json +2 -2
  149. package/data/docs/types/Root.json +11 -11
  150. package/data/docs/types/Row.json +6 -6
  151. package/data/docs/types/ScrollArea.json +2 -2
  152. package/data/docs/types/SearchInput.json +106 -106
  153. package/data/docs/types/SearchInputField.json +102 -102
  154. package/data/docs/types/SelectOption.json +54 -54
  155. package/data/docs/types/SelectOptionGroup.json +18 -18
  156. package/data/docs/types/SelectOptions.json +64 -64
  157. package/data/docs/types/SelectRoot.json +92 -92
  158. package/data/docs/types/Separator.json +4 -4
  159. package/data/docs/types/SimpleGrid.json +28 -28
  160. package/data/docs/types/Skeleton.json +129 -0
  161. package/data/docs/types/SkeletonCircle.json +103 -0
  162. package/data/docs/types/SkeletonCircleProps.json +9 -0
  163. package/data/docs/types/SkeletonProps.json +9 -0
  164. package/data/docs/types/SkeletonText.json +62 -0
  165. package/data/docs/types/SkeletonTextProps.json +9 -0
  166. package/data/docs/types/Slider.json +337 -0
  167. package/data/docs/types/SlidingIndicatorGeometry.json +9 -0
  168. package/data/docs/types/SlidingIndicatorRects.json +9 -0
  169. package/data/docs/types/SplitButton.json +16 -20
  170. package/data/docs/types/Stack.json +2 -2
  171. package/data/docs/types/StepsRoot.json +2 -2
  172. package/data/docs/types/Switch.json +34 -34
  173. package/data/docs/types/TabNavItem.json +5 -5
  174. package/data/docs/types/TabNavRoot.json +5 -5
  175. package/data/docs/types/TableBody.json +6 -6
  176. package/data/docs/types/TableCaption.json +6 -6
  177. package/data/docs/types/TableCell.json +6 -6
  178. package/data/docs/types/TableColumn.json +6 -6
  179. package/data/docs/types/TableColumnGroup.json +6 -6
  180. package/data/docs/types/TableColumnHeader.json +6 -6
  181. package/data/docs/types/TableFooter.json +6 -6
  182. package/data/docs/types/TableHeader.json +6 -6
  183. package/data/docs/types/TableRoot.json +19 -19
  184. package/data/docs/types/TableRow.json +6 -6
  185. package/data/docs/types/TableScrollArea.json +6 -6
  186. package/data/docs/types/TabsList.json +2 -2
  187. package/data/docs/types/TabsPanel.json +2 -2
  188. package/data/docs/types/TabsPanels.json +2 -2
  189. package/data/docs/types/TabsRoot.json +3 -3
  190. package/data/docs/types/TabsTab.json +2 -2
  191. package/data/docs/types/TagGroupRoot.json +24 -24
  192. package/data/docs/types/TagGroupTag.json +56 -56
  193. package/data/docs/types/TagGroupTagList.json +14 -14
  194. package/data/docs/types/Text.json +8 -8
  195. package/data/docs/types/TextInput.json +102 -102
  196. package/data/docs/types/TextInputField.json +100 -100
  197. package/data/docs/types/TimeInput.json +68 -68
  198. package/data/docs/types/ToggleButton.json +73 -73
  199. package/data/docs/types/ToggleButtonGroupButton.json +30 -30
  200. package/data/docs/types/ToggleButtonGroupRoot.json +20 -20
  201. package/data/docs/types/Toolbar.json +9 -9
  202. package/data/docs/types/TooltipContent.json +28 -28
  203. package/data/docs/types/TooltipRoot.json +16 -16
  204. package/data/docs/types/Tree.json +12 -0
  205. package/data/docs/types/TreeIndicator.json +828 -0
  206. package/data/docs/types/TreeItem.json +559 -0
  207. package/data/docs/types/TreeItemContent.json +27 -0
  208. package/data/docs/types/TreeRoot.json +636 -0
  209. package/data/docs/types/TreeSubTree.json +40 -0
  210. package/data/docs/types/VisuallyHidden.json +6 -6
  211. package/data/docs/types/createItemsFromCsvDrop.json +4 -4
  212. package/data/docs/types/createItemsFromDirectoryDrop.json +4 -4
  213. package/data/docs/types/createItemsFromFileDrop.json +4 -4
  214. package/data/docs/types/createItemsFromImageDrop.json +4 -4
  215. package/data/docs/types/createItemsFromJsonDrop.json +4 -4
  216. package/data/docs/types/manifest.json +50 -0
  217. package/data/docs/types/useRegion.json +2 -2
  218. package/data/docs/types/useSlidingIndicator.json +145 -0
  219. package/data/docs/types/useTree.json +267 -0
  220. package/data/tokens.json +21 -0
  221. package/data/uikit-tokens.json +894 -0
  222. package/dist/index.js +3298 -109
  223. package/package.json +8 -6
@@ -0,0 +1,481 @@
1
+ {
2
+ "meta": {
3
+ "id": "Components-Skeleton",
4
+ "title": "Skeleton",
5
+ "exportName": "Skeleton",
6
+ "description": "A loading placeholder that holds space for content while it loads, reducing perceived layout shift.",
7
+ "lifecycleState": "Stable",
8
+ "order": 999,
9
+ "repoPath": "packages/nimbus/src/components/skeleton/skeleton.mdx",
10
+ "menu": [
11
+ "Components",
12
+ "Feedback",
13
+ "Skeleton"
14
+ ],
15
+ "route": "components/feedback/skeleton",
16
+ "tags": [
17
+ "component",
18
+ "skeleton",
19
+ "loading",
20
+ "placeholder",
21
+ "feedback"
22
+ ],
23
+ "toc": [
24
+ {
25
+ "value": "Overview",
26
+ "href": "#overview",
27
+ "depth": 2,
28
+ "numbering": [
29
+ 1,
30
+ 1
31
+ ],
32
+ "parent": "root"
33
+ },
34
+ {
35
+ "value": "Resources",
36
+ "href": "#resources",
37
+ "depth": 3,
38
+ "numbering": [
39
+ 1,
40
+ 1,
41
+ 1
42
+ ],
43
+ "parent": "root"
44
+ },
45
+ {
46
+ "value": "Variables",
47
+ "href": "#variables",
48
+ "depth": 2,
49
+ "numbering": [
50
+ 1,
51
+ 2
52
+ ],
53
+ "parent": "root"
54
+ },
55
+ {
56
+ "value": "Animation",
57
+ "href": "#animation",
58
+ "depth": 3,
59
+ "numbering": [
60
+ 1,
61
+ 2,
62
+ 1
63
+ ],
64
+ "parent": "root"
65
+ },
66
+ {
67
+ "value": "Shape",
68
+ "href": "#shape",
69
+ "depth": 3,
70
+ "numbering": [
71
+ 1,
72
+ 2,
73
+ 2
74
+ ],
75
+ "parent": "root"
76
+ },
77
+ {
78
+ "value": "Sizing",
79
+ "href": "#sizing",
80
+ "depth": 3,
81
+ "numbering": [
82
+ 1,
83
+ 2,
84
+ 3
85
+ ],
86
+ "parent": "root"
87
+ },
88
+ {
89
+ "value": "Composing a layout",
90
+ "href": "#composing-a-layout",
91
+ "depth": 3,
92
+ "numbering": [
93
+ 1,
94
+ 2,
95
+ 4
96
+ ],
97
+ "parent": "root"
98
+ },
99
+ {
100
+ "value": "Guidelines",
101
+ "href": "#guidelines",
102
+ "depth": 2,
103
+ "numbering": [
104
+ 1,
105
+ 3
106
+ ],
107
+ "parent": "root"
108
+ },
109
+ {
110
+ "value": "Best practices",
111
+ "href": "#best-practices",
112
+ "depth": 3,
113
+ "numbering": [
114
+ 1,
115
+ 3,
116
+ 1
117
+ ],
118
+ "parent": "root"
119
+ },
120
+ {
121
+ "value": "When to use",
122
+ "href": "#when-to-use",
123
+ "depth": 3,
124
+ "numbering": [
125
+ 1,
126
+ 3,
127
+ 2
128
+ ],
129
+ "parent": "root"
130
+ }
131
+ ],
132
+ "layout": "app-frame",
133
+ "tabs": [
134
+ {
135
+ "key": "overview",
136
+ "title": "Overview",
137
+ "order": 0
138
+ },
139
+ {
140
+ "key": "dev",
141
+ "title": "Implementation",
142
+ "order": 3
143
+ }
144
+ ]
145
+ },
146
+ "mdx": "\n## Overview\n\n`Skeleton` is the base loading placeholder — a single, sizeable block that holds\nspace for content while it loads. It reduces layout shift and communicates that\nthe interface is active, giving users confidence the page hasn't frozen. Unlike\na spinner, a skeleton mirrors the shape of the content that will appear, so the\ntransition from loading to loaded feels smooth and intentional.\n\nTwo convenience components are built on top of it for the most common shapes:\n\n- **[SkeletonText](/components/feedback/skeletontext)** — a stack of narrowing\n lines that approximates a paragraph of text\n- **[SkeletonCircle](/components/feedback/skeletoncircle)** — a circular\n placeholder sized to the Avatar scale, for avatars and icons\n\nUse `Skeleton` directly for images, headings, buttons, cards, or any custom\nrectangular or circular shape.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system)\n\n## Variables\n\nGet familiar with the features.\n\n### Animation\n\nThree animation variants signal loading activity with different levels of\nenergy. Use `pulse` (a gentle opacity oscillation) for most loading states,\n`wave` (a gradient shimmer sweep) for data-heavy surfaces like dashboards, and\n`none` when motion would distract from other activity on the page.\n\n```jsx live\nconst App = () => (\n <Stack gap=\"400\" width=\"300px\">\n <Skeleton height=\"40px\" animation=\"pulse\" />\n <Skeleton height=\"40px\" animation=\"wave\" />\n <Skeleton height=\"40px\" animation=\"none\" />\n </Stack>\n)\n```\n\n### Shape\n\n`rectangle` (the default) applies a small border radius — use it for text lines,\nimages, cards, and buttons. `circle` forces a 1:1 aspect ratio — use it for\navatars, user icons, and circular thumbnails.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <Skeleton width=\"200px\" height=\"48px\" shape=\"rectangle\" />\n <Skeleton width=\"60px\" height=\"60px\" shape=\"circle\" />\n </Stack>\n)\n```\n\n### Sizing\n\n`Skeleton` has no dedicated size prop — it stretches to the `width` and `height`\n(or any Chakra style props) you give it, so it can stand in for content of any\ndimension.\n\n```jsx live\nconst App = () => (\n <Stack gap=\"400\">\n <Skeleton width=\"120px\" height=\"16px\" />\n <Skeleton width=\"240px\" height=\"32px\" />\n <Skeleton width=\"100%\" height=\"120px\" />\n </Stack>\n)\n```\n\n### Composing a layout\n\nCombine `Skeleton` with `SkeletonCircle` and `SkeletonText` to match the shape\nof the real content as closely as possible.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"flex-start\">\n <SkeletonCircle size=\"md\" />\n <Stack gap=\"200\">\n <SkeletonText textStyle=\"lg\" lines={1} width=\"180px\" />\n <SkeletonText lines={2} width=\"240px\" />\n </Stack>\n </Stack>\n)\n```\n\n## Guidelines\n\n### Best practices\n\n- Mirror the real content's shape as closely as possible. The closer the\n skeleton matches the loaded layout, the smoother the transition feels.\n- Reach for `SkeletonText` for paragraphs and `SkeletonCircle` for avatars; use\n the base `Skeleton` for individual lines, headings, images, and custom shapes.\n- Keep skeletons on screen only while loading. Swap them for real content as\n soon as data is available.\n\n### When to use\n\n> [!TIP]\\\n> Use Skeleton when:\n- Content takes more than ~300 ms to load and has a predictable shape\n- You want to reduce perceived layout shift during initial page load or lazy\n loading\n- The loading region contains multiple elements (cards, lists, detail panels)\n\n> [!CAUTION]\\\n> When NOT to use Skeleton:\n- For operations with a known duration — use a `LoadingSpinner` with a progress\n indicator instead\n- For very short loading times (under ~300 ms) — a flash of skeleton can be\n more jarring than no placeholder at all\n- For content whose shape is unknown — an indeterminate spinner is a better fit\n",
147
+ "views": {
148
+ "overview": {
149
+ "mdx": "\n## Overview\n\n`Skeleton` is the base loading placeholder — a single, sizeable block that holds\nspace for content while it loads. It reduces layout shift and communicates that\nthe interface is active, giving users confidence the page hasn't frozen. Unlike\na spinner, a skeleton mirrors the shape of the content that will appear, so the\ntransition from loading to loaded feels smooth and intentional.\n\nTwo convenience components are built on top of it for the most common shapes:\n\n- **[SkeletonText](/components/feedback/skeletontext)** — a stack of narrowing\n lines that approximates a paragraph of text\n- **[SkeletonCircle](/components/feedback/skeletoncircle)** — a circular\n placeholder sized to the Avatar scale, for avatars and icons\n\nUse `Skeleton` directly for images, headings, buttons, cards, or any custom\nrectangular or circular shape.\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system)\n\n## Variables\n\nGet familiar with the features.\n\n### Animation\n\nThree animation variants signal loading activity with different levels of\nenergy. Use `pulse` (a gentle opacity oscillation) for most loading states,\n`wave` (a gradient shimmer sweep) for data-heavy surfaces like dashboards, and\n`none` when motion would distract from other activity on the page.\n\n```jsx live\nconst App = () => (\n <Stack gap=\"400\" width=\"300px\">\n <Skeleton height=\"40px\" animation=\"pulse\" />\n <Skeleton height=\"40px\" animation=\"wave\" />\n <Skeleton height=\"40px\" animation=\"none\" />\n </Stack>\n)\n```\n\n### Shape\n\n`rectangle` (the default) applies a small border radius — use it for text lines,\nimages, cards, and buttons. `circle` forces a 1:1 aspect ratio — use it for\navatars, user icons, and circular thumbnails.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <Skeleton width=\"200px\" height=\"48px\" shape=\"rectangle\" />\n <Skeleton width=\"60px\" height=\"60px\" shape=\"circle\" />\n </Stack>\n)\n```\n\n### Sizing\n\n`Skeleton` has no dedicated size prop — it stretches to the `width` and `height`\n(or any Chakra style props) you give it, so it can stand in for content of any\ndimension.\n\n```jsx live\nconst App = () => (\n <Stack gap=\"400\">\n <Skeleton width=\"120px\" height=\"16px\" />\n <Skeleton width=\"240px\" height=\"32px\" />\n <Skeleton width=\"100%\" height=\"120px\" />\n </Stack>\n)\n```\n\n### Composing a layout\n\nCombine `Skeleton` with `SkeletonCircle` and `SkeletonText` to match the shape\nof the real content as closely as possible.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"flex-start\">\n <SkeletonCircle size=\"md\" />\n <Stack gap=\"200\">\n <SkeletonText textStyle=\"lg\" lines={1} width=\"180px\" />\n <SkeletonText lines={2} width=\"240px\" />\n </Stack>\n </Stack>\n)\n```\n\n## Guidelines\n\n### Best practices\n\n- Mirror the real content's shape as closely as possible. The closer the\n skeleton matches the loaded layout, the smoother the transition feels.\n- Reach for `SkeletonText` for paragraphs and `SkeletonCircle` for avatars; use\n the base `Skeleton` for individual lines, headings, images, and custom shapes.\n- Keep skeletons on screen only while loading. Swap them for real content as\n soon as data is available.\n\n### When to use\n\n> [!TIP]\\\n> Use Skeleton when:\n- Content takes more than ~300 ms to load and has a predictable shape\n- You want to reduce perceived layout shift during initial page load or lazy\n loading\n- The loading region contains multiple elements (cards, lists, detail panels)\n\n> [!CAUTION]\\\n> When NOT to use Skeleton:\n- For operations with a known duration — use a `LoadingSpinner` with a progress\n indicator instead\n- For very short loading times (under ~300 ms) — a flash of skeleton can be\n more jarring than no placeholder at all\n- For content whose shape is unknown — an indeterminate spinner is a better fit\n",
150
+ "toc": [
151
+ {
152
+ "value": "Overview",
153
+ "href": "#overview",
154
+ "depth": 2,
155
+ "numbering": [
156
+ 1,
157
+ 1
158
+ ],
159
+ "parent": "root"
160
+ },
161
+ {
162
+ "value": "Resources",
163
+ "href": "#resources",
164
+ "depth": 3,
165
+ "numbering": [
166
+ 1,
167
+ 1,
168
+ 1
169
+ ],
170
+ "parent": "root"
171
+ },
172
+ {
173
+ "value": "Variables",
174
+ "href": "#variables",
175
+ "depth": 2,
176
+ "numbering": [
177
+ 1,
178
+ 2
179
+ ],
180
+ "parent": "root"
181
+ },
182
+ {
183
+ "value": "Animation",
184
+ "href": "#animation",
185
+ "depth": 3,
186
+ "numbering": [
187
+ 1,
188
+ 2,
189
+ 1
190
+ ],
191
+ "parent": "root"
192
+ },
193
+ {
194
+ "value": "Shape",
195
+ "href": "#shape",
196
+ "depth": 3,
197
+ "numbering": [
198
+ 1,
199
+ 2,
200
+ 2
201
+ ],
202
+ "parent": "root"
203
+ },
204
+ {
205
+ "value": "Sizing",
206
+ "href": "#sizing",
207
+ "depth": 3,
208
+ "numbering": [
209
+ 1,
210
+ 2,
211
+ 3
212
+ ],
213
+ "parent": "root"
214
+ },
215
+ {
216
+ "value": "Composing a layout",
217
+ "href": "#composing-a-layout",
218
+ "depth": 3,
219
+ "numbering": [
220
+ 1,
221
+ 2,
222
+ 4
223
+ ],
224
+ "parent": "root"
225
+ },
226
+ {
227
+ "value": "Guidelines",
228
+ "href": "#guidelines",
229
+ "depth": 2,
230
+ "numbering": [
231
+ 1,
232
+ 3
233
+ ],
234
+ "parent": "root"
235
+ },
236
+ {
237
+ "value": "Best practices",
238
+ "href": "#best-practices",
239
+ "depth": 3,
240
+ "numbering": [
241
+ 1,
242
+ 3,
243
+ 1
244
+ ],
245
+ "parent": "root"
246
+ },
247
+ {
248
+ "value": "When to use",
249
+ "href": "#when-to-use",
250
+ "depth": 3,
251
+ "numbering": [
252
+ 1,
253
+ 3,
254
+ 2
255
+ ],
256
+ "parent": "root"
257
+ }
258
+ ]
259
+ },
260
+ "dev": {
261
+ "mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { Skeleton, type SkeletonProps } from '@commercetools/nimbus';\n```\n\nFor paragraph and circular placeholders, see\n[SkeletonText](/components/feedback/skeletontext) and\n[SkeletonCircle](/components/feedback/skeletoncircle) — both are built on\n`Skeleton`.\n\n### Basic usage\n\n`Skeleton` renders a muted, animated block that holds space for content while it\nloads. Give it a `width` and `height` (or any Chakra style props) to match the\ncontent it stands in for.\n\n```jsx live-dev\nconst App = () => (\n <Skeleton width=\"200px\" height=\"40px\" />\n)\n```\n\n## Usage examples\n\n### Conditional rendering (standalone pattern)\n\nSkeleton does **not** have an `isLoaded` prop. Instead, render the skeleton\nduring loading and swap it for real content using conditional rendering. This\nkeeps loading-state management in your own code, separate from the styling\ncomponent.\n\n```jsx live-dev\nconst App = () => {\n const [isLoading, setIsLoading] = React.useState(true);\n\n return (\n <Stack gap=\"400\">\n <Button onPress={() => setIsLoading(v => !v)}>Toggle loading</Button>\n <div aria-busy={isLoading}>\n {isLoading ? (\n <Skeleton width=\"300px\" height=\"80px\" />\n ) : (\n <Stack\n width=\"300px\"\n height=\"80px\"\n backgroundColor=\"neutral.2\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n Content loaded\n </Stack>\n )}\n </div>\n </Stack>\n )\n}\n```\n\n### Animation variants\n\nThe `animation` prop controls how the placeholder animates while loading.\n\n- `pulse` (default): opacity oscillation\n- `wave`: gradient shimmer sweep via an `::after` pseudo-element\n- `none`: no animation\n\n```jsx live-dev\nconst App = () => (\n <Stack gap=\"400\">\n <Skeleton width=\"200px\" height=\"40px\" animation=\"pulse\" />\n <Skeleton width=\"200px\" height=\"40px\" animation=\"wave\" />\n <Skeleton width=\"200px\" height=\"40px\" animation=\"none\" />\n </Stack>\n)\n```\n\n### Shape variants\n\nThe `shape` prop controls the border radius applied to the placeholder.\n\n- `rectangle` (default): small border radius (~4 px)\n- `circle`: fully-rounded with a forced 1:1 aspect ratio\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <Skeleton width=\"120px\" height=\"40px\" shape=\"rectangle\" />\n <Skeleton width=\"60px\" height=\"60px\" shape=\"circle\" />\n </Stack>\n)\n```\n\n### Size\n\nThe optional `size` prop is a square shortcut aligned with the `Avatar` scale —\nit applies equal width and height so you don't have to set both.\n\n- `2xs`: 24 px · `xs`: 32 px · `md`: 40 px\n\nIt is opt-in with no default; leave it unset to size the placeholder with\n`width`/`height`/`boxSize` instead. [SkeletonCircle](/components/feedback/skeletoncircle)\nbuilds on it to size its circle.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <Skeleton size=\"2xs\" />\n <Skeleton size=\"xs\" />\n <Skeleton size=\"md\" />\n </Stack>\n)\n```\n\n## Component requirements\n\n### Accessibility\n\nSkeleton placeholders are **decorative by default** — they render with\n`aria-hidden=\"true\"` so screen readers skip over them. This is the correct\nbehavior: the shapes convey visual loading activity but carry no semantic\nmeaning on their own.\n\nTo communicate loading state to assistive technology, set `aria-busy=\"true\"` on\nthe **container** that wraps the skeleton region. When content has loaded, remove\nthe attribute (or set it to `false`) and render the real content in its place.\n\n```tsx\n// Announce the loading region to screen readers via aria-busy\n<section aria-busy={isLoading} aria-label=\"Product details\">\n {isLoading ? (\n <Skeleton width=\"100%\" height=\"120px\" />\n ) : (\n <ProductDetails product={product} />\n )}\n</section>\n```\n\nPrefer the container `aria-busy` pattern above over labelling individual\nskeletons. A skeleton is a role-less `<div>`, so adding `aria-label` to it while\nun-hiding it (`aria-hidden={false}`) is an invalid ARIA combination that\naccessibility linters (axe) flag as `aria-prohibited-attr`. Announce the loading\nregion on the wrapping container instead.\n\n#### Reduced motion\n\nWhen the user has enabled the `prefers-reduced-motion: reduce` media condition,\nall animations are automatically disabled — regardless of the `animation` prop\nvalue. The `::after` wave sweep is also hidden. No additional configuration is\nrequired.\n\nIf your use case requires tracking and analytics for this component, it is good\npractice to add a **persistent**, **unique** id to the component:\n\n```tsx\nconst PERSISTENT_ID = \"product-detail-skeleton\";\n\nexport const ProductDetailSkeleton = () => (\n <div id={PERSISTENT_ID} aria-busy>\n <Skeleton width=\"100%\" height=\"120px\" />\n </div>\n);\n```\n\n#### Keyboard navigation\n\nSkeleton components are non-interactive and decorative. They do not receive\nfocus or support keyboard interaction.\n\n## API reference\n\n<PropsTable id=\"Skeleton\" />\n\n## Common patterns\n\n### Composing a card skeleton\n\nCombine `Skeleton` with `SkeletonCircle` and `SkeletonText` to build realistic\nloading layouts that mirror the final content.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"flex-start\">\n <SkeletonCircle size=\"md\" />\n <Stack gap=\"200\">\n <SkeletonText textStyle=\"lg\" lines={1} width=\"180px\" />\n <SkeletonText lines={2} width=\"240px\" />\n </Stack>\n </Stack>\n)\n```\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using Skeleton within your application. As the component's internal functionality is already tested by Nimbus, these patterns help you verify your integration and application-specific logic.\n\n### Basic Rendering\n\nRender a `Skeleton` placeholder and confirm it is present; it stretches to the `width`/`height` you give it and is decorative (`aria-hidden`) by default, so assistive technology skips it.\n\n```tsx\nimport { useState } from \"react\";\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n Skeleton,\n Stack,\n Text,\n Button,\n NimbusProvider,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"Skeleton - Basic rendering\", () => {\n it(\"renders a decorative placeholder block\", () => {\n render(\n <NimbusProvider>\n <Skeleton data-testid=\"skeleton\" width=\"200px\" height=\"40px\" />\n </NimbusProvider>\n );\n\n const skeleton = screen.getByTestId(\"skeleton\");\n expect(skeleton).toBeInTheDocument();\n expect(skeleton).toHaveAttribute(\"aria-hidden\", \"true\");\n });\n});\n```\n\n### Standalone Loading Pattern\n\nThe recommended way to use Skeleton: render a placeholder while data is loading, then swap in the real content with conditional rendering — Skeleton has no `isLoaded` prop, so the consumer owns the loading state.\n\n```tsx\nimport { useState } from \"react\";\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n Skeleton,\n Stack,\n Text,\n Button,\n NimbusProvider,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"Skeleton - Standalone loading pattern\", () => {\n /**\n * A representative consumer component: show a skeleton banner while\n * `isLoading`, then render the real image once loading completes.\n */\n function ProductBanner({ isLoading }: { isLoading: boolean }) {\n return isLoading ? (\n <Skeleton width=\"288px\" height=\"120px\" />\n ) : (\n <img src=\"/banner.png\" alt=\"Product banner\" width={288} />\n );\n }\n\n it(\"shows a skeleton while loading, then the real content\", async () => {\n const Example = () => {\n const [isLoading, setIsLoading] = useState(true);\n return (\n <Stack gap=\"400\">\n <ProductBanner isLoading={isLoading} />\n <Button onPress={() => setIsLoading(false)}>Finish loading</Button>\n </Stack>\n );\n };\n\n render(\n <NimbusProvider>\n <Example />\n </NimbusProvider>\n );\n\n // While loading: real content is absent.\n expect(screen.queryByAltText(\"Product banner\")).toBeNull();\n\n await userEvent.click(\n screen.getByRole(\"button\", { name: \"Finish loading\" })\n );\n\n // After loading: real content is present.\n expect(screen.getByAltText(\"Product banner\")).toBeInTheDocument();\n });\n});\n```\n\n### Announcing Loading with aria-busy\n\nSkeleton shapes are decorative (`aria-hidden`) so they are not announced individually; communicate the loading state to assistive technology by setting `aria-busy` on the surrounding container instead.\n\n```tsx\nimport { useState } from \"react\";\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n Skeleton,\n Stack,\n Text,\n Button,\n NimbusProvider,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"Skeleton - Container aria-busy pattern\", () => {\n it(\"announces loading state via aria-busy on the container\", () => {\n render(\n <NimbusProvider>\n <section\n data-testid=\"container\"\n aria-busy={true}\n aria-label=\"Product details\"\n >\n <Skeleton width=\"100%\" height=\"120px\" />\n </section>\n </NimbusProvider>\n );\n\n const container = screen.getByTestId(\"container\");\n expect(container).toHaveAttribute(\"aria-busy\", \"true\");\n expect(container).toHaveAttribute(\"aria-label\", \"Product details\");\n });\n\n it(\"clears aria-busy once real content is rendered\", () => {\n render(\n <NimbusProvider>\n <section data-testid=\"container\" aria-busy={false}>\n <Text>Product details loaded</Text>\n </section>\n </NimbusProvider>\n );\n\n expect(screen.getByText(\"Product details loaded\")).toBeInTheDocument();\n expect(screen.getByTestId(\"container\")).toHaveAttribute(\n \"aria-busy\",\n \"false\"\n );\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-skeleton--docs)\n- [SkeletonText](/components/feedback/skeletontext)\n- [SkeletonCircle](/components/feedback/skeletoncircle)\n",
262
+ "toc": [
263
+ {
264
+ "value": "Getting started",
265
+ "href": "#getting-started",
266
+ "depth": 2,
267
+ "numbering": [
268
+ 1,
269
+ 1
270
+ ],
271
+ "parent": "root"
272
+ },
273
+ {
274
+ "value": "Import",
275
+ "href": "#import",
276
+ "depth": 3,
277
+ "numbering": [
278
+ 1,
279
+ 1,
280
+ 1
281
+ ],
282
+ "parent": "root"
283
+ },
284
+ {
285
+ "value": "Basic usage",
286
+ "href": "#basic-usage",
287
+ "depth": 3,
288
+ "numbering": [
289
+ 1,
290
+ 1,
291
+ 2
292
+ ],
293
+ "parent": "root"
294
+ },
295
+ {
296
+ "value": "Usage examples",
297
+ "href": "#usage-examples",
298
+ "depth": 2,
299
+ "numbering": [
300
+ 1,
301
+ 2
302
+ ],
303
+ "parent": "root"
304
+ },
305
+ {
306
+ "value": "Conditional rendering (standalone pattern)",
307
+ "href": "#conditional-rendering-standalone-pattern",
308
+ "depth": 3,
309
+ "numbering": [
310
+ 1,
311
+ 2,
312
+ 1
313
+ ],
314
+ "parent": "root"
315
+ },
316
+ {
317
+ "value": "Animation variants",
318
+ "href": "#animation-variants",
319
+ "depth": 3,
320
+ "numbering": [
321
+ 1,
322
+ 2,
323
+ 2
324
+ ],
325
+ "parent": "root"
326
+ },
327
+ {
328
+ "value": "Shape variants",
329
+ "href": "#shape-variants",
330
+ "depth": 3,
331
+ "numbering": [
332
+ 1,
333
+ 2,
334
+ 3
335
+ ],
336
+ "parent": "root"
337
+ },
338
+ {
339
+ "value": "Size",
340
+ "href": "#size",
341
+ "depth": 3,
342
+ "numbering": [
343
+ 1,
344
+ 2,
345
+ 4
346
+ ],
347
+ "parent": "root"
348
+ },
349
+ {
350
+ "value": "Component requirements",
351
+ "href": "#component-requirements",
352
+ "depth": 2,
353
+ "numbering": [
354
+ 1,
355
+ 3
356
+ ],
357
+ "parent": "root"
358
+ },
359
+ {
360
+ "value": "Accessibility",
361
+ "href": "#accessibility",
362
+ "depth": 3,
363
+ "numbering": [
364
+ 1,
365
+ 3,
366
+ 1
367
+ ],
368
+ "parent": "root"
369
+ },
370
+ {
371
+ "value": "Reduced motion",
372
+ "href": "#reduced-motion",
373
+ "depth": 4,
374
+ "numbering": [
375
+ 1,
376
+ 3,
377
+ 1,
378
+ 1
379
+ ],
380
+ "parent": "root"
381
+ },
382
+ {
383
+ "value": "Keyboard navigation",
384
+ "href": "#keyboard-navigation",
385
+ "depth": 4,
386
+ "numbering": [
387
+ 1,
388
+ 3,
389
+ 1,
390
+ 2
391
+ ],
392
+ "parent": "root"
393
+ },
394
+ {
395
+ "value": "API reference",
396
+ "href": "#api-reference",
397
+ "depth": 2,
398
+ "numbering": [
399
+ 1,
400
+ 4
401
+ ],
402
+ "parent": "root"
403
+ },
404
+ {
405
+ "value": "Common patterns",
406
+ "href": "#common-patterns",
407
+ "depth": 2,
408
+ "numbering": [
409
+ 1,
410
+ 5
411
+ ],
412
+ "parent": "root"
413
+ },
414
+ {
415
+ "value": "Composing a card skeleton",
416
+ "href": "#composing-a-card-skeleton",
417
+ "depth": 3,
418
+ "numbering": [
419
+ 1,
420
+ 5,
421
+ 1
422
+ ],
423
+ "parent": "root"
424
+ },
425
+ {
426
+ "value": "Testing your implementation",
427
+ "href": "#testing-your-implementation",
428
+ "depth": 2,
429
+ "numbering": [
430
+ 1,
431
+ 6
432
+ ],
433
+ "parent": "root"
434
+ },
435
+ {
436
+ "value": "Basic Rendering",
437
+ "href": "#basic-rendering",
438
+ "depth": 3,
439
+ "numbering": [
440
+ 1,
441
+ 6,
442
+ 1
443
+ ],
444
+ "parent": "root"
445
+ },
446
+ {
447
+ "value": "Standalone Loading Pattern",
448
+ "href": "#standalone-loading-pattern",
449
+ "depth": 3,
450
+ "numbering": [
451
+ 1,
452
+ 6,
453
+ 2
454
+ ],
455
+ "parent": "root"
456
+ },
457
+ {
458
+ "value": "Announcing Loading with aria-busy",
459
+ "href": "#announcing-loading-with-aria-busy",
460
+ "depth": 3,
461
+ "numbering": [
462
+ 1,
463
+ 6,
464
+ 3
465
+ ],
466
+ "parent": "root"
467
+ },
468
+ {
469
+ "value": "Resources",
470
+ "href": "#resources",
471
+ "depth": 2,
472
+ "numbering": [
473
+ 1,
474
+ 7
475
+ ],
476
+ "parent": "root"
477
+ }
478
+ ]
479
+ }
480
+ }
481
+ }