scroll-area

Scroll Area

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

States: Default, Focus

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

Install

Writes 3 files into components/ui/scroll-area/. For agents, npx @frontic/ui docs scroll-area prints this reference as markdown; the MCP server serves the same.

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

API reference

ScrollArea ScrollArea.vue

Holds content that scrolls within a fixed area.

PropTypeDefault
typeScrollType'hover'
dirDirection—
scrollHideDelaynumber600
asChildbooleanfalse
asAsTag | Component—
classClassValue—
orientation'vertical' | 'horizontal' | 'both''vertical'
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-viewportSets
base: scroll-area-viewport 2 properties

ScrollBar ScrollBar.vue

Example
State