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

@bbd-seyoung/headless-calendar

v0.1.18

Published

This package is a true headless component library, which means it comes with minimal styling. All components accept `className` props that you can use to apply your own styles.

Readme

Styling

This package is a true headless component library, which means it comes with minimal styling. All components accept className props that you can use to apply your own styles.

Example with Tailwind CSS

<Calendar className="w-full h-full">
  <CalendarHeader className="flex justify-between items-center p-4 bg-gray-100 rounded-t-lg">
    <div className="flex gap-2 items-center">
      <CalendarHeader.PrevButton className="p-2 rounded hover:bg-gray-200" />
      <CalendarHeader.Title className="text-lg font-semibold" />
      <CalendarHeader.NextButton className="p-2 rounded hover:bg-gray-200" />
    </div>
    <CalendarHeader.TodayButton className="px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600" />
  </CalendarHeader>
  
  <CalendarWeekdays className="grid grid-cols-7 text-center py-2 border-b">
    {(names) => names.map((name, i) => (
      <div key={i} className="text-sm font-medium text-gray-600">{name}</div>
    ))}
  </CalendarWeekdays>
  
  <CalendarGrid className="grid grid-cols-7 gap-1 p-4">
    {({ days }) =>
      days.map((day, index) => (
        <div 
          key={index}
          className={`
            p-2 text-center rounded cursor-pointer
            ${day.isCurrentMonth ? "" : "text-gray-400"}
            ${day.isToday ? "border border-blue-500" : ""}
            ${day.isSelected ? "bg-blue-500 text-white" : "hover:bg-gray-100"}
          `}
          onClick={() => day.selectDate(day.date)}
        >
          {day.day}
        </div>
      ))
    }
  </CalendarGrid>
</Calendar>

Headless Calendar

A flexible and customizable headless calendar component for React applications.

Installation

npm install @bbd-seyoung/headless-calendar

# Or using yarn
yarn add @bbd-seyoung/headless-calendar

# Or using pnpm
pnpm add @bbd-seyoung/headless-calendar

Features

  • Fully customizable UI
  • Month navigation
  • Date selection (single or multiple)
  • Custom weekday and month names
  • Responsive design
  • Headless architecture for maximum flexibility

Usage

import { 
  Calendar,
  CalendarHeader,
  CalendarGrid,
  CalendarWeekdays
} from '@bbd-seyoung/headless-calendar';

const MyCalendar = () => {
  return (
    <div className="w-[500px] h-[300px]">
      <Calendar>
        <CalendarHeader className="flex">
          <CalendarHeader.PrevButton />
          <CalendarHeader.NextButton />
          <CalendarHeader.Title />
        </CalendarHeader>
        <CalendarWeekdays />
        <CalendarGrid>
          {({ days }) =>
            days.map((day, index) => (
              <div 
                key={index}
                className={`
                  p-2 text-center
                  ${day.isCurrentMonth ? "" : "text-gray-400"}
                  ${day.isToday ? "bg-blue-100" : ""}
                  ${day.isSelected ? "bg-blue-500 text-white" : ""}
                `}
                onClick={() => day.selectDate(day.date)}
              >
                {day.day}
              </div>
            ))
          }
        </CalendarGrid>
      </Calendar>
    </div>
  );
};

export default MyCalendar;

API Reference

Calendar

The main component that provides context for all calendar functionality.

<Calendar
  initialMonth={2} // Default: current month
  initialYear={2024} // Default: current year
  selectedDates={[new Date()]} // Default: []
  onDateSelect={(date) => console.log(date)}
  onSelectedDatesChange={(dates) => console.log(dates)}
  weekdayNames={['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']} // Default: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
  monthNames={['January', 'February', /*...*/]} // Default: abbreviated month names
>
  {/* Calendar children */}
</Calendar>

CalendarHeader

Provides navigation controls and title display for the calendar.

<CalendarHeader className="flex justify-between">
  <CalendarHeader.PrevButton />
  <CalendarHeader.Title format={(month, year, monthNames) => `${monthNames[month]} ${year}`} />
  <CalendarHeader.NextButton />
  <CalendarHeader.TodayButton />
</CalendarHeader>

CalendarWeekdays

Displays weekday names.

<CalendarWeekdays className="grid grid-cols-7 text-center" />

CalendarGrid

Renders the days of the month.

<CalendarGrid>
  {({ days }) => 
    days.map((day, index) => (
      <div key={index} onClick={() => day.selectDate(day.date)}>
        {day.day}
      </div>
    ))
  }
</CalendarGrid>

useCalendar Hook

Access calendar data and functions from any component.

import { useCalendar } from '@bbd-seyoung/headless-calendar';

const MyComponent = () => {
  const { 
    days, 
    month, 
    year, 
    today,
    selectedDates,
    goToNextMonth,
    goToPrevMonth,
    goToToday,
    goToMonth,
    selectDate,
    isDateSelected
  } = useCalendar();
  
  // Use these values and functions
  return <div>...</div>;
};

License

MIT