horizontal-scroll
A container for horizontally scrolling elements.
Properties
snapToBlocks: bool
Snapping the scroll to the edges of nested blocks.
showScrollBar: bool
style
Changing the appearance, position, and geometry of the block.
-
width,maxWidth,minWidth
The width of the block. More details. -
height,maxHeight,minHeight
The height of the block. More details. -
padding,paddingHorizontal,paddingVertical,paddingTop,paddingRight,paddingBottom,paddingLeft
Internal padding of the container. More details. -
margin,marginHorizontal,marginVertical,marginTop,marginRight,marginBottom,marginLeft
External margins of the block. More details. -
position
The positioning method of the block: relative or absolute. More details. -
top,right,bottom,left
Offset from the original position. More details. -
backgroundColor
The background color of the block. More details. -
opacity
The opacity of the entire block along with its content. More details. -
flexBasis
The initial size of the block along the main axis of the container. More details. -
flexGrow
The growth factor of the block along the main axis of the container. More details. -
flexShrink
The shrink factor of the block along the main axis of the container. More details. -
flex
Defines the size behavior of the block (growth, shrinkage, and initial size) along the main axis of the container. More details. -
alignSelf
Alignment of a specific block across the main axis of the container. More details.
Examples
Horizontal scrolling through three blocks.
Horizontal scrolling through blocks that are 95% of the container's width. Scroll with snapping to blocks.