reactjs-popup Home page https://react-popup.elazizi.com/
This article is about giving you a simple overview of what you can do with reactjs-popup and how to use it effectively.
Today, we are excited to announce reactjs-popup 1.0.
Reactjs-popup is a simple and very small (3 kb) react popup component, with multiple use cases. we created reactjs-popup to create a color picker for our project picsrush a new online image editor. After a while, We decided to make it available for everyone in GitHub and npm repository.
Why do you need to choose reactjs-popup over all other implementation?
How can reactjs-popup help you in your next react project?
If you need to create a simple modal, tooltip or a nested menu this component is your best choice to start with. but first let get started with the component.
This package is available in npm repository as reactjs-popup. It will work correctly with all popular bundlers.
yjose/reactjs-popup_reactjs-popup - React Popup Component - Modals,Tooltips and Menus - All in one_github.com
npm install reactjs-popup --save#using yarnyarn add reactjs-popup -S
Now you can import the component and start using it :
import React from "react";import Popup from "reactjs-popup";export default () => ( <Popup trigger={<button> Trigger</button>} position="right center"> <div>Popup content here !!</div> </Popup>);
You can also use it with function as children pattern.
import React from "react";import Popup from "reactjs-popup";export default () => ( <Popup trigger={<button>Trigger</button>} position="top left"> {close => ( <div> Content here <a className="close" onClick={close}> × </a> </div> )} </Popup>);
Complete component API : Reactjs-popup Component API
ALL in one demo
reactjs-popup demo (Modal,tooltip,Menu)
The next version of reactjs-popup will support creating Simple Toast with full customization, But our big deal is to add Animation API to the component so feel free if you have any ideas 💪.
Thanks for reading! If you think other people should read this post and use this component, clap for me, tweet and share the post.
Remember to follow me on Medium so you can get notified about my future posts.
It your turn now to try it !!!
That’s all, thank you for your attention, please star the repo to show your support…
Read more stories https://elazizi.com/