Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wargas/react-modal

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wargas/react-modal

[![Financial Contributors on Open Collective](https://opencollective.com/react-modal/all/badge.svg?label=financial+contributors)](https://opencollective.com/react-modal) ![npm](https://img.shields.io/npm/dm/@wargas/react-modal?label=%E2%8F%ACdownloads&s

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

React-Modal

Financial Contributors on Open Collective npm npm NPM

🎉 React-Modal allows you to add modals to your app with ease. No more nonsense!

Installation

$ npm install --save @wargas/react-modal
$ yarn add @wargas/react-modal

Features

  • Easy to set up for real, you can make it work in less than 10sec!
  • Super easy to customize
  • Swipe to close 👌
  • Can choose swipe position
  • Can display a react component inside the modal!
  • Can remove a modal programmatically
  • Define behavior per toast
  • And much more !

The gist

  import React from 'react';
  import FirstModal from './FirstModal'

  import { ContainerModal, modal } from '@wargas/react-modal';
  import '@wargas/react-modal/dist/index.css';
  
  function App(){
    const open = () => modal(FirstModal, {title: 'My Title', size: 'sm', position:'center'});

    return (
      <div>
        <button onClick={open}>Open Modal!</button>
        <ContainerModal />
      </div>
    );
  }
  export function FirstModal() {
  const {
    close,
    setTitle,
    setSize,
    setPosition,
    options: { data, title },
  } = useModal();

  return (
    <div className="p-5">
        ...
    </div>
  );
}

Contribute

Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! Take a look at the contributing guide.

License

Licensed under MIT

Keywords

FAQs

Package last updated on 23 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc