Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emrd/react-popup-npm-library
https://github.com/emrd/react-popup-npm-library
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/emrd/react-popup-npm-library
- Owner: EmrD
- Created: 2024-10-20T15:36:07.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2024-10-20T15:38:26.000Z (28 days ago)
- Last Synced: 2024-10-20T17:54:15.585Z (28 days ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/react-popup-package
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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;
```