Mobile › Feedback
Banner
A message that stays on the screen until it is dealt with, with an optional action and close button.
Installation
npx expo install plankui-mobile react-native-safe-area-context expo-hapticsUsage
import { Banner } from "plankui-mobile";
<Banner
tone="warning"
title="Storage almost full"
message="You've used 9.2 of 10 GB."
action={{ label: "Manage storage", onPress: openStorage }}
onDismiss={() => setShow(false)}
/>iOS and Android
iOS: A tinted rounded card in the content.
Android: A Material banner on a tinted surface.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | The message. | |
| message | string | – | More detail. |
| tone | "info" | "success" | "warning" | "danger" | "info" | Colour and icon. |
| action | { label: string; onPress: () => void } | – | One action. |
| onDismiss | () => void | – | Shows a close button. |