Package-level declarations

Types

Link copied to clipboard
interface CubicBezier

Cubic Bezier curve.

Link copied to clipboard
sealed interface SpatialHoverAnimation

Defines SpatialHoverEffects how to animate between active & inactive states

Link copied to clipboard

Holds the context of spatialHoverEffect

Link copied to clipboard

Represents a group for managing spatial hover effects. Each instance has a unique group ID for identifying the group.

Link copied to clipboard
Link copied to clipboard
@Immutable
interface SpatialHoverEffectScope

The scope of spatialHoverEffect DSL

Properties

Link copied to clipboard

Linear bezier curve.

Link copied to clipboard
val RectangleShape: RoundedCornerShape

For SpatialHoverEffectScope.clipShape convenience, a RoundedCornerShape with 0 radius.

Functions

Link copied to clipboard
@Stable
fun CubicBezier(a: Float, b: Float, c: Float, d: Float): CubicBezier
Link copied to clipboard
fun Modifier.disableSpatialHoverEffect(disabled: Boolean): Modifier

Disable all child nodes' hover effect effects.

Link copied to clipboard
@Stable
fun Modifier.spatialHoverEffect(block: SpatialHoverEffectRootScope.(SpatialHoverEffectContext) -> Unit): Modifier

Defines how view should change when a pointer hover or eye looks at the view Unlike androidx.compose.foundation.hoverable, the SpatialHoverEffect is applied out of process, so it can not be visible to app process

fun Modifier.spatialHoverEffect(style: SpatialHoverStyle = SpatialHoverStyle.Default, enabled: Boolean = true): Modifier

Applies a spatial hover effect to the element.

Link copied to clipboard
fun Modifier.spatialHoverEffectGroup(): Modifier

Adds a default HoverEffectGroup to all effects defined on descendant views, and activates the group whenever this view or any descendant views are hovered.

fun Modifier.spatialHoverEffectGroup(group: SpatialHoverEffectGroup, enable: Boolean = true): Modifier

Adds a HoverEffectGroup to all effects defined on descendant views, and activates the group whenever this view or any descendant views are hovered.

Link copied to clipboard
fun SpatialHoverEffectRootScope.spring(dampingRatio: Float = HoverAnimationDefaults.DefaultDumpingRatio, stiffness: Float = HoverAnimationDefaults.DefaultStiffness, delayMillis: Int = 0): SpatialHoverAnimation

Creates Spring animation.

Link copied to clipboard
fun Easing.toCubicBezier(default: () -> CubicBezier = { LinearEasing }): CubicBezier

Helper for converts CubicBezierEasing to CubicBezier.

Link copied to clipboard
fun SpatialHoverEffectRootScope.tween(durationMillis: Int = AnimationConstants.DefaultDurationMillis, delayMillis: Int = 0, easing: Easing = FastOutSlowInEasing): SpatialHoverAnimation
fun SpatialHoverEffectRootScope.tween(durationMillis: Int = AnimationConstants.DefaultDurationMillis, delayMillis: Int = 0, bezier: CubicBezier): SpatialHoverAnimation

Creates Tween animation for spatial hover effect.