Scroll Area

A native scroll container with custom scrollbars.

API reference

Import the component and assemble its parts:

Anatomy

Root

Groups all parts of the scroll area. Renders a <div> element.

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

CSS Variable
Description
--scroll-area-corner-height
--scroll-area-corner-width

Viewport

The actual scrollable container of the scroll area. Renders a <div> element.

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Scrollbar

A vertical or horizontal scrollbar for the scroll area. Renders a <div> element.

PropTypeDefault
orientation

'horizontal' | 'vertical'

'vertical'

className

string | (state) => string

undefined

keepMounted

boolean

false

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Attribute
Description
data-orientation
data-hovering
data-scrolling
CSS Variable
Description
--scroll-area-thumb-height
--scroll-area-thumb-width

Thumb

The draggable part of the the scrollbar that indicates the current scroll position. Renders a <div> element.

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Attribute
Description
data-orientation

Corner

A small rectangular area that appears at the intersection of horizontal and vertical scrollbars. Renders a <div> element.

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined