Skip to content

ScrollArea

A themed scrollable region, built on Reka UI's ScrollArea primitive.

Usage

Scrollable line 1

Scrollable line 2

Scrollable line 3

Scrollable line 4

Scrollable line 5

Scrollable line 6

Scrollable line 7

Scrollable line 8

Scrollable line 9

Scrollable line 10

Scrollable line 11

Scrollable line 12

Scrollable line 13

Scrollable line 14

Scrollable line 15

vue-html
<SScrollArea class="h-32">
  <div class="flex flex-col gap-2 p-3">
    <p v-for="i in 15" :key="i">Line {{ i }}</p>
  </div>
</SScrollArea>

Give it a height via class (fallthrough) - SScrollArea fills whatever box it's placed in. PageAside uses this internally for its scrollable body.

Custom :ui

To see exactly what you'd be overriding - the current default classes for every slot - here's ScrollArea's own theme file:

Global and scoped theme recipes use ui.scrollArea.

Theme source "scroll-area" not found

Props

PropTypeDefault
orientation'vertical' | 'horizontal' | 'both''vertical'
uiPartial<Record<ScrollAreaSlot, string | object>>-

Slots

SlotDescription
defaultScrollable content
Edit this page