UNPKG

6.78 kBMarkdownView Raw
1# Reactjs-popup
2
3## [⚠️ Looking for maintainers for reactjs-popup library](https://github.com/yjose/reactjs-popup/issues/332)
4
5[![Build Status][build-badge]][build]
6[![npm bundle size][npm-bundle-size]][build]
7[![version][version-badge]][package]
8[![downloads][downloads-badge]][npmtrends]
9
10[![MIT License][license-badge]][license]
11[![All Contributors](https://img.shields.io/badge/all_contributors-16-orange.svg?style=flat-square)](#contributors)
12[![PRs Welcome][prs-badge]][prs]
13[![Code of Conduct][coc-badge]][coc]
14
15[![Watch on GitHub][github-watch-badge]][github-watch]
16[![Star on GitHub][github-star-badge]][github-star]
17[![Tweet][twitter-badge]][twitter]
18
19[Reactjs-popup](https://react-popup.elazizi.com) is a simple react popup component that helps you create simple and complex Modals, tooltips, and Menus for your next React App.
20
21You should consider using reactjs-popup for those couple of reasons :
22
23- **βœ… Modal, Tooltip, MenuΒ : All in one library πŸ‹οΈ**
24- **βœ… Very tiny library (3kb) ⚑️**
25- **βœ… Fully accessible**
26- **βœ… Function as children pattern to take control over your popup anywhere in your code πŸ’ͺ**
27- **βœ… Easy to use πŸš€**
28- **βœ… TypeScript Support πŸ‘Œ**
29- **βœ… IE Support. πŸš€**
30- **βœ… Full style customization πŸ‘Œ (js, CSS, styled-components)**
31- **βœ… Support for controlled Modals & Tooltips**
32- **βœ… Default & Custom Animations**
33
34## Demo
35
36This is a simple Demo to demonstrate how you can create Modals, Tooltips, Menus using `reactjs-popup`.
37
38[**Live Demo**](https://react-popup.elazizi.com)
39
40![ reactjs popup demo](https://user-images.githubusercontent.com/11137944/92184555-74556c00-ee49-11ea-81c5-eb2a0087e93a.gif)
41
42---
43
44Sponsored by
45
46[![frigade-sponsor](https://github-production-user-asset-6210df.s3.amazonaws.com/11137944/266065760-a35a2e99-0a97-4d0d-982a-4c48bb2f1886.png)](https://frigade.com/?source=react-popup)
47
48React-JS Popup is proud to be sponsored by [Frigade](https://frigade.com/?source=react-popup), a developer tool for building better product onboarding: guided tours, getting started checklists, announcements, and more.
49
50---
51
52## Installing / Getting started
53
54This package is available in NPM repository as reactjs-popup. It will work correctly with all popular bundlers.
55
56```bash
57npm install reactjs-popup --save
58```
59
60Using yarn
61
62```bash
63yarn add reactjs-popup
64```
65
66## Include the Component
67
68To start using reactjs popup you just need to import the component from the reactjs-popup package.
69
70```jsx
71import React from 'react';
72import Popup from 'reactjs-popup';
73import 'reactjs-popup/dist/index.css';
74
75export default () => (
76 <Popup trigger={<button> Trigger</button>} position="right center">
77 <div>Popup content here !!</div>
78 </Popup>
79);
80```
81
82# Documentation
83
84- [Getting Started](https://react-popup.elazizi.com/)
85- [Modals, Tooltips, Menus examples ](https://react-popup.elazizi.com/react-modal)
86- [Custom Styling](https://react-popup.elazizi.com/css-styling)
87- [Controlled Components](https://react-popup.elazizi.com/controlled-popup)
88- [Animations](https://react-popup.elazizi.com/react-popup-animation)
89- [Migrating from V1 to V2 ](https://react-popup.elazizi.com/migrate-from-v1-to-v2)
90
91# Contributing
92
93### Clone Repo
94
95Fork and then clone the repo
96
97 git clone git@github.com:your-username/reactjs-popup.git
98
99### Start Developing
100
101Install all npm scripts:
102
103 npm install
104 or
105 yarn install
106
107we use [storybook](https://storybook.js.org/) to build popup use cases.
108
109To start storybook:
110
111```
112yarn storybook
113```
114
115Run Test in watch mode
116
117```
118yarn test
119```
120
121To make contributing simply you need to create a new story for your use case under `stories` directory to demonstrate the new features or the bug fix .
122
123Make Changes πŸ˜€.
124
125If you want to contribute check out the [help wanted](https://github.com/yjose/reactjs-popup/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issues for things that need fixing.
126
127Before submitting a pull request run `npm run test` to run the unit tests .
128
129## Licensing
130
131The code in this project is licensed under MIT license.
132
133# Show your support!
134
135## Sponsor
136
137if you are interested to Sponsor this library and list your logo in this section, [Make sure to contact me](https://twitter.com/ElaziziYoussouf).
138
139## Show Your Support
140
141<a href="https://www.buymeacoffee.com/yjose" target="_blank">
142 <img
143 src="https://cdn.buymeacoffee.com/buttons/default-orange.png"
144 alt="Buy Me A Coffee"
145 height="40px"
146 />
147</a>
148<br />
149
150That's all, thank you for your attention, please [![Star on GitHub][github-star-badge]][github-star] the repo to show your support.
151
152we are all made of stars [![Star on GitHub][github-star-badge]][github-star]
153
154## Maintainers
155
156<table>
157 <tbody>
158 <tr>
159 <td align="center">
160 <a href="http://elazizi.com/">
161 <img width="150" height="150" src="https://github.com/yjose.png?v=3&s=150">
162 </br>
163 Youssouf EL Azizi
164 </a>
165 <div>
166 <a href="https://twitter.com/ElaziziYoussouf">
167 <img src="https://img.shields.io/twitter/follow/ElaziziYoussouf.svg?style=social&label=Follow" />
168 </a>
169 </div>
170 </td>
171 </tr>
172 <tbody>
173</table>
174
175[build-badge]: https://img.shields.io/travis/yjose/reactjs-popup.svg?style=flat-square
176[npm-bundle-size]: https://img.shields.io/bundlephobia/minzip/reactjs-popup?style=flat-square
177[build]: https://travis-ci.org/yjose/reactjs-popup
178[version-badge]: https://img.shields.io/npm/v/reactjs-popup.svg?style=flat-square
179[package]: https://www.npmjs.com/package/reactjs-popup
180[downloads-badge]: https://img.shields.io/npm/dt/reactjs-popup.svg?style=flat-square
181[npmtrends]: http://www.npmtrends.com/reactjs-popup
182[license-badge]: https://img.shields.io/npm/l/reactjs-popup.svg?style=flat-square
183[license]: https://github.com/yjose/reactjs-popup/blob/master/LICENSE
184[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
185[prs]: http://makeapullrequest.com
186[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
187[coc]: https://github.com/yjose/reactjs-popup/blob/master/CODE_OF_CONDUCT.md
188[github-watch-badge]: https://img.shields.io/github/watchers/yjose/reactjs-popup.svg?style=social
189[github-watch]: https://github.com/yjose/reactjs-popup/watchers
190[github-star-badge]: https://img.shields.io/github/stars/yjose/reactjs-popup.svg?style=social
191[github-star]: https://github.com/yjose/reactjs-popup/stargazers
192[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20reactjs-popup%20by%20%40ElaziziYoussouf%20https%3A%2F%2Fgithub.com%2Fyjose%2Freactjs-popup%20%F0%9F%91%8D
193[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/yjose/reactjs-popup.svg?style=social
194[all-contributors]: https://github.com/yjose/all-contributors