Scroll component

Vertical scroll

Vertical scroll example by maxHeight

Using maximum height

Vertical scroll example by height

Using fixed height

Horizontal scroll

Horizontal scroll example by maxHeight

Using maximum width

Horizontal scroll example by width

Using fixed width

Horizontal and vertical scroll

Horizontal and vertical scroll example by maxHeight

Using maximum width and height

Horizontal and vertical scroll example by width

Using fixed width and height

APIs

VerticalScroll.Props

AttributeDescriptionTypeAccepted valuesDefault
maxHeightMaximum heightstring or number--
maxWidthMaximum widthstring or number--
typeType of scroll elementvertical or horizontal or both-both
refforwardRefRef<HTMLDivElement or null>--
...native propsButtonHTMLAttributes'id', 'className', ...-