npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@prashantnegi878/quick-status

v2.0.3

Published

Online/Offline Status Indicator

Downloads

19

Readme

Quick Status

React-TypeScript Library for Online/Offline Status Popup

Quick Status is a lightweight and easy-to-use React TypeScript library designed to enhance user experience by providing a visual indicator when the user goes offline or comes back online.

Installation

Install Quick Status in your project using npm :

npm install @prashantnegi878/quick-status

Usage

Quick Status is designed to be a hassle-free solution for providing real-time feedback to users regarding their online status.

Without optional parameters:

import React from 'react';
import QuickStatus from '@prashantnegi878/quick-status';

function App() {
  return (
    <div>
      {/* Your main application content */}
      <QuickStatus/>
    </div>
  );
}
export default App;

With optional parameters:

import React from 'react';
import QuickStatus from '@prashantnegi878/quick-status';

function App() {
  return (
    <div>
      {/* Your main application content */}
      <QuickStatus
        bottom="10px"
        right="10px"
        onlineBgColor="green"
        offlineBgColor="red"
        onlineContent="User is back online"
        offlineContent="User is currently offline"
      />
    </div>
  );
}
export default App;

Configuration Options

Quick Status offers a range of customizable parameters to tailor the appearance and messaging of the online/offline status popup according to your project's needs.

  • bottom (Optional):

Example: bottom='10px'

Adjusts the distance of the component from the bottom of the screen.

  • right (Optional):

Example: right='10px'

Sets the distance of the component from the right side of the screen.

  • onlineBgColor (Optional):

Example: onlineBgColor='green'

Specifies the color of the component when the user comes back online.

  • offlineBgColor (Optional):

Example: offlineBgColor='red'

Defines the color of the component when the user goes offline.

  • onlineContent (Optional):

Example: onlineContent='User is back online'

Content to display when the user is back online. This can be plain text or JSX.

  • offlineContent (Optional):

Example: offlineContent='User is currently offline'

Content to display when the user is offline. This can be plain text or JSX.

Features:

Simple Integration: Incorporate the library into your project with minimal effort using the QuickStatus tag.

Customizable Appearance: Tailor the appearance of the popup to suit your application's design. Adjust the distance from the bottom and right of the screen using the optional bottom and right parameters.

Dynamic Colors: Define the colors that best match your application's aesthetic with the onlineBgColor and offlineBgColor parameters, allowing you to choose distinct colors for online and offline states.

Informative Content: Keep your users informed with customizable content for both online and offline states. Utilize the onlineContent and offlineContent parameters to display messages or JSX elements.

Code Snippits

Usage without conditional parameters:

Usage with conditional parameters:

Component Snapshots

When user is Offline:

When user is back Online: