Alert
Inline message for notices and warnings, with semantic colors, a title, a description and actions.
import { Alert } from "@plexui/react-native"Examples
Overview
Platforms
| iOS 26 | Android | |
|---|---|---|
| Native component | None (a Plex view in the shape of a TipKit tip) | None (a Plex view drawn as a card) |
| Look | Gray rounded card, the icon in the alert's color, capsule actions | A card with 16dp corners, the icon in the alert's color, 40dp capsule actions |
Neither platform has an inline alert: iOS's Alert is the modal Dialog, so an inline message takes the tip's shape.
API
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | Title displayed in the alert |
description | ReactNode | — | Description text |
actions | ReactNode | — | Actions (for example buttons), under the message |
mobileActions | "capsules" | "own" | "capsules" | Capsules side by side, each at least half the alert wide, or the buttons at their own size, starting under the text |
color | "primary" | "danger" | "success" | "info" | "discovery" | "caution" | "warning" | "primary" | Color scheme |
variant | "solid" | "soft" | "outline" | "outline" | Style variant: a soft or outline alert is gray, its icon in the color |
indicator | ReactNode | false | — | Custom indicator or false to hide: an icon takes the alert's color and size, a picture of your own keeps its own |
indicatorSize | "small" | "symbol" | "image" | "small" | A small symbol on the first line; a symbol of 34 (40dp on Android) or an image of 64 (56dp) at the start, the text and the actions in a column beside it |
onDismiss | () => void | — | Shows the close button when set |
dismissLabel | string | "Dismiss" | Accessible name of the close button |
banner | boolean | false | Full-width strip: square corners |
actionsStyle | StyleProp<ViewStyle> | — | Style of the actions' row |
style | StyleProp<ViewStyle> | — | Style of the alert |
testID | string | — | Test id |
The web's actionsPlacement is a desktop setting (on a phone the actions always stand under the message), so React Native has none; actionsStyle and style stand for actionsClassName and className.