Package-level declarations

Types

Link copied to clipboard
class MosaicSliderColors(activeTrackColor: Color, disabledRangeTrackColor: Color = activeTrackColor, inactiveTrackColor: Color = activeTrackColor.copy(alpha = 0.5f), disabledActiveTrackColor: Color = activeTrackColor.copy(alpha = 0.2f), disabledInactiveTrackColor: Color = activeTrackColor.copy(alpha = 0.2f), thumbColor: Color = activeTrackColor, disabledThumbColor: Color = inactiveTrackColor)

Colors of the slider

Link copied to clipboard
class MosaicSliderState(initialValue: Float, val range: ClosedFloatingPointRange<Float>, disabledRange: ClosedFloatingPointRange<Float>, valueDistribution: SliderValuesDistribution) : DraggableState

A compose state for the Slider component Responsible for managing internal properties such as offset value and drag / click behaviours

Functions

Link copied to clipboard
fun MosaicSlider(state: MosaicSliderState, colors: MosaicSliderColors, modifier: Modifier = Modifier, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, thumb: @Composable (MosaicSliderState) -> Unit = { DefaultSliderThumb(colors = colors, enabled = enabled) })
fun MosaicSlider(value: Float, onValueChange: (Float) -> Unit, colors: MosaicSliderColors, modifier: Modifier = Modifier, enabled: Boolean = true, valueDistribution: SliderValuesDistribution = SliderValuesDistribution.Linear, range: ClosedFloatingPointRange<Float> = 0f..1f, disabledRange: ClosedFloatingPointRange<Float> = EmptyRange, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, thumb: @Composable (MosaicSliderState) -> Unit = { DefaultSliderThumb(colors = colors, enabled = enabled) })

A composable function that creates a slider UI component.

Link copied to clipboard
fun rememberMosaicSliderState(initialValue: Float, range: ClosedFloatingPointRange<Float> = 0f..1f, valueDistribution: SliderValuesDistribution = SliderValuesDistribution.Linear, disabledRange: ClosedFloatingPointRange<Float> = EmptyRange): MosaicSliderState

Creates a MosaicSliderState that holds the state of a slider