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

@ughur/temper

v1.1.2

Published

Drawer component for React.

Readme

Temper

An unstyled, accessible, and performant drawer component for React. Designed as a flexible modal/drawer pattern for desktop, tablet, and mobile interfaces.


Features

  • Performant & Smooth: Built with physics-based drag interactions and touch gestures.
  • Accessible: Full keyboard navigation, focus trap, and ARIA attributes powered by Radix UI.
  • 📐 Snap Points: Supports multiple snap points, custom height steps, and expandability.
  • 🎨 Unstyled: Complete freedom to style with Tailwind CSS, CSS Modules, or Styled Components.
  • 📱 Mobile First: Built for seamless touch interactions and native sheet feelings on mobile & desktop.

Installation

Install via your preferred package manager:

npm install temper
# or
pnpm add temper
# or
yarn add temper

Quick Start

import { Drawer } from 'temper';

export function Example() {
  return (
    <Drawer.Root>
      <Drawer.Trigger className="px-4 py-2 bg-black text-white rounded-md">
        Open Drawer
      </Drawer.Trigger>
      
      <Drawer.Portal>
        <Drawer.Overlay className="fixed inset-0 bg-black/40" />
        <Drawer.Content className="bg-white flex flex-col rounded-t-[10px] h-[96%] mt-24 fixed bottom-0 left-0 right-0 p-6">
          <div className="mx-auto w-12 h-1.5 flex-shrink-0 rounded-full bg-gray-300 mb-8" />
          
          <Drawer.Title className="text-lg font-medium mb-2">
            Drawer Title
          </Drawer.Title>

          <Drawer.Description className="text-gray-600 mb-4">
            This is a clean, accessible drawer component.
          </Drawer.Description>
          
          <Drawer.Close className="mt-auto py-2 bg-gray-100 rounded-md text-sm">
            Close
          </Drawer.Close>
        </Drawer.Content>
      </Drawer.Portal>
    </Drawer.Root>
  );
}

Background Scaling Effect

To scale the page background when the drawer opens (iOS modal style), wrap your application content with data-temper-drawer-wrapper:

export default function Layout({ children }: { children: React.ReactNode }) {
  return (
    <div data-temper-drawer-wrapper>
      {children}
    </div>
  );
}

Then enable background scaling on the drawer:

<Drawer.Root shouldScaleBackground>
  {/* Drawer components */}
</Drawer.Root>

API Reference

| Component | Description | | :--- | :--- | | Drawer.Root | Main container managing drawer state, snap points, and open/close events. | | Drawer.Trigger | The button or element that opens the drawer. | | Drawer.Portal | Portals the drawer content outside the current DOM hierarchy. | | Drawer.Overlay | Semi-transparent background overlay behind the active drawer. | | Drawer.Content | Main container for drawer inner contents. | | Drawer.Title | Accessible title for screen readers. | | Drawer.Description | Accessible description for screen readers. | | Drawer.Close | Button to trigger drawer closure. |


License

MIT © Ughur