Alert | NativeBase | Universal Components for React and React Native

Search
K
Hire us
Data Display
Typography
Disclosure
Media and Icons
Others
If you are starting a new project, please try gluestack-ui for better performance and new design.
Alert
Alerts convey a state that can influence a system, feature, or page.
Show Code
We are going live in July!
We are happy to announce that we are going live on July 28th. Get ready!
Playground
Import
NativeBase exports 2 Alert related components:
Alert: The wrapper for alert components.
Alert.Icon: The visual icon for the alert that changes based on the status prop.
Copy
import { Alert } from "native-base";
Examples
Basic
We are going live in July!
We are happy to announce that we are going live on July 28th. Get ready!
Playground
Status
Selection successfully moved!
Please try again later!
We are going live in July!
Poor internet connection.
Playground
Variant
solid
Selection successfully moved!
left-accent
Selection successfully moved!
top-accent
Selection successfully moved!
outline
Selection successfully moved!
subtle
Selection successfully moved!
outline-light
Selection successfully moved!
Playground
Composition
Application received!
Your application has been received. We will review your application and respond within the next 48 hours.
Application received!
Your application has been received. We will review your application and respond within the next 48 hours.
Playground
Action
Please try again later!
Your coupon could not be processed at this time.
Re-Open
Playground
Props
Alert
status
The status of the alert
Type: "info" | (string & {}) | "error" | "success" | "warning"
Default: info
variant
The variant of the alert style to use.
Type: ResponsiveValue<"subtle" | "solid" | "outline" | "left-accent" | "top-accent" | "outline-light" | (string & {})>
Default: subtle
colorScheme
The color scheme of the Alert.
Type: ColorSchemeType
Alert.Icon
Styling
NativeBase ships with a default theme for each component. Check out the default theme of the alert.
Info: We can easily extend the alert component theme using extendTheme function as described in the documentation .
Accessibility
Alert has role set to alert.
Nativebase logo
MadeWithNativeBase
Gluestack logo
gluestack-ui