Object

InteractiveScrollbarDefaults

Contains the default values used by Modifier.interactiveScrollbar.

Source set: Common
public object InteractiveScrollbarDefaults

Contains the default values used by Modifier.interactiveScrollbar.

Properties

Thickness

Source set: Common
public val Thickness: Dp = 8.dp

Default thickness for an interactive scrollbar thumb.

CrossAxisTrackInset

Source set: Common
public val CrossAxisTrackInset: Dp = 2.dp

Default cross axis inset for the scrollbar track.

MainAxisTrackInset

Source set: Common
public val MainAxisTrackInset: Dp = 2.dp

Default main axis inset for the scrollbar track.

ThumbMinLength

Source set: Common
public val ThumbMinLength: Dp = 24.dp

Default minimum length of the scrollbar thumb.

ThumbMaxLengthFraction

Source set: Common
public val ThumbMaxLengthFraction: Float = 0.9f

Default maximum length of the scrollbar thumb as a fraction of the track length.

ThumbFadeDurationMillis

Source set: Common
public val ThumbFadeDurationMillis: Int = 250

Default duration of the fade animation in milliseconds.

ThumbFadeDelayMillis

Source set: Common
public val ThumbFadeDelayMillis: Int = 400

Default delay before the scrollbar fades out in milliseconds.

ThumbOpacity

Source set: Common
public val ThumbOpacity: Float = 0.70f

Alpha value applied to the scrollbar thumb when it is idle.

HoveredThumbOpacity

Source set: Common
public val HoveredThumbOpacity: Float = 0.80f

Alpha value applied to the scrollbar thumb when it is hovered.

PressedThumbOpacity

Source set: Common
public val PressedThumbOpacity: Float = 0.95f

Alpha value applied to the scrollbar thumb when it is pressed or dragged.

Functions

colors

Source set: Common
@Composable
    public fun colors(): InteractiveScrollbarColors

Creates an InteractiveScrollbarColors that represents the default colors used in an interactive scrollbar.

colors

Source set: Common
@Composable
    public fun colors(
        thumbColor: Color = Color.Unspecified,
        hoveredThumbColor: Color = Color.Unspecified,
        pressedThumbColor: Color = Color.Unspecified,
        draggedThumbColor: Color = Color.Unspecified,
        trackColor: Color = Color.Unspecified,
    ): InteractiveScrollbarColors

Creates an InteractiveScrollbarColors that represents the default colors used in an interactive scrollbar.

Parameters

thumbColor the default color of the scrollbar thumb when idle.
hoveredThumbColor the color of the scrollbar thumb when hovered.
pressedThumbColor the color of the scrollbar thumb when pressed.
draggedThumbColor the color of the scrollbar thumb when actively dragged.
trackColor the color of the scrollbar track.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: