Package-level declarations

Types

Link copied to clipboard
data class BorderStyle(val color: ColorType, val width: Dp, val miter: Dp? = null, val cap: StrokeCap = DefaultCap, val join: StrokeJoin = DefaultJoin, val pathEffect: PathEffect? = null)

BorderStyle provides information for drawing border

Link copied to clipboard
sealed interface ColorType

Represents a color type. This defines two possible types of colors:

Link copied to clipboard
data class ScrollbarConfig(val indicatorThickness: Dp = 8.dp, val indicatorCornerRadius: Dp = indicatorThickness / 2, val indicatorColor: ColorType = ColorType.Solid(Color.DarkGray.copy(alpha = 0.75f)), val indicatorBorder: BorderStyle = BorderStyle(ColorType.Solid(Color.Transparent), 0.dp), val minimumIndicatorLength: Dp = 24.dp, val maximumIndicatorLength: Dp = Dp.Infinity, val barThickness: Dp = indicatorThickness, val barCornerRadius: Dp = barThickness / 2, val barColor: ColorType = ColorType.Solid(Color.LightGray.copy(alpha = 0.75f)), val barBorder: BorderStyle = BorderStyle(ColorType.Solid(Color.Transparent), 0.dp), val showAlways: Boolean = false, val autoHideAnimationSpec: AnimationSpec<Float>? = null, val padding: PaddingValues = PaddingValues(all = 0.dp), val indicatorPadding: PaddingValues = PaddingValues(all = 0.dp), val isDragEnabled: Boolean = true)

Configuration for customizing the appearance and behavior of a scrollbar.

Link copied to clipboard
class ScrollbarLayout(val layoutDirection: LayoutDirection, val orientation: Orientation, val viewPortLength: Float, val viewPortCrossAxisLength: Float, val contentLength: Float, val contentOffset: Int, val scrollbarAlpha: Float, val density: Float, val fontScale: Float) : Density

Layout configuration of the scrollable container, providing information on the dimensions, orientation, and content offset.

Link copied to clipboard

A scope, which allows to report the ScrollbarMeasurements and further draw the Scrollbar with the measured values inside the DrawScope.

Link copied to clipboard

A function that measures and draws the scrollbar based on the given layout configuration.

Link copied to clipboard
data class ScrollbarMeasurements(val barBounds: Rect, val indicatorBounds: Rect, val alpha: Float)
Link copied to clipboard

State for controlling and managing the scrollbar's properties and activity. This state is responsible for tracking the scrollbar's position, length, and drag activity.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun Rect.applyPadding(density: Density, paddingValues: PaddingValues, layoutDirection: LayoutDirection): Rect
Link copied to clipboard

Create and remember the ScrollbarState for managing scrollbar interactions and properties within a composable.