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

@docsplain-kit/utilities

v0.0.36

Published

Docsplain Utilities components for use in React or Next.js.

Readme

@docsplain-kit/utilities

A collection of modern React UI utilities built with TypeScript and Tailwind CSS. This package provides reusable components for common UI patterns including Calendar and RightClickMenu.

🚀 Features

  • 📅 Calendar Component: Interactive date picker with single date and range selection
  • 🖱️ RightClickMenu Component: Context menu with customizable options
  • ⚡ TypeScript Support: Full type safety and IntelliSense
  • 🎨 Tailwind CSS: Modern styling with utility classes
  • 📱 Responsive Design: Mobile-first approach
  • ♿ Accessibility: WCAG compliant components

📦 Installation

npm install @docsplain-kit/utilities

🎯 Quick Start

Calendar Component

import React from 'react';
import { Calendar } from '@docsplain-kit/utilities';

function App() {
  const handleDateChange = (event) => {
    console.log('Selected date:', event.calendarDate);
  };

  return (
    <Calendar
      variant="simple"
      selectedDate={new Date()}
      onChange={handleDateChange}
      size="medium"
    />
  );
}

Range Selection Calendar

import React from 'react';
import { Calendar } from '@docsplain-kit/utilities';

function App() {
  const handleRangeChange = (event) => {
    console.log('Start:', event.start?.calendarDate);
    console.log('End:', event.end?.calendarDate);
  };

  return (
    <Calendar
      variant="range"
      selectedDate={new Date()}
      onChange={handleRangeChange}
      size="medium"
    />
  );
}

RightClickMenu Component

import React from 'react';
import { RightClickMenu } from '@docsplain-kit/utilities';

const menuItems = [
  { label: 'Copy', onClick: () => console.log('Copy') },
  { label: 'Paste', onClick: () => console.log('Paste') },
  { label: 'Delete', onClick: () => console.log('Delete') },
];

function App() {
  return (
    <RightClickMenu menuItems={menuItems}>
      <div>Right-click me!</div>
    </RightClickMenu>
  );
}

📚 API Reference

Calendar Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | variant | 'simple' \| 'range' | 'simple' | Calendar interaction type | | selectedDate | Date | new Date() | Initially selected date | | dateFormat | string | 'YYYY-MM-DD' | Date format for display | | size | 'tiny' \| 'small' \| 'medium' \| 'large' \| 'huge' | 'medium' | Calendar size | | holidays | string[] | [] | Array of holiday dates | | disablePreviousMonths | boolean | false | Disable previous month navigation | | disableSubsequentMonths | boolean | false | Disable next month navigation | | disablePreviousDays | boolean | false | Disable past date selection | | disableSubsequentDays | boolean | false | Disable future date selection | | onChange | (event: CalendarEvent) => void | - | Date selection callback | | dateRange | string[] | [] | Pre-selected date range | | defaultDaysSelected | number | - | Default number of days for range | | canSelectYear | boolean | true | Enable year selection | | canSelectMonth | boolean | true | Enable month selection | | showGoToToday | boolean | false | Show "Go to Today" button |

RightClickMenu Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | menuItems | MenuItem[] | [] | Array of menu items | | wrapperClassName | string | - | Custom wrapper class | | className | string | - | Custom menu class | | headerInfo | ReactNode | - | Header content for menu |

MenuItem Type

interface MenuItem {
  label: string;
  onClick: () => void;
  disabled?: boolean;
  submenu?: MenuItem[];
}

🎨 Styling

This package uses Tailwind CSS for styling. Make sure to include Tailwind CSS in your project:

npm install tailwindcss

Tailwind Configuration

// tailwind.config.js
const withUiKit = require('@docsplain-kit/core/withUiKit');

module.exports = withUiKit({
  content: [
    './src/**/*.{js,ts,jsx,tsx}',
    './node_modules/@docsplain-kit/utilities/**/*.{js,ts,jsx,tsx}',
  ],
  // ... rest of your config
});

📖 Storybook

This package includes Storybook for component documentation and testing:

# Install dependencies
npm install

# Run Storybook locally
npm run dev:storybook

# Build Storybook for deployment
npm run build:storybook

The built Storybook will be available in the storybook-static directory and can be deployed to any static hosting service.

🛠️ Development

Prerequisites

  • Node.js 16+
  • npm or yarn

Setup

# Clone the repository
git clone https://github.com/docsplain/docsplain-ui-utilities.git

# Install dependencies
npm install

# Run Storybook
npm run dev:storybook

Building

# Build the package
npm run build

# Clean build artifacts
npm run clean

📄 License

MIT © Docsplain Company

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📞 Support

For support, email [email protected] or create an issue on GitHub.


Made with ❤️ by the Docsplain team