Components/Mechanisms
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/horizontalscroll
HorizontalScroll is a mechanism that enable scroll for different components like Tabs, Buttons, Tags, etc...
<Carusel/> instead.Use gradientColor prop to make items transition smoother with the background.
Use gradientWidth prop to adjust the length of the transition gradient.
Use scrollButtonSize prop to change icon button size.
Choose between:
largemediumsmalltinyUse scrollButtonSkin to choose from the following icon button skins:
standardlightdarkChange the debounce time to limit scroll even rate, by using the scrollDebounce prop.
Change the number of pixels the scrollable content moves per button press by using scrollDistance prop.
<HorizontallScroll/> is commonly used to scroll a list of tabs which is too wide for the parent container.
| Name | Type | Default | Description |
|---|---|---|---|
children (required) | ReactNode | — | The content rendered inside the scrollable window. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
edgeStyle | "color" | "blur" | 'color' | Controls the visual treatment of the scroll edges: - blur — content near the edge is progressively blurred - color — content near the edge fades out into the background |
edgeWidth | string | '48px' | Sets the width of the edge treatment (blur or fade) in pixels, e.g. '36px'. |
gradientColor | string | — | Has no effect: the scroll edges fade into the background regardless of its color. |
gradientWidth | string | — | The width of the gradient behind the scroll buttons in pixels, e.g. '36px' |
onScrollButtonClick | (direction: HorizontalScrollDirection) => void | — | Defines a callback function which is called when one of the scroll buttons is clicked, with the direction the content scrolls in. |
scrollButtonSize | "small" | "tiny" | "medium" | "large" | tiny | Size of the scroll buttons. |
scrollButtonSkin | "standard" | "light" | "inverted" | "destructive" | "premium" | "dark" | "transparent" | "ai" | standard | Skin of the scroll buttons. |
scrollButtonVariant | "primary" | "secondary" | "tertiary" | secondary | Visual prominence of the scroll buttons, passed to the priority of the underlying IconButton. |
scrollDebounce | number | 20 | The debounce time (in milliseconds) to limit the scroll event rate. |
scrollDistance | number | 150 | The number of pixels the scrollable content moves per button press. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
leftButtonExists | Checks if left button exists. |
rightButtonExists | Checks if right button exists. |
clickLeftButton | Clicks left button. |
clickRightButton | Clicks right button. |
getScrollPosition | Retrieves scrollLeft property of the scrollable container. |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
scrollButtonVariant prop sets the scroll buttons' IconButton priority (primary, secondary, tertiary); small, medium and large scroll buttons now show large chevrons. (#17255) — has visual changesedgeStyle="color", content near the scroll buttons now fades into whatever is behind it instead of being covered by a solid color gradient, so it blends with any background. Deprecated: the gradientColor prop, it no longer has an effect and can be removed. (#16864) — has visual changesedgeStyle="blur", scrolled content and the edge blur no longer show beyond the scroll buttons — content now fades out before reaching them. (#16864) — has visual changesscrollOnOverflow). (#16864) — has visual changesedgeStyle prop controls the treatment of the scroll edges — 'blur' progressively blurs content near the edge, 'color' covers it with a color gradient (together with gradientColor). A new edgeWidth prop sets the width of the edge treatment. Visual breaking change: the default edge treatment is now the blur; pass edgeStyle="color" to keep the previous gradient look. Deprecated: the gradientWidth prop, use edgeWidth instead (it still works and maps to edgeWidth, but logs a deprecation warning). (#16647) — has visual changes@testing-library/react from uni driver (#14606)Last updated: 22 October 2026