• Stars
    star
    605
  • Rank 74,072 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple responsive react modal

react-responsive-modal

npm version npm downloads per month codecov

A simple responsive and accessible react modal.

  • Focus trap inside the modal.
  • Centered modals.
  • Scrolling modals.
  • Multiple modals.
  • Accessible modals.
  • Easily customizable via props.
  • Typescript support
  • Small bundle size

Documentation

Installation

With npm: npm install react-responsive-modal --save

Or with yarn: yarn add react-responsive-modal

Usage

Edit react-responsive-modal

import React, { useState } from 'react';
import ReactDOM from 'react-dom';
import 'react-responsive-modal/styles.css';
import { Modal } from 'react-responsive-modal';

const App = () => {
  const [open, setOpen] = useState(false);

  const onOpenModal = () => setOpen(true);
  const onCloseModal = () => setOpen(false);

  return (
    <div>
      <button onClick={onOpenModal}>Open modal</button>
      <Modal open={open} onClose={onCloseModal} center>
        <h2>Simple centered modal</h2>
      </Modal>
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('app'));

Props

Check the documentation: https://react-responsive-modal.leopradel.com/#props.

License

MIT Β© LΓ©o Pradel

More Repositories

1

create-react-app-esbuild

Use esbuild in your create-react-app for faster compilation, development and tests
JavaScript
560
star
2

node-instagram

Instagram api client for node that support promises.
TypeScript
191
star
3

create-react-app-swc

Use swc in your create-react-app for faster compilation, development and tests
JavaScript
129
star
4

esbuild-node-externals

Easily exclude node modules in Esbuild
TypeScript
71
star
5

gitlab-ci-validate

Checks if your .gitlab-ci.yml file is valid.
JavaScript
20
star
6

react-google-photo

React lightbox component using the google photo style
TypeScript
18
star
7

twoblocks

Free and open source 2fa manager built with Stacks
TypeScript
17
star
8

mongodb-bluebird

A simple package mongodb promise
JavaScript
16
star
9

react-minimalist-portal

A minimalist portal for react
JavaScript
15
star
10

stacks-graphql-api

A GraphQL API to query the Stacks blockchain.
12
star
11

stackspulse

Real-Time Gateway to Stacks DeFi.
TypeScript
12
star
12

stacks-next-auth-example

An example of Sign-In with Stacks and NextAuth.js
TypeScript
10
star
13

blockstack-wallet

🚧 The project is still in beta, use it at your own risk 🚧
TypeScript
10
star
14

octon

Notifies you when a new release has been made on repositories you starred on Github or Docker.
JavaScript
9
star
15

craco-blockstack

A craco plugin to use Blockstack with create-react-app
JavaScript
6
star
16

node-social-api

Social api client for node that support promises
JavaScript
6
star
17

find-facebook-id

Find a facebook id given a facebook name
JavaScript
5
star
18

graphql-rules

Utility allowing you to write rules for your graphql resolvers.
JavaScript
5
star
19

docusaurus-plugin-fathom

Fathom analytics plugin for Docusaurus
JavaScript
4
star
20

blockspot

Find the best spots to spend your crypto ⚠️ WIP ⚠️
TypeScript
4
star
21

accounts-js-server-tutorial

JavaScript
3
star
22

ionic-push

A node client for pushing android and ios notifications to your ionic app.
JavaScript
3
star
23

gitlab-ci-validate-rust

Checks if your .gitlab-ci.yml file is valid.
Rust
3
star
24

stacks-nft-guide

JavaScript
2
star
25

stacks-blockchain-api-deploy-fly-guide

Guide to deploy the stacks blockchain node API on Fly.io
Dockerfile
1
star
26

feed-sub

Tracks rss/atom feeds and get notified when they are updated.
JavaScript
1
star
27

ceramic-multi-users

Allow multiple wallets to write on the same ceramic stream via Lit Actions and Unlock protocol
TypeScript
1
star
28

meteor-ionic-push

Ionic push for meteor
JavaScript
1
star
29

defi-arkadiko-compound

Compound an arkadiko pool diko rewards into more LP tokens automatically
TypeScript
1
star
30

nextjs-starter

Next.js starter using the latest tech I use to create projects
TypeScript
1
star
31

blockstack-devtool

A simple devtool interface to help you manage different wallets and contracts on testnet.
TypeScript
1
star