KmpSliderStyle

constructor(labelTextStyle: TextStyle = DefaultLabelStyle, labelTextStyleDisabled: TextStyle = DefaultLabelStyle, labelTextOverflow: TextOverflow = TextOverflow.Ellipsis, valueLabelTextStyle: TextStyle = DefaultValueLabelStyle, valueLabelTextStyleDisabled: TextStyle = DefaultValueLabelStyle, valueLabelTextOverflow: TextOverflow = TextOverflow.Clip, valueLabelBackground: Brush = SolidColor(Color(0xFFE5E7EB)), valueLabelBackgroundDisabled: Brush = SolidColor(Color.Transparent), valueLabelShape: Shape = RoundedCornerShape(4.dp), trackBackground: Brush = SolidColor(Color(0xFFE5E7EB)), trackShape: Shape = CircleShape, trackFill: Brush = SolidColor(Color.Black), trackFillDisabled: Brush = SolidColor(Color(0xFF969798)), trackFillAlignment: KmpSliderAlignment = KmpSliderAlignment.Start, trackThickness: Dp = 4.dp, isTrackFullSize: Boolean = false, thumbSize: DpSize = DpSize(24.dp, 24.dp), thumbBackground: Brush = SolidColor(Color.White), thumbBackgroundDisabled: Brush = SolidColor(Color(0xFFF6F6F6)), thumbShape: Shape = CircleShape, thumbShadow: KmpShadow? = KmpShadow(blur = 4.dp, color = Color.Black.copy(alpha = .15f), shape = thumbShape), thumbShadowDisabled: KmpShadow? = null, ticksZIndex: Float = 0.0f)

Parameters

trackFillAlignment

The alignment of the track fill.

  • Start (default): The fill will go from left-to-right for horizontal and bottom-to-top for vertical sliders

  • Center: The fill will start at the center and fill to the left or right for horizontal sliders or top or bottom for vertical sliders.

  • End: The fill will go from right-to-left for horizontal sliders and top-to-bottom for vertical sliders

ticksZIndex

Allows adjusting the Z-layering of the ticks (i.e., whether they display above or below their siblings)

isTrackFullSize

If true, the thumb edges align with the track edges. If false (default), the thumb center aligns with the edges of the track.