SusScrollView

Scrollable content host — vertical, horizontal, or both.
Package
SusKit · Atoms (commercial)
Props
| Name | Type | Default | |
|---|---|---|---|
Mode | Prop<string> | "vertical" | |
HideHorizontal | Prop<bool> | true | |
HideVertical | Prop<bool> | false | |
WheelScrollSize | Prop<float> | 48f |
Slots
No slots.
Events
No public events.
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
sus-scrollsus-scroll__viewsus-scroll__view--nativeunity-base-slider__draggerunity-base-slider__trackerunity-scroll-view__content-and-vertical-scroll-containerunity-scroller__high-buttonunity-scroller__low-buttonunity-scroller--horizontalunity-scroller--vertical
Usage
csharp
var scroll = new SusScrollView();
scroll.Mode.Value = "vertical";
scroll.HideHorizontal.Value = true;
scroll.WheelScrollSize.Value = 48f;
scroll.Add(longListRoot);xml
<template>
<sus:SusScrollView Mode="vertical">
<!-- children go into the scroll content -->
</sus:SusScrollView>
</template>Mode
vertical · horizontal · both
Notes
- Prefer
Add(...)/ClearContent()so children land in the inner content host, not the chrome. SusScrollView.StyleNative(...)helps when wrapping Unity native collection views that fight flex column layout.