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

@jeetkhinde/solid-drawer

v1.0.4

Published

A SolidJS component for creating a responsive drawer menu.

Readme

Solid Drawer Component

A reusable drawer component built with SolidJS, designed for client selection and filtering. This package includes a Drawer component, hooks, and stores to manage state effectively.

Features

  • Drawer Component: A customizable drawer with search returned data.
  • Hooks: Predefined hooks for managing state, filtering data, and more.
  • Stores: Shared state management for seamless integration.

Installation

Install the package using your preferred package manager:

# Using npm
npm install @jeetkhinde/solid-drawer

# Using pnpm
pnpm add @jeetkhinde/solid-drawer

# Using bun
bun add @jeetkhinde/solid-drawer

Usage

Importing the Drawer Component

You can use the Drawer component directly in your application:

import { Drawer } from '@jeetkhinde/solid-drawer';
import {
  setData,
  setDrawerTitleStore,
  setDrawSearchPlaceholder,
} from '@jeetkhinde/solid-drawer';
import { dummyClients } from './data/clients';

// Set up the stores
setData(dummyClients);
setDrawerTitleStore('Select a client');
setDrawSearchPlaceholder('Search a client');

const App = () => {
  return (
    <div>
      <Drawer />
    </div>
  );
};

export default App;

DataType

Shape of data. interface DataType { id: string; name: string; }

Using Hooks

This package provides several hooks for managing state:

useDrawer

Manages the open/close state of the drawer.

  • Properties:
    • isOpen: () => boolean - Returns whether the drawer is open.
    • toggleDrawer: () => void - Toggles the drawer state.
    • openDrawer: () => void - Opens the drawer.
    • closeDrawer: () => void - Closes the drawer.

useSelectedData

Manages the selected data state.

  • Properties:
    • selectedData: () => any - Returns the currently selected data of DataType type.
    • setSelectedData: (data: any) => void - Sets the selected data, be shape must be DataType type.

useDataSelectorState

Manages search term, selected index letter, and filtered data.

  • Properties:
    • searchTerm: () => string - Returns the current search term.
    • setSearchTerm: (term: string) => void - Sets the search term.
    • selectedIndexLetter: () => string - Returns the selected index letter.
    • setSelectedIndexLetter: (letter: string) => void - Sets the selected index letter.
    • filteredData: () => any[] - Returns the filtered data.
    • indexLetters: () => string[] - Returns the available index letters.

Stores

The following stores are available for shared state management:

setData

  • Description: Sets the list of data.
  • Type: (data: any[]) => void

setDrawerTitleStore

  • Description: Sets the title of the drawer.
  • Type: (title: string) => void

setDrawSearchPlaceholder

  • Description: Sets the placeholder text for the search input.
  • Type: (placeholder: string) => void

Example

import {
  setData,
  setDrawerTitleStore,
  setDrawSearchPlaceholder,
} from '@jeetkhinde/solid-drawer';

setData(dummyClients);
setDrawerTitleStore('Select client');
setDrawSearchPlaceholder('Search client');

Development

This package is built with:

To build the package locally:

bun run build

License

This project is licensed under the MIT License.