gluestack-ui logo
Get Updates
Prompt to React Native UI
Home
Components
Hooks
Apps
MCP Server
Guides
Home
Overview
IntroductionQuick Start
Getting Started
InstallationTooling SetupVS Code ExtensionsFigma UI KitCLIgluestack-ui-nativewind-utils
Core Concepts
AccessibilityUniversal
Performance
Benchmarks
Theme Configuration
Default TokensCustomizing ThemeDark Mode
Components
All Components
Typography
HeadingrscTextrsc
Layout
BoxrscCenterrscDividerHStackrscVStackrscGridalpha, rsc
Feedback
AlertProgressSpinnerToast
Data Display
BadgeCardrscTablealpha
Forms
ButtonCheckboxFormControlInputLinkPressableRadioSelectSliderSwitchTextarea
Overlay
AlertDialogDrawerMenuModalPopoverPortalTooltip
Disclosure
ActionsheetAccordionBottomSheetalpha
Media And Icons
AvatarImageIconrsc
Others
FabSkeletonalpha, rsc
Hooks
useBreakPointValue
useMediaQuery
Apps
Dashboard App
Kitchensink App
Todo App
Starter Kit
MCP Server
MCP Server
Guides
Recipes
LinearGradient
Tutorials
Building Ecommerce App
More
Upgrade to v2Upgrade to v3FAQsReleasesRoadmapTroubleshootingDiscord FAQs

Alert

gluestack-ui offers a responsive React Native Alert component with multiple styles. Easily integrate alerts into your UI with customizable React Native alert styles. This is an illustration of Alert component.
variant
action

Installation

Run the following command:

npx gluestack-ui add alert

API Reference

To use this component in your project, include the following import statement in your file.
import { Alert, AlertIcon, AlertText } from '@/components/ui/alert';
anatomy-imageanatomy-image
export default () => (
  <Alert>
    <AlertIcon />
    <AlertText />
  </Alert>
);

Component Props

This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.

Alert

Contains all alert related layout style props and actions. It inherits all the properties of React Native's View component.
PropTypeDefaultDescription
action
error | warning | success | info | mutedinfoDetermines the color scheme of the alert.
variant
solid | outlinesolidDetermines the visual style of the alert.

AlertIcon

It inherits all the properties of React Native's View component.

AlertText

Contains all text related layout style props and actions. It inherits all the properties of React Native's Text component.

Examples

The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.

Alert with CTA

Alert on cloud sync

Warning alert

Alert on confirm password modal

Edit this page on GitHub
Go backGrid
Up nextProgress
Go backGrid
Up nextProgress