# @gluestack-ui/alert

> A universal headless Alert component for React Native, Next.js & React

Latest version **0.1.16** (published 2024-11-11) · 0 weekly downloads

## Install

```sh
npm install @gluestack-ui/alert
pnpm add @gluestack-ui/alert
yarn add @gluestack-ui/alert
bun add @gluestack-ui/alert
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.1.16 |
| Published | 2024-11-11 |
| First published | 2023-04-19 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5297 |
| Maintainers | rajat693, sravankumarvelangi, vaibhk002, daminipandey, rayan1810, amars29, geekgautam, gluestackadmin, geekashwini, vidhi499, mayankp06, madhavb230100, viraj-10, rohit_singh, meenumakkar, surajahmedc |
| Keywords | react, native, react-native, alert, gluestack-ui, universal, headless, typescript, component, android, ios, nextjs |

## Links

- npm: https://www.npmjs.com/package/@gluestack-ui/alert
- Repository: https://github.com/gluestack/gluestack-ui
- Homepage: https://github.com/gluestack/gluestack-ui/tree/main/packages/unstyled/alert#readme
- Issues: https://github.com/gluestack/gluestack-ui/issues
- npm.io page: https://npm.io/package/@gluestack-ui/alert

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.16 (latest) — 2024-11-11
- 0.1.15 — 2024-07-08
- 0.1.14 — 2024-05-09
- 0.1.13 — 2024-04-03
- 0.1.12 — 2023-10-19
- 0.1.11 — 2023-10-19
- 0.1.10 — 2023-10-17
- 0.1.9 — 2023-09-28
- 0.1.8 — 2023-08-10
- 0.1.7 — 2023-06-29
- 0.1.6 — 2023-06-26
- 0.1.5 — 2023-06-14
- 0.1.4 — 2023-06-09
- 0.1.3 — 2023-06-09
- 0.1.2 — 2023-04-20
- … 2 more at https://npm.io/package/@gluestack-ui/alert/versions

## README

# @gluestack-ui/alert

## Installation

To use `@gluestack-ui/alert`, all you need to do is install the
`@gluestack-ui/alert` package:

```sh
$ yarn add @gluestack-ui/alert

# or

$ npm i @gluestack-ui/alert
```

## Usage

Alerts are used to communicate the status of a system, feature, or page. They indicate a specific state that may require attention from the user. Here's an example how to use this package to create one:

```jsx
import { createAlert } from '@gluestack-ui/alert';
import { Root, Text, Icon } from './styled-components';
export const Alert = createAlert({
  Root,
  Text,
  Icon,
});
```

## Customizing the Alert:

Default styling of all these components can be found in the components/core/alert file. For reference, you can view the [source code](https://github.com/gluestack/gluestack-ui/blob/development/example/storybook/src/ui-components/Alert/index.tsx) of the styled `Alert` components.

```jsx
// import the styles
import { Root, Text, Icon } from '../components/core/alert/styled-components';

// Understanding the API
const Alert: any = Root;
AlertIcon = Icon;
AlertText = Text;

// Using the alert component
export default () => (
  <Alert>
    <AlertIcon />
    <AlertText />
  </Alert>
);
```

More guides on how to get started are available
[here](https://ui.gluestack.io/docs/components/feedback/alert)

---
_Source: https://npm.io/package/@gluestack-ui/alert · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
