HorizontalScroll

HorizontalScroll

import HorizontalScroll from "@kiwicom/orbit-components/lib/HorizontalScroll";
<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✔️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. Value must be the name of a color token from the theme.
onOverflow() => voidcallback function, fires, if content is overflowed
arrowsbooleanshow arrows
arrowsColorstringset arrows color

ScrollSnap

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

Spacing

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