SlideToUnlockColors

Defines the customizable colors used by a SlideToUnlock component.

This interface allows for a flexible and theme-aware way to style the component. By providing functions that are @Composable, implementations can access MaterialTheme or other CompositionLocal values to create a theme-consistent appearance. The entire interface is marked as Stable to signal to the Compose compiler that implementations can be trusted to be stable, enabling performance optimizations.

See also

Inheritors

Functions

Link copied to clipboard
abstract fun hintColor(slideFraction: Float): Color

Represents the color of the hint text during the swipe gesture. This color typically fades out as the user slides the thumb.

Link copied to clipboard

Represents the color of the circular progress indicator shown during the loading state.

Link copied to clipboard

Represents the color of the hint text after the slide has been completed and the component is in its final state (e.g., loading or success).

Link copied to clipboard
abstract fun thumbBrush(slideFraction: Float): Brush?

Optional gradient brush for the thumb. If not null, this brush will be used instead of a solid color.

Link copied to clipboard

Represents the background color of the draggable thumb.

Link copied to clipboard

Represents the color of the icon displayed inside the thumb (e.g., the arrow).

Link copied to clipboard
abstract fun trackBrush(slideFraction: Float): Brush?

Optional gradient brush for the track. If not null, this brush will be used instead of a solid color.

Link copied to clipboard
abstract fun trackColor(slideFraction: Float): Color

Represents the color of the track. This color can change based on the swipe progress.