🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-ghosta

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ghosta

React popup alerts. Lightweight, customizable and beautiful by default.

2.0.0
latest
Source
npm
Version published
Weekly downloads
3
-70%
Maintainers
0
Weekly downloads
 
Created
Source

react-ghosta - Try it out

NPM Version Monthly Downloads License

Popup Alerts for React.
Lightweight, customizable and beautiful by default.


Features

  • 🔩 Easily Customizable
  • ⚛️ Reach Features
  • 🕊 Lightweight
  • Accessible

Installation

With yarn

yarn add react-ghosta

With NPM

npm install react-ghosta

Getting Started

Add the Ghosta and ghosta.css to your app first. It will take care of rendering all alerts emitted. Now you can trigger ghosta.fire() from anywhere!

import { GhostaContainer, ghosta } from 'react-ghosta';
import 'react-ghosta/dist/ghosta.css';

const handleShowAlert = () => ghosta.fire({ title: 'Here is your alert.' });

const App = () => {
  return (
    <div>
      <button onClick={handleShowAlert}>Show me an Alert</button>
      <GhostaContainer />
    </div>
  );
};

Documentation

Find the full API reference on official documentation.

TODO

  • ⬜️ Add variant option and bind icon and icon background color to this option

  • ⬜️ Add timer option to close the popup after some time and add showTimerProgressBar option to show progress of timer.

Keywords

react

FAQs

Package last updated on 06 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts