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-modal

v0.1.2

Published

vue-nt-modal ============

Downloads

2

Readme

vue-nt-modal

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

vue-nt-modal is a modal system library for vue, which utilizes the teleport feature supported by vue 3 to display user-created components (contents) outside of the application. Create outside of the application, implement it so that it doesn't affect the internal layer system, and make it work global, allowing users to display modal on the top-level layer anywhere in the application. Provides the basic structure (header, close button, default button) and the user can import only the modal content part as a component. Also, there is a component that can be comfirmed inside, so you can simply display the confirm modal.

You can specify options related to the window closing function, and depending on the options, you can close the window with the click or esc button. You can also open and close multiple modal sequentially by allowing modal calls inside the modal.

vue-nt-modal은 vue 용 모달 시스템 라이브러리입니다. vue 3부터 지원하는 teleport 기능을 활용 하여 어플리케이션 외부에 사용자가 지정한 컴포넌트(컨텐츠)가 표시 되도록 합니다. 어플리케이션 외부에 생성하여 내부 레이어 시스템의 영향을 주지 않도록 구현하고 전역으로 동작하게 하여 사용자가 어플리케이션 어디에서든 최상위 레이어에 모달을 표시할수있도록 합니다. 기본적인 구조 (헤더, 닫기 버튼, 기본 버튼)를 제공하며 사용자는 모달 컨텐츠 부분만 component로 구현하여 import 시키면 됩니다. 또한 내부에 comfirm 처리가 가능한 component를 갖고 있어 간단하게 confirm 모달을 표시할수있도록 합니다.

창 닫는 기능 관련 옵션을 지정할수있으며 옵션에 따라 click 하거나 esc버튼으로 창을 닫을 수있습니다. 또한 모달 내부에서 모달 호출이 가능하도록 하여 여러개의 모달을 순차적으로 열고 닫을 수 있습니다.


Demo

vue-nt-modal demo page.


Installation

$ npm install vue-nt-modal --save

Usage

Plugin registration


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

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

use Ntmodal show


import { getCurrentInstance } from 'vue';

const { proxy } = getCurrentInstance();

// show modal
proxy.$ntModal.show(
  comp: component name or 'Confirm' // user compoenent name or 'Confirm'
  props: {
      // component props
  },
  options: {
    // This modal`s option
  }
)

use NtModal close


//close modal
<span @click="$emit('close')"> ... </span>

Properties

  • clickToClose: boolean ▶︎ true
    Setting close by click on the background.

  • escapeToClose: boolean ▶︎ true
    Setting close by press the ESC button.