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-holiday-ui

v1.0.3

Published

React components for adding some fun holiday flair to any application!

Downloads

133

Readme

react-holiday-ui

React components for adding some fun holiday flair to any application!

NPM JavaScript Style Guide

Install

npm install react-holiday-ui

Examples

See examples at https://ericdudley.github.io/react-holiday-ui

screenshot

Usage

  1. Important the holiday component you want to use.
  2. Make sure to import the react-holiday-ui/dist/index.css file.
import React, { Component } from 'react';

import { Christmas } from 'react-holiday-ui';
import 'react-holiday-ui/dist/index.css';

const ExampleComponent = () => {
  return <Christmas />;
};

API

react-holiday-ui exports high-level components as well as the underlying view components. For example, you can use the <Snowman /> or <Snowflakes /> components individually, or you can use the <Christmas /> component which renders them both.

| Holiday | Components| | --- | --- | | Christmas| Snowman, Snowflakes, Christmas |

Toggling

In order to allow users to toggle the holiday UI on and off, you can leverage the following options.

Note: All of the options below persist the toggle state to local storage, so if a user toggles the UI off and refreshes the page, it will still be toggled off.

1. Default ToggleButton component

The ToggleButton component is a default HTML button that can be styled via the styles or className props. It renders 'On' and 'Off' and will toggle the holiday UI.

Note: This component can be used anywhere in your application and does not require any specific component hierarchy.

import React, { Component } from 'react';

import { ToggleButton } from 'react-holiday-ui';
import 'react-holiday-ui/dist/index.css';

const ExampleComponent = () => {
  return <ToggleButton className="example-class" style={{ height: '24px' }} />
};

2. useReactHolidayUI hook

The useReactHolidayUI hook returns an object containing isActive, toggleIsActive, and setIsActive that can be used to build a custom toggle component that better fits into your existing UI.

Note: This hook can be called from anywhere in your application and does not require any specific component hierarchy.

import React, { Component } from 'react';

import { useReactHolidayUI } from 'react-holiday-ui';
import 'react-holiday-ui/dist/index.css';

const CustomToggle = () => {
  const { isActive, toggleIsActive } = useReactHolidayUI();
  return <div>
    <label htmlFor="react-holiday-ui-checkbox">Holiday UI</label>
    <input id="react-holiday-ui-checkbox" type="checkbox" checked={isActive} onChange={toggleIsActive} />
  </div >;
}

Planned features

| Feature| Status| Notes | Last Updated| | --- | --- | --- | --- | | More holidays! | In-progress | Currently, only Christmas is supported, but more holidays are to come! | 2021-12-15| | AutoHoliday | Planned | This component will automatically render the correct holiday UI based on the current date. Waiting till there's more holidays. | 2021-12-15

License

MIT © ericdudley