Coder Social home page Coder Social logo

markbaird / vue-bootstrap-toasts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rakk7/vue-bootstrap-toasts

0.0 1.0 0.0 1.59 MB

Bootstrap 4 toasts with vue

Home Page: https://rakk7.github.io/vue-bootstrap-toasts/demo/

JavaScript 19.02% Vue 80.98%

vue-bootstrap-toasts's Introduction

vue-bootstrap-toasts

This was bulit with bootstrap 4 "toasts" component in mind, so It depends on bootstrap 4.

Demo?

https://rakk7.github.io/vue-bootstrap-toasts/demo/

Why did I create this? there is many of Vue toasts plugins out there?

I created this because I am already working with bootstrap 4, and I needed Vue to make toasts component more dynamic. Other plugins add too much complex I don't need.

How to install?

npm install vue-bootstrap-toasts

How to use it?

1- Import..

import VueBootstrapToasts from "vue-bootstrap-toasts";
Vue.use(VueBootstrapToasts);

2 - Add the component in your html, somewhere at the top..

<Toasts></Toasts>

Or if u want to override default values

<Toasts
	:show-progress="true"
	:rtl="true"
	:max-messages="7"
	:time-out="5000" // 5 secs
	:closeable="true"
></Toasts>

3 - Call these methods where ever you want inside vue..

this.$toast.success('your message');
this.$toast.error('your message');
this.$toast.warning('your message');
this.$toast.info('your message');

Or Pass an options per toast

this.$toast.success("your message", {
	showProgress: true,
	rtl: true,
	timeOut: 0, // infinity
	closeable: false
});

Thats it.

vue-bootstrap-toasts's People

Contributors

dependabot[bot] avatar rakk7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.