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

documentation-template

v1.0.0

Published

A beautiful, modular documentation template built with React, TypeScript, and Tailwind CSS.

Readme

Documentation Template

A beautiful, modular documentation template built with React, TypeScript, and Tailwind CSS.

Features

  • Dark/Light Mode — Automatic theme detection with manual toggle
  • Responsive Design — Works beautifully on all screen sizes
  • Markdown Support — Full GFM support with syntax highlighting
  • Code Highlighting — Syntax highlighting for 100+ languages
  • Search — Built-in search with keyboard shortcuts (⌘K)
  • Table of Contents — Auto-generated from headings
  • Modular Architecture — Clean component architecture following SOLID principles

Quick Start

npm install
npm run dev

Project Structure

src/
├── components/
│   ├── ui/          # Base UI components (Button, Badge, Icon)
│   ├── docs/        # Documentation components (CodeBlock, Callout, TOC)
│   ├── layout/      # Layout components (Header, Sidebar, DocsLayout)
│   └── pages/       # Page templates (DocPage, HomePage)
├── config/          # Configuration types (DocsConfig)
├── contexts/        # React contexts (DocsContext)
├── content/         # Your documentation content
├── lib/             # Utilities (cn)
└── styles/          # Global styles and CSS variables

Configuration

Create a configuration file for your documentation:

import { DocsConfig } from './config/docs.config';

export const myDocsConfig: DocsConfig = {
  name: 'My Project',
  description: 'Documentation for my project',
  logo: { text: 'MyProject' },
  github: 'https://github.com/user/repo',
  search: { enabled: true },
  navigation: [
    {
      title: 'Getting Started',
      children: [
        { title: 'Introduction', href: '/' },
        { title: 'Installation', href: '/installation' },
      ],
    },
  ],
};

Customization

Theme Colors

All colors use CSS custom properties in src/styles/index.css:

:root {
  --primary: 221 83% 53%;
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;
}

.dark {
  --primary: 217 91% 60%;
  --background: 222 47% 6%;
}

Components

Components follow a variant pattern for easy customization:

const buttonVariants: Record<ButtonVariant, string> = {
  default: 'bg-primary text-primary-foreground',
  secondary: 'bg-secondary text-secondary-foreground',
  ghost: 'hover:bg-accent',
};

Usage

DocPage

Render a documentation page with markdown content:

<DocPage
  content={markdownContent}
  title="Getting Started"
  description="Learn how to use the template"
  prevPage={{ title: 'Home', href: '/' }}
  nextPage={{ title: 'Installation', href: '/install' }}
/>

HomePage

Create a landing page with features:

<HomePage
  title="My Documentation"
  description="Beautiful docs for your project"
  primaryAction={{ label: 'Get Started', href: '/start' }}
  features={[
    { title: 'Feature 1', description: '...', icon: <Icon /> },
  ]}
/>

Callout

Highlight important information:

<Callout variant="warning" title="Important">
  This action cannot be undone.
</Callout>

CodeBlock

Display code with syntax highlighting:

<CodeBlock
  code="const x = 1;"
  language="typescript"
  filename="example.ts"
  showLineNumbers
/>

License

MIT