Feedback

Snackbar

A brief message at the bottom of the screen.

iOSReact NativeAndroidReact NativeReact Native tier — renders anywhere
iOSReact Native
AndroidReact Native

Import

ts
import {Snackbar} from '@hzblj/kara-ui'

Props

A short message laid over the bottom of its parent, with an optional action. The React Native tier, drawn the same on both platforms: it needs no host, and it never hides itself.

PropTypeDescription
message*string

The message.

visible*boolean

Shows the snackbar while true, fading it in and out. It sets no timer of its own.

actionLabelstring

The action button's text, on the trailing side. No button without it.

onAction() => void

The action was pressed. The snackbar stays up — turn visible off to hide it.

message*
string

The message.

visible*
boolean

Shows the snackbar while true, fading it in and out. It sets no timer of its own.

actionLabel
string

The action button's text, on the trailing side. No button without it.

onAction
() => void

The action was pressed. The snackbar stays up — turn visible off to hide it.

Platform notes

  • Pinned to the bottom of its parent, above everything in it. It shows while visible is true — hiding it after a while is yours to do.