Kwik Toast
A modern toast component that can be used to display messages to the user.
Parameters
state
: KwikToastState The state of the toast.
modifier
: The modifier for the toast.
Example usage:
val toastState = rememberKwikToastState()
KwikToast(state = toastState)
// Show a toast
toastState.showToast("This is a toast message")
Content copied to clipboard
// show success toast
toastState.showToast("This is a success toast", KwikToastType.SUCCESS)
Content copied to clipboard
// show warning toast
toastState.showToast("This is a warning toast", KwikToastType.WARNING)
Content copied to clipboard
// show with duration
toastState.showToast("This is a 6 seconds toast", 6000L) // 6 seconds
Content copied to clipboard