ScrollView Component
The ScrollView component is a scrollable view container that allows users to scroll through content that is larger than the visible area.
Usage
xml
<scroll-view class="scroll-container" scroll-y="true">
<view class="item">Item 1</view>
<view class="item">Item 2</view>
<view class="item">Item 3</view>
<!-- More items -->
</scroll-view>Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
scroll-x | Boolean | false | Allow horizontal scrolling. |
scroll-y | Boolean | false | Allow vertical scrolling. |
scroll-top | Number | - | Set vertical scroll position. |
scroll-left | Number | - | Set horizontal scroll position. |
scroll-into-view | String | - | Scrolls to the element with the given ID. |
auto-scroll | Boolean | false | Enable automatic scrolling. |
scroll-speed | Number | 25.0 | Speed of automatic scrolling. |
scroll-direction | String | vertical | Direction of automatic scrolling (vertical or horizontal). |
Features
- Supports both vertical and horizontal scrolling.
- Supports touch and mouse drag gestures.
- Supports mouse wheel scrolling.
- Supports automatic scrolling with customizable speed and direction.