Package-level declarations

Types

Link copied to clipboard
object ColorUtils
Link copied to clipboard

Miuix default Indication that draws a rectangular overlay when pressed.

Link copied to clipboard

A util class for show popup and dialog.

Link copied to clipboard

OverScrollState is used to control the overscroll effect.

Link copied to clipboard

Platform enum class.

Link copied to clipboard

The type of visual feedback to apply when the component is pressed.

Link copied to clipboard
class SmoothRoundedCornerShape(smoothing: Float = DefaultSmoothing, topStart: CornerSize, topEnd: CornerSize, bottomEnd: CornerSize, bottomStart: CornerSize) : CornerBasedShape

A CornerBasedShape that draws a rectangle with smoothly rounded corners. The smoothing is controlled by the smoothing parameter, which affects how the corners transition from straight edges to curves, often referred to as "squircles".

Link copied to clipboard
data class WindowSize(val width: Int, val height: Int)

Window size data class.

Properties

Link copied to clipboard
const val DefaultSmoothing: Float = 0.6f

Default smoothing value for SmoothRoundedCornerShape. A value of 0.6 is often used to achieve a "squircle" or "superellipse" like appearance.

Link copied to clipboard

Functions

Link copied to clipboard
actual fun BackHandler(enabled: Boolean, onBack: () -> Unit)
expect fun BackHandler(enabled: Boolean, onBack: () -> Unit)

Handles the back event.

actual fun BackHandler(enabled: Boolean, onBack: () -> Unit)
actual fun BackHandler(enabled: Boolean, onBack: () -> Unit)
actual fun BackHandler(enabled: Boolean, onBack: () -> Unit)
actual fun BackHandler(enabled: Boolean, onBack: () -> Unit)
actual fun BackHandler(enabled: Boolean, onBack: () -> Unit)
Link copied to clipboard
Link copied to clipboard

Returns the rounded corner of the current device.

Link copied to clipboard

Returns the current window size.

actual fun getWindowSize(): WindowSize
actual fun getWindowSize(): WindowSize
Link copied to clipboard
fun Modifier.overScrollHorizontal(nestedScrollToParent: Boolean = true, scrollEasing: (currentOffset: Float, newOffset: Float) -> Float? = null, springStiff: Float = OutBoundSpringStiff, springDamp: Float = OutBoundSpringDamp, isEnabled: () -> Boolean = { platform() == Platform.Android || platform() == Platform.IOS }): Modifier
Link copied to clipboard
fun Modifier.overScrollOutOfBound(isVertical: Boolean = true, nestedScrollToParent: Boolean = true, scrollEasing: (currentOffset: Float, newOffset: Float) -> Float?, springStiff: Float = OutBoundSpringStiff, springDamp: Float = OutBoundSpringDamp, isEnabled: () -> Boolean = { platform() == Platform.Android || platform() == Platform.IOS }): Modifier

OverScroll effect for scrollable Composable.

Link copied to clipboard
fun Modifier.overScrollVertical(nestedScrollToParent: Boolean = true, scrollEasing: (currentOffset: Float, newOffset: Float) -> Float? = null, springStiff: Float = OutBoundSpringStiff, springDamp: Float = OutBoundSpringDamp, isEnabled: () -> Boolean = { platform() == Platform.Android || platform() == Platform.IOS }): Modifier
Link copied to clipboard
fun parabolaScrollEasing(currentOffset: Float, newOffset: Float, p: Float = 50.0f, density: Float): Float

A parabolic rolling easing curve.

Link copied to clipboard
actual fun platform(): Platform
expect fun platform(): Platform

Returns the current platform name.

actual fun platform(): Platform
actual fun platform(): Platform
actual fun platform(): Platform
actual fun platform(): Platform
actual fun platform(): Platform
Link copied to clipboard
fun Modifier.pressSink(interactionSource: MutableInteractionSource, sinkAmount: Float = SinkAmount, dampingRatio: Float = DampingRatio, stiffness: Float = Stiffness): Modifier

Applies a "sink" visual feedback when the component is pressed, by scaling the component down smoothly using animation.

Link copied to clipboard
fun Modifier.pressTilt(interactionSource: MutableInteractionSource, tiltAmount: Float = TiltAmount, dampingRatio: Float = DampingRatio, stiffness: Float = Stiffness): Modifier

Applies a "tilt" effect based on the position where the user pressed the component. The tilt direction is determined by touch offset, giving the effect that one corner "sinks" while the other "static".

Link copied to clipboard
fun Modifier.scrollEndHaptic(hapticFeedbackType: HapticFeedbackType = HapticFeedbackType.TextHandleMove): Modifier

Applies a haptic feedback effect when a scrollable container is flung to its boundaries.

Link copied to clipboard
fun SmoothRoundedCornerShape(corner: Dp, smoothing: Float = DefaultSmoothing): SmoothRoundedCornerShape

Creates a SmoothRoundedCornerShape with all corners having the same size and smoothing.

Link copied to clipboard
fun Path.Companion.smoothRoundedRectangle(smoothing: Float, size: Size, topLeft: Float, topRight: Float, bottomLeft: Float, bottomRight: Float): Path

Creates a Path for a rectangle with smoothly rounded corners.

Link copied to clipboard
fun RoundedPolygon.toComposePath(path: Path = Path()): Path

Converts a RoundedPolygon from the AndroidX graphics shapes library to a Jetpack Compose Path.