Toast Config
data class ToastConfig(val id: String = "", val title: String? = null, val message: String? = null, val type: ToastType = ToastType.Info, val style: ToastStyle = ToastStyle.Gradient, val showIcon: Boolean = true, val showClose: Boolean = false, val durationSec: Int = 3, val autoDismiss: Boolean = true, val position: ToastPosition? = null, val fullWidth: Boolean? = null, val enterAnimation: ToastEnterAnimation? = null, val action: ToastAction? = null, val appearance: ToastAppearance? = null, val iconContent: @Composable (ToastType) -> Unit? = null, val onToastClick: () -> Unit? = null, val onDismiss: () -> Unit? = null)
Constructors
Link copied to clipboard
constructor(id: String = "", title: String? = null, message: String? = null, type: ToastType = ToastType.Info, style: ToastStyle = ToastStyle.Gradient, showIcon: Boolean = true, showClose: Boolean = false, durationSec: Int = 3, autoDismiss: Boolean = true, position: ToastPosition? = null, fullWidth: Boolean? = null, enterAnimation: ToastEnterAnimation? = null, action: ToastAction? = null, appearance: ToastAppearance? = null, iconContent: @Composable (ToastType) -> Unit? = null, onToastClick: () -> Unit? = null, onDismiss: () -> Unit? = null)
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Visible time before auto-dismiss. Whole seconds only; 0 disables the timer (no auto-dismiss).
Link copied to clipboard
Overrides ToastHost default enter animation for this toast only.
Link copied to clipboard
Layout width: null = full width when position (or host default) is a bottom stripe (ToastPosition.isBottomStripe), capped width at ToastHost.maxToastWidth for top positions.
Link copied to clipboard
Optional custom icon slot. Use this for Image, animated vector, Lottie wrapper, or any composable. If null, ToastX renders built-in icons.
Link copied to clipboard
Link copied to clipboard
Overrides ToastHost alignment for this toast only.
Link copied to clipboard