Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

react-toaster

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-toaster

A toast of React

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
43
-25.86%
Maintainers
1
Weekly downloads
 
Created
Source

React-toast

A toast style message tip of React

Installation

npm install react-toast --save-dev

Usage

  • Basic:
var Demo = React.createClass({
    displayName: 'ReactToastDemo',
    onShow: function(){
        this.refs.toast.show('Hei, hei');
    },
    onHide: function(){
        this.refs.toast.hide();
    },
    render: function(){
        return (
            <div className="demo">
                <ReactToast ref="toast" />
                <input type="button" value="Show" onClick={this.onShow}/>
                <input type="button" value="Hide" onClick={this.onHide}/>
            </div>
        );
    }
});
  • Properties:
{
    auto: true, 			// auto hide or not
    duration: 2000,	
    width: '55%',	
    left: '20%',			
    top: '40%',
    color: '#fff',
    background: 'rgba(0, 0, 0, 0.5)',
    opacity: .8,
    zIndex: 9999
}

// usage
<ReactToast ref="toast" duration="1000" background="yellow" .../>
  • Maybe it's more suitable for Mobile Web App.

Release History

  • 0.0.1
    • First release: It's the simplest implementation.

Keywords

react-component

FAQs

Package last updated on 30 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts