Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-simple-toasts

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-toasts

Simple toast popup for React

  • 1.1.2-rc.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-8.93%
Maintainers
1
Weekly downloads
 
Created
Source

react-simple-toasts

Simple toast for React

NPM JavaScript Style Guide

Install

npm install --save react-simple-toasts

Usage

a very simple use

toast(message)

or

toast(message, millisecond = 3000)

import React from 'react'
import toast from 'react-simple-toasts'

const Example = () => (
    <div className="example">
        <button onClick={() => toast('Hello toast!')}>Toast</button>
        <button onClick={() => toast('This message is displayed for 1 second.', 1000)}>One-second toast</button>
    </div>
);

Demo

Default Options

You can set the default settings if you want.

index.js

import { toastConfig } from 'react-simple-toasts';

toastConfig({
  time: 5000,
  className: 'my-toast-message',
});
NameTypeDefaultDescription
timenumber3000The millisecond time that the message is displayed.
classNamestring''Can be used to customize styles.
positionstringcenterleft, center, right


License

MIT © almond-bongbong

Keywords

FAQs

Package last updated on 26 May 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc