Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emrd/react-popup-npm-library


https://github.com/emrd/react-popup-npm-library

Last synced: 9 days ago
JSON representation

Awesome Lists containing this project

README

        

# React Popup With Tailwind

This is an library to create a popup with Tailwind easily.

## Installation
```npm i react-popup-package```

## Example Usage

- First, you must install the library using ```npm```
- Install TailwindCSS using ```npm install tailwindcss```
- After that you can use like;
```
import React, { useState } from 'react';
import Popup from 'react-popup-package';

const App = () => {
const [isOpen, setIsOpen] = useState(false);

return (


setIsOpen(true)}
className="bg-blue-500 text-white py-2 px-4 rounded"
>
Open Popup

{isOpen && (
setIsOpen(false)}
/>
)}


);
};

export default App;
```