Package-level declarations

Types

Link copied to clipboard
sealed interface Animation
Link copied to clipboard
sealed interface Duration
Link copied to clipboard
annotation class ExperimentalNudgeApi
Link copied to clipboard
object Icons

An object that holds different sets of icons used throughout the application.

Link copied to clipboard
annotation class InternalNudgeApi
Link copied to clipboard
interface Nudge

Provides various constants and utility functions for managing nudges within a Compose application.

Link copied to clipboard
annotation class NudgeDsl
Link copied to clipboard
sealed interface NudgeModel
Link copied to clipboard

Defines the state for managing and displaying nudges.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
enum Style : Enum<Style>
Link copied to clipboard
enum Type : Enum<Type>

Functions

Link copied to clipboard
fun NudgeState.custom(duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default, content: NudgeLayout)

Displays a customizable nudge with the specified parameters.

Link copied to clipboard
fun NudgeState.display(content: NudgeBuilder.() -> Unit)

Provides a DSL for creating and displaying nudges.

Link copied to clipboard
fun NudgeState.error(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)

Displays an error nudge with the specified parameters.

Link copied to clipboard
fun NudgeState.info(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)

Displays an info nudge with the specified parameters.

Link copied to clipboard
fun NudgeState.loading(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)

Displays a loading nudge with the specified parameters.

Link copied to clipboard
fun NudgeState(maxStack: Int, animation: Animation, placement: Placement, coroutineScope: CoroutineScope): NudgeState

Creates a new instance of NudgeState with the specified parameters.

Link copied to clipboard
fun ProvideNudgeState(state: NudgeState, content: @Composable () -> Unit)

Provides a NudgeState to the Compose hierarchy.

Link copied to clipboard
fun rememberNudgePlacement(placement: Placement = Placement.BottomEnd): Alignment
Link copied to clipboard
fun rememberNudgeState(maxStack: Int = 3, animation: Animation = Animation.Bounce, placement: Placement = Placement.BottomEnd): NudgeState

Creates and remembers an instance of NudgeState with the specified parameters.

Link copied to clipboard

Validates the current NudgeState to ensure that it is correctly configured.

Link copied to clipboard
fun NudgeState.success(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)

Displays a success nudge with the specified parameters.

Link copied to clipboard
fun NudgeState.warning(title: String, description: String? = null, actions: List<NudgeButton> = emptyList(), duration: Duration = NudgeDuration.Persistent, style: Style = Style.Default)

Displays a warning nudge with the specified parameters.