codebender828 / breadstick-examples

Example application on how to render custom Vue notifications

Home Page:https://breadstick-examples.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🥖 Breadstick Example App

Using breadstick to create custom notifications

⚡️View live demo

About this example application:

This simple Nuxt application shows how to use Breadstick's stacking API to render authored Vue toast notifications.

In this demo I replicated 3 Toast designs and rendered them inside Breadstick:

All the Toasts used in this example were reimplemented using Chakra UI Vue for it's simple/flexible styling API.

The meat and potatoes of this example is in the plugins/breadstick.client.js file. Feel free to copy this and use it in your own applications.

For Vue.js

If you're using raw Vue.js, you can view this gist that provides a similar high-level implementation.

What is Breadstick?

Breadstick is a tiny Vue.js library that provides a simple stacking, positioning, and dismissal API for authored Vue.js toast notifications.

The reason I created it was to give me the flexibility of designing different toast notifications for different apps, so that let Breadstick handle the business logic of positioning, stacking and dismissal.

This allowed me to focus on building beautiful notifications, for different apps/themes, and not worry about them looking out of place. Breadstick let's you handle the appearance of your Toasts, but provides a powerful functional API you can use anywhere in your Vue applications.

Credits

Breadstick was inspired by React's Toasted Notes by Ben McMahen

Build Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn dev

# build for production and launch server
$ yarn build
$ yarn start

# generate static project
$ yarn generate

For detailed explanation on how things work, check out Nuxt.js docs.

About

Example application on how to render custom Vue notifications

https://breadstick-examples.now.sh


Languages

Language:Vue 70.6%Language:JavaScript 29.4%