Skip to content

ScrollBarTheme

ScrollbarTheme #

Customizes the colors, thickness, and shape of scrollbars across the app.

cross_axis_margin #

cross_axis_margin: Number | None = None

Distance from the scrollbar thumb to the nearest cross axis edge in logical pixels. The scrollbar track consumes this space. Must not be null and defaults to 0.

interactive #

interactive: bool | None = None

Whether the Scrollbar should be interactive and respond to dragging on the thumb, or tapping in the track area. When False, the scrollbar will not respond to gesture or hover events, and will allow to click through it. Defaults to True when None, unless on Android, which will default to False when None.

main_axis_margin #

main_axis_margin: Number | None = None

Distance from the scrollbar thumb's start and end to the edge of the viewport in logical pixels. It affects the amount of available paint area. The scrollbar track consumes this space. Mustn't be null and defaults to 0.

min_thumb_length #

min_thumb_length: Number | None = None

The preferred smallest size the scrollbar thumb can shrink to when the total scrollable extent is large, the current visible viewport is small, and the viewport is not overscrolled.

radius #

radius: Number | None = None

The Radius of the scrollbar thumb's rounded rectangle corners.

thickness #

thickness: ControlStateValue[Number | None] | None = None

The thickness of the scrollbar in the cross axis of the scrollable. Property value could be either a single float value or a dictionary with ft.ControlState as keys and float as values.

thumb_color #

thumb_color: ControlStateValue[ColorValue] | None = None

Overrides the default Color of the Scrollbar thumb. The value is either a single color string or ft.ControlState dictionary.

thumb_visibility #

thumb_visibility: ControlStateValue[bool] | None = None

Indicates that the scrollbar thumb should be visible, even when a scroll is not underway. When False, the scrollbar will be shown during scrolling and will fade out otherwise. When True, the scrollbar will always be visible and never fade out. Property value could be either a single boolean value or a dictionary with ft.ControlState as keys and boolean as values.

track_border_color #

track_border_color: ControlStateValue[ColorValue] | None = (
    None
)

Overrides the default Color of the Scrollbar track border. The value is either a single color string or ft.ControlState dictionary.

track_color #

track_color: ControlStateValue[ColorValue] | None = None

Overrides the default Color of the Scrollbar track. The value is either a single color string or ft.ControlState dictionary.

track_visibility #

track_visibility: ControlStateValue[bool] | None = None

Indicates that the scrollbar track should be visible. When True, the scrollbar track will always be visible so long as the thumb is visible. If the scrollbar thumb is not visible, the track will not be visible either. Defaults to False when None. If this property is None, then ScrollbarTheme.track_visibility of Theme.scrollbar_theme is used. If that is also None, the default value is False. Property value could be either a single boolean value or a dictionary with ft.ControlState as keys and boolean as values.