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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-datepicker-loader-toaster

v1.0.0

Published

Fixed React components for DatePicker, Loader, and Toaster

Readme

React DatePicker, Loader, and Toaster

A simple React component library providing three essential UI components:

  1. DatePicker - A customizable date picker component
  2. Loader - A loading spinner with various sizes and colors
  3. Toaster - A toast notification system

Installation

npm install react-datepicker-loader-toaster

or

yarn add react-datepicker-loader-toaster

Usage

DatePicker Component

The DatePicker must be wrapped in a DateAdapter component:

import React, { useState } from 'react';
import { DatePicker, DateAdapter } from 'react-datepicker-loader-toaster';

function MyComponent() {
  const [date, setDate] = useState(new Date());

  return (
    <DateAdapter>
      <DatePicker 
        label="Select Date" 
        value={date} 
        onChange={setDate} 
      />
    </DateAdapter>
  );
}

Loader Component

The Loader component can be used directly:

import { Loader } from 'react-datepicker-loader-toaster';

function LoadingComponent() {
  return (
    <div>
      <h2>Loading...</h2>
      <Loader size="medium" color="#0066ff" />
    </div>
  );
}

Toaster Component

The Toaster requires the ToasterProvider and useToaster hook:

import React from 'react';
import { ToasterProvider, useToaster } from 'react-datepicker-loader-toaster';

// Wrap your app with ToasterProvider
function App() {
  return (
    <ToasterProvider autoClose={5000}>
      <MyComponent />
    </ToasterProvider>
  );
}

// Use the toaster in any component
function MyComponent() {
  const toaster = useToaster();
  
  const showSuccessToast = () => {
    toaster.add({
      title: 'Success!',
      message: 'Operation completed successfully',
      type: 'success'
    });
  };
  
  return (
    <button onClick={showSuccessToast}>
      Show Success Toast
    </button>
  );
}

Props

DatePicker Props

| Prop | Type | Default | Description | |----------|----------|---------|----------------------------------------| | label | string | - | Label for the date picker | | value | Date | - | Selected date value | | onChange | function | - | Callback function for value changes |

Loader Props

| Prop | Type | Default | Description | |------------|---------|------------|----------------------------------| | size | string | 'medium' | Size of loader ('small', 'medium', 'large') | | color | string | '#0066ff' | Color of the loader | | fullscreen | boolean | false | Whether to display as fullscreen |

ToasterProvider Props

| Prop | Type | Default | Description | |-----------|---------|---------|---------------------------------------| | autoClose | number | 5000 | Auto-close time in milliseconds | | children | node | - | Child components |

Toast Configuration (used with toaster.add())

| Prop | Type | Default | Description | |---------|--------|---------|----------------------------------------| | title | string | - | Title of the toast notification | | message | string | - | Message content | | type | string | 'info' | Type of toast ('success', 'error', 'warning', 'info') |

License

MIT