NUI / Components / Scroll, Lists & Data
ScrollBar
ScrollBar renders a scrollbar control that can be styled and connected to behavior.
Supported as a standalone scrollbar control.
Overview
ScrollBar renders a scrollbar control that can be styled and connected to behavior.
When to use
- Use ScrollBar when a standalone scrollbar is needed for a custom scroll surface.
Children
Does not support children.
Basic syntax
ScrollBar PanelScrollbar {
orientation: vertical
}Supported properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
orientation | enum | No | vertical | Scrollbar direction. |
value | number | No | 0 | Scroll value. |
thumbSize | number | No | Default | Thumb size fraction or value. |
command | string | No | Empty | Event Graph command for scroll changes. |
enabled | bool | No | true | Whether the scrollbar can be used. |
focusable | bool | No | true | Whether the scrollbar can receive focus. |
backgroundColor | color | No | Default | Track color. |
thumbColor | color | No | Default | Thumb color. |
width | number | No | Auto | Desired width. |
height | number | No | Auto | Desired height. |
opacity | number | No | 1 | Render opacity. |
visible | bool | No | true | Visibility flag. |
Contextual properties
Contextual property rules
ScrollBar may receive stack, canvas, grid, wrap, or ExpandableArea slot properties only when it is authored as a direct child of the matching parent. See section 7.
Full syntax example
ScrollBar PanelScrollbar {
orientation: vertical
value: 0.25
thumbSize: 0.2
command: "ScrollChanged"
enabled: true
focusable: true
backgroundColor: "#111827"
thumbColor: "#64748B"
width: 12
height: 240
opacity: 1
visible: true
}Limitations
- Use ScrollBox for normal scrollable authored content.
- Use command, not the legacy action alias, in public documentation.