Introducing reactjs-popup šŸŽ‰ ā€”React popup, Modals, Tooltips and Menusā€Šā€”ā€ŠAll in one

Written by yjose | Published 2018/01/28
Tech Story Tags: react | web-development | javascript | web-design | react-popup

TLDRvia the TL;DR App

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?

  • Built with react fragment thatā€™s mean no additional wrapper Divs in your code or in the trigger element. šŸ˜®
  • Does not inject HTML outside your app root. šŸ“¦
  • Function as children pattern to take control over your popup anywhere in your code. šŸ’Ŗ
  • Modal, Tooltip, Menu, Toast(coming soon)Ā : All in one componentšŸ‹ļø
  • Full style customization. šŸ‘Œ
  • Easy to use. šŸš€
  • All these clocks in at around 3 kB zipped. āš”ļø
  • Animation (coming soon).

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.

Getting Started

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}>          &times;        </a>      </div>    )}  </Popup>);

Complete component APIĀ : Reactjs-popup Component API

Use CasesĀ šŸ™Œ

ALL in one demo

reactjs-popup demo (Modal,tooltip,Menu)

Whatā€™s Next For reactjs-popupĀ ?

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Ā !!!

Show yourĀ support!

Thatā€™s all, thank you for your attention, please star the repo to show your supportā€¦

Read more stories https://elazizi.com/


Published by HackerNoon on 2018/01/28