Skip to content

SusScrollView

SusScrollView

Scrollable content host — vertical, horizontal, or both.

Package

SusKit · Atoms (commercial)

Open in Playground

SusKit · Atoms

Props

NameTypeDefault
ModeProp<string>"vertical"
HideHorizontalProp<bool>true
HideVerticalProp<bool>false
WheelScrollSizeProp<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-scroll
  • sus-scroll__view
  • sus-scroll__view--native
  • unity-base-slider__dragger
  • unity-base-slider__tracker
  • unity-scroll-view__content-and-vertical-scroll-container
  • unity-scroller__high-button
  • unity-scroller__low-button
  • unity-scroller--horizontal
  • unity-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.