npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-nt-toast

v0.1.4

Published

Toast system plugin with vue3

Downloads

8

Readme

vue-nt-toast

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

preview

vue-nt-toast is a JavaScript notification system library. It is made available through the installation of the plugin in the Vue project.

It is designed to operate outside the application (the top layer) so as not to affect the application's layer system as much as possible, and provides status indications of "success", "risk", "information", "attention", and "important" depending on the type of content.

You can set multiple options across the system, including theme, location, and snack bar mode, to reflect them in the entire system, and you can also apply options that can be changed every time the user runs it.

vue-nt-toast는 자바스크립트 알림 시스템 라이브러리 입니다. Vue 프로젝트 내 plugin 설치를 통해서 사용 가능하도록 제작 되었습니다. 어플리케이션 외부(최상단 레이어)에서 동작하여 내부 레이어 시스템에 영향을 받지 않게 설계 되었으며 컨텐츠의 종류에 따라 “성공”, “위험”, “정보”, “주의”, “중요” 의 상태 표시를 제공하고있습니다.

테마, 위치, 스낵바 모드 등 여러 옵션을 전역에서 설정 하여 전체 시스템에 반영 하도록 할수있고, 사용자가 실행 할때 마다 변경 가능한 옵션을 적용 할수도 있습니다.


Demo

vue-nt-toast demo page.


Installation

 $ npm install vue-nt-toast —-save

Plugin registration

Import { createApp } from “vue”;
// import module
import NtToast from “vue-nt-toast”;
// import  style css or use yours
import “vue-nt-toast/toast.css”;
 
const app = createApp(App)

Const defaultOptions = {
	// You can set your initial options here
};
app.use(NtToast, defaultOptions)

Usage

  • show(type, contents, options)
  • contents.title (Toast title)
  • contents.description (Toast description)

Set for use global function

// get Proxy in current instance 
import { getCurrentInctance } from 'vue';

// composition api or setup
const { proxy } = getCurrentInstance();

Creating toast (Show toast)

// show success toast
proxy.$ntToast.show('success', ..., ...)

// show another type
proxy.$ntToast.show('info', ..., ...)
proxy.$ntToast.show('danger', ..., ...)

Parameters

| Name | Description | Required | | --- | --- | --- | | type | Status or Colors | true | | contnts.type | Title Text | | | contents.description | Description Text | true | | options | User Custom Options | |

Properties

  • useTitle: boolean ▶︎ true
    Setting for show/hide toast title.

  • useIcon: boolean ▶︎ true
    Setting for show/hide toast status icon.

  • round: boolean ▶︎ false
    Setting for enable/disable round border.

  • closeButton: boolean ▶︎ true
    Setting for show/hide close button.

  • displayOnTop: boolean ▶︎ false
    Setting for order type when toast create.

  • snackbar: boolean ▶︎ false
    Setting for snackbar mode.

  • freeze: boolean ▶︎ false
    Setting for auto close off.

  • timeout: number ▶︎ 5000
    Setting for delay time.

  • theme: string ▶︎ ''
    Setting for toast style. light icon icon-bg line

  • position: string ▶︎ top-right
    Setting for create position.
    v-align(top, bottom) and h-align(left, center, right) and full-width