Back to components
ComponentsScrollArea
A scrollable container that provides custom scrollbars and enhanced scrolling experience.
Component
Props
| Props | Default | Type |
|---|---|---|
scrollOrientation | ScrollOrientation.VERTICAL | ScrollOrientation |
maxHeight | 300 | number |
hasBorder | — | boolean |
Usage
scrollOrientation
The scrollOrientation prop determines the orientation of the scroll area. It accepts values from the ScrollOrientation enum.
<template>
<ScrollArea
:scrollOrientation="ScrollOrientation.VERTICAL"
/>
</template>
Options
| Value | Description |
|---|---|
VERTICAL | Vertical scroll orientation |
HORIZONTAL | Horizontal scroll orientation |
BOTH | Both axes scroll orientation |
maxHeight
The maxHeight prop sets the maximum height of the scroll area in pixels. If the content exceeds this height, a scrollbar will appear.
<template>
<ScrollArea
:maxHeight="400"
/>
</template>
hasBorder
The hasBorder prop determines whether the scroll area should have a border. When set to true, a border will be applied around the scroll area.
<template>
<ScrollArea
hasBorder
/>
</template>