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 26Android
Native componentNone (a Plex view in the shape of a TipKit tip)None (a Plex view drawn as a card)
LookGray rounded card, the icon in the alert's color, capsule actionsA 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

PropTypeDefaultDescription
titleReactNode—Title displayed in the alert
descriptionReactNode—Description text
actionsReactNode—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
indicatorReactNode | 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
dismissLabelstring"Dismiss"Accessible name of the close button
bannerbooleanfalseFull-width strip: square corners
actionsStyleStyleProp<ViewStyle>—Style of the actions' row
styleStyleProp<ViewStyle>—Style of the alert
testIDstring—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.