SwipeToRevealDefaults

object SwipeToRevealDefaults


An internal object containing some defaults used across the Swipe to reveal component.

Summary

Public properties

SpringSpec<Float>

Default animation spec used when moving between states.

(totalDistance: Float) -> Float

Default position threshold that needs to be swiped in order to transition to the next state.

Float

Default ratio of the content displayed when in RevealValue.RightRevealing state, i.e. all the actions are revealed and the top content is not being swiped.

Public properties

AnimationSpec

Added in 1.5.0-alpha10
val AnimationSpecSpringSpec<Float>

Default animation spec used when moving between states.

PositionalThreshold

Added in 1.5.0-alpha10
val PositionalThreshold: (totalDistance: Float) -> Float

Default position threshold that needs to be swiped in order to transition to the next state. Used in conjunction with RevealingRatio; for example, a threshold of 0.5 with a revealing ratio of 0.7 means that the user needs to swipe at least 35% (0.5 * 0.7) of the component width to go from RevealValue.Covered to RevealValue.RightRevealing and at least 85% (0.7 + 0.5 * (1 - 0.7)) of the component width to go from RevealValue.RightRevealing to RevealValue.RightRevealed.

RevealingRatio

Added in 1.5.0-alpha10
val RevealingRatioFloat

Default ratio of the content displayed when in RevealValue.RightRevealing state, i.e. all the actions are revealed and the top content is not being swiped. For example, a value of 0.7 means that 70% of the width is used to place the actions.