Feedback
Snackbar
A brief message at the bottom of the screen.
iOSReact NativeAndroidReact NativeReact Native tier — renders anywhere
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.
| Prop | Type | Description |
|---|---|---|
| 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 |
message*
stringThe message.
visible*
booleanShows the snackbar while true, fading it in and out. It sets no timer of its own.
actionLabel
stringThe action button's text, on the trailing side. No button without it.
onAction
() => voidThe 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
visibleis true — hiding it after a while is yours to do.