# react-alert
**Repository Path**: mirrors_fis-components/react-alert
## Basic Information
- **Project Name**: react-alert
- **Description**: Fork from https://github.com/schiehll/react-alert.git
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2026-05-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# react-alert [](http://badge.fury.io/js/react-alert) [](https://travis-ci.org/schiehll/react-alert)
A simple react alert (toaster style) component
## Demo
You can see a live demo [here](http://schiehll.github.io/react-alert/).
## Installation
```bash
$ npm install react-alert
```
It expects external `react`, `react-dom` and `react-addons-css-transition-group`.
## Usage
To use it, you have to import the `AlertContainer` component, like this:
```js
import React from 'react';
import AlertContainer from 'react-alert';
export default class App extends React.Component {
constructor(props){
super(props);
this.alertOptions = {
offset: 14,
position: 'bottom left',
theme: 'dark',
time: 5000,
transition: 'scale'
};
}
showAlert(){
msg.show('Some text or component', {
time: 2000,
type: 'success',
icon:
});
}
render(){
return(
//the icon to show in the alert, if none is given the default of each type will be showed
}
```
## Api
Once you have the reference of the `AlertContainer` you can call the following methods:
```js
//show an alert
msg.show('Some message or component');
//show an info alert
msg.info('Some info message or component');
//show a success alert
msg.success('Some success message or component');
//show an error alert
msg.error('Some error message or component');
//removes all alerts from the page
msg.removeAll();
```
## Using React Components as alert content
You can also use a React Component to show a alert message, like this:
```js
//show an alert with a React Component as content
msg.show(