scroll-area

Scroll Area

Holds content that scrolls inside a fixed area, vertically, horizontally or both, with a slim bar that shows on hover.

Parts

PartFileDoes
ScrollAreaScrollArea.vueHolds content that scrolls within a fixed area.
ScrollBarScrollBar.vueShows the scroll position and lets the user drag to scroll.

Anatomy

<ScrollArea>
  <ScrollBar />
</ScrollArea>

Styling

All of Scroll Area’s styles live in scroll-area.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@vueuse/core
class-variance-authority
reka-ui

API reference

ScrollArea.vue

Holds content that scrolls within a fixed area.

Props 7

PropTypeDefault
typeScrollType'hover'
dirDirection—
scrollHideDelaynumber600
asChildbooleanfalse
asAsTag | Component—
classClassValue—
orientation'vertical' | 'horizontal' | 'both''vertical'

CSS variables 2

CSS variableDescription
--reka-scroll-area-corner-height

The height of the corner where the two scrollbars meet, in pixels.

--reka-scroll-area-corner-width

The width of the corner where the two scrollbars meet, in pixels.

Recipe scroll-area-viewport 1 group

ScrollBar.vue
Scroll Area
State