Ant Design Inspired Toast Notification Plugin – vanilla-antd-message

Category: Javascript , Notification | February 15, 2019
Author: MinimalistYing
Views Total: 1,371 views
Official Page: Go to website
Last Update: February 15, 2019
License: MIT


Ant Design Inspired Toast Notification Plugin – vanilla-antd-message


A vanilla JavaScript notification library used to create info, success, error, and warning toast messages inspired by Ant Design.

How to use it:

Install the vanilla-antd-message module.

$ npm install vanilla-antd-message --save

Import the vanilla-antd-message.

import message from 'vanilla-antd-message'
import 'vanilla-antd-message/dist/style.css'

Create a new Message instance.

const message = new Message();

Create toast messages with the following syntax.'Info Message', duration, onClose);
message.success('Success Message', duration, onClose);
message.error('Error Message', duration, onClose);
message.warn('Warn Message', duration, onClose);

Change the default duration in milliseconds.

Message.prototype.duration = 3000



  • v1.1.0


  • add onClose callback

You Might Be Interested In:

Leave a Reply