An open source design system that's fully customizable and agent ready
TypeScript
docs(core): document Carousel's hasEdgeFade and padding props (#3332)
Md Shahrier Islam Arham04e71b29c3bd
diff --git a/.changeset/carousel-doc-hasedgefade-padding.md b/.changeset/carousel-doc-hasedgefade-padding.mdnew file mode 100644index 0000000000..1262ad8480--- /dev/null+++ b/.changeset/carousel-doc-hasedgefade-padding.md@@ -0,0 +1,6 @@+---+'@astryxdesign/core': patch+---++[docs] Document Carousel's hasEdgeFade and padding props, supported by the component but missing from the props table, docsZh, and docsDense (same omission previously fixed for Text's justify and ToggleButton's isIconOnly). Also correct the Fade edges anatomy row to optional, since the mask is suppressible via hasEdgeFade (#3332)+@arham766diff --git a/packages/core/src/Carousel/Carousel.doc.mjs b/packages/core/src/Carousel/Carousel.doc.mjsindex a9acfdba9d..ca2c455b04 100644--- a/packages/core/src/Carousel/Carousel.doc.mjs+++ b/packages/core/src/Carousel/Carousel.doc.mjs@@ -21,7 +21,7 @@ export const docs = {anatomy: [{name: 'Scroll container', required: true, description: 'The horizontal overflow area that holds all items.'},{name: 'Items', required: true, description: 'The children rendered in a row. Each item is animated with a scroll-driven scale effect.'},- {name: 'Fade edges', required: true, description: 'Gradient fades on the left and right edges that indicate more content is available.'},+ {name: 'Fade edges', required: false, description: 'Gradient fades on the left and right edges that indicate more content is available. Enabled by default, disable with hasEdgeFade={false}.'},{name: 'Navigation buttons', required: false, description: 'Prev/next buttons that appear on hover. Enabled by default, disable with hasButtons={false}.'},],},@@ -29,7 +29,9 @@ export const docs = {{name: 'children', type: 'ReactNode', description: 'Carousel items rendered in a horizontal scroll container.', required: true},{name: 'gap', type: "0 | 0.5 | 1 | 1.5 | 2 | 3 | 4", description: 'Gap between items using the spacing token scale.', default: '1'},{name: 'hasButtons', type: 'boolean', description: 'Show prev/next navigation buttons on hover (desktop only).', default: 'true'},+ {name: 'hasEdgeFade', type: 'boolean', description: 'Show a gradient edge-fade mask when content overflows, signalling that more items exist off-screen.', default: 'true'},{name: 'hasSnap', type: 'boolean', description: 'Enable scroll-snap so each child snaps to the start edge.', default: 'false'},+ {name: 'padding', type: '0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10', description: 'Inline padding inside the scroll container, with matching scroll-padding so snap points align to the content edge.'},{name: 'aria-label', type: 'string', description: 'Accessible label for the carousel region.', default: "\'Carousel\'"},{name: 'ref', type: 'React.Ref<HTMLDivElement>', description: 'Ref forwarded to the root element.'},{name: 'xstyle', type: 'StyleXStyles', description: 'StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value.'},@@ -71,7 +73,9 @@ export const docsZh = {children: '在水平滚动容器中渲染的轮播项目。',gap: '使用间距令牌比例的项目间距。',hasButtons: '悬停时显示上一个/下一个导航按钮(仅桌面端)。',+ hasEdgeFade: '内容溢出时显示渐变边缘遮罩,提示屏幕外还有更多项目。',hasSnap: '启用滚动吸附,使每个子元素吸附到起始边缘。',+ padding: '滚动容器内的内联内边距,并设置匹配的 scroll-padding,使吸附点与内容边缘对齐。','aria-label': '轮播区域的无障碍标签。',},};@@ -95,7 +99,9 @@ export const docsDense = {children: 'carousel items in horizontal scroll',gap: 'item spacing via spacing token scale',hasButtons: 'prev/next buttons on hover (desktop)',+ hasEdgeFade: 'gradient edge-fade mask on overflow',hasSnap: 'scroll-snap; children snap to start edge',+ padding: 'inline padding; scroll-padding keeps snap points on content edge','aria-label': 'accessible label for carousel region','data-testid': 'test selector for automated testing frameworks',},