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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-modal-syaku

v2.0.1

Published

react modal

Readme

React Modal

React 16 이상 버전만 지원합니다. IE 11 이상만 지원합니다. 크롬, 사파리, 파이어폭스, IE 11 에서 테스트하였습니다.

  • 1.3.9 : 모달을 한번에 열 수 있는 갯수는 20개로 제한합니다. 옵션 설정을 통해 변경할 수 있습니다.
  • 1.3.7 : React state 사용하지 않고 mobx state 를 사용합니다.
  • 여러 개의 모달을 순차적으로 제어할 수 있습니다.
  • 모달 코드 순서와 상관없이 마지막에 활성화된 모달이 최상위에 노출됩니다.
  • 모달 상태에 따라 임의적인 함수를 실행할 수 있습니다.
  • 모달을 중앙 혹은 원하는 좌표 위치에 배치할 수 있습니다.
  • esc 키를 이용하여 모달 닫을 수 있습니다.
  • 브라우저보다 모달 높이가 클 경우 스크롤을 이용할 수 있습니다.

DEMO : http://syakuis.github.io/demo/react-modal

Install

react, mobx 패키지가 필요합니다.

$ npm install react mobx

$ npm install react-modal-syaku

or

$ yarn add react-modal-syaku

dev server start

// dev
$ yarn dev

build

$ yarn build

Example

Edit react modal demo

import { Modal, createId, open, close, setDefaultProps, getDefaultProps } from 'react-modal-syaku';
import 'react-modal-syaku/dist/react-modal.css';

// Global defaults setter
setDefaultProps(props);

// Global defaults getter
getDefaultProps();

this.id = createId(); // random id

// 대상 모달
<Modal
  id="modal01" // this.id
>
  <div>...</div>
</Modal>

// modal open
<button type="button" className="btn btn-default" onClick={() => { open(this.id); }}>Open</button>

// modal close
close(this.id);


// default props
{
  isOpen: false,
  onClose: null, // 모달을 닫을때 사용되는 함수.

  className: '', // .modal-wrapper node 에 class 를 추가한다.
  style: {}, // .modal-wrapper node 에 style 를 추가한다.
  containerClassName: null, // .modal-container node 에 class 를 추가한다.
  containerStyle: {}, // .modal-container node 에 style 를 추가한다.

  width: '50%',
  height: null,
  top: null, // null 이 아니면 center 옵션이 무시된다.
  left: null, // null 이 아니면 center 옵션이 무시된다.
  isCenter: true,
  isCloseButton: true, // 내부 close 버튼을 표시한다.
  isEscClose: true,

  overlayClassName: null,
  overlayStyle: {},

  zIndex: 3000,

  afterOpen: null,
  beforeOpen: null,
  doneClose: null,
};

Confirm Example

Edit react modal confirm example