HorizontalScroll

Groups items onto one accessible row even on small screens.

HorizontalScroll

To implement HorizontalScroll component into your project you’ll need to add the import:

import HorizontalScroll from "@kiwicom/orbit-components/lib/HorizontalScroll";

After adding import into your project you can use it simply like:

<HorizontalScroll>
<FirstComponent />
<SecondComponent />
<ThirdComponent />
...etc
</HorizontalScroll>

Props

NameTypeRequiredDefaultDescription
minHeightnumberset minimal height
dataTeststringprop for testing purposes
idstringSet id for HorizontalScroll
spacingSpacing“small”the spacing between children elements
childrenReact.ReactNode:heavy_check_mark:content of HorizontalScroll
scrollSnapScrollSnap“none”set value for scroll-snap-type property
scrollPaddingnumberset value for scroll-padding property
overflowElevationbooleanset box-shadow on sides during scroll
elevationColorstringpaletteCloudDarkerset box-shadow color
onOverflow() => voidcallback function, fires, if content is overflowed

ScrollSnap

ScrollSnap
"mandatory"
"proximity"
"inline"
"none"

Spacing

Spacing
"none"
"XXXSmall"
"XXSmall"
"XSmall"
"small"
"medium"
"large"
"XLarge"
"XXLarge"