> The **<ScrollBar>** component defines the behavior style of the scrollable area, and its subnodes define the behavior style of the scrollbar.
> The **<ScrollBar>** component defines the behavior style of the scrollable area, and its subnodes define the behavior style of the scrollbar.
>
>
> This component is bound to a scrollable component through **scroller**, and can be used to scroll the scrollable component only when their directions are the same. The **<ScrollBar>** component can be bound to only one scrollable component, and vice versa.
> This component is bound to a scrollable component through **scroller**, and can be used to scroll the scrollable component only when their directions are the same. The **<ScrollBar>** component can be bound to only one scrollable component, and vice versa.
- ScrollBarDirection enums
- ScrollBarDirection enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| -------- | -------- |
| Vertical | Vertical scrollbar. |
| Vertical | Vertical scrollbar. |
| Horizontal | Horizontal scrollbar. |
| Horizontal | Horizontal scrollbar. |
- BarState enums
- BarState enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| -------- | -------- |
| On | Always display. |
| On | Always display the scrollbar. |
| Off | Hide. |
| Off | Hide the scrollbar. |
| Auto | Display on demand (displays when the screen is touched and disappears after 2s of inactivity). |
| Auto | Display the scrollbar on demand (for example, display the scrollbar when the screen is touched or hide the scrollbar after 2s of inactivity). |