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

@ludekarts/scrap-ui

v0.1.4

Published

![Scrap UI Logo](./assets/scarp_ui_logo.svg)

Readme

Scrap UI

Scrap UI Logo

A collection of various React UI components

Installation

pnpm add @ludekarts/scrap-ui

Components

Combobox

Set of accessible primitives to craft a combobox experience that allows users to search and select an option from a dropdown list.

Usage

import { Combobox, ComboboxList, ComboboxInput, ComboboxItem } from "@ludekarts/scrap-ui";
...

const fruits = ["apple", "banana", "cherry", "date", "elderberry", ...];

function CustomCombobox() {
  const [phrase, setPhrase] = useState<string>("");
  const [selectedValue, setSelectedValue] = useState<string>();

  const selectOption = (value: ComboboxSelection) => {
    setSelectedValue(fruits.find((f) => f === value));
  };

  return(
    <Combobox
      selectedValue={selectedValue}
      onOptionSelected={selectOption}
    >
      <ComboboxInput
        name="basic"
        label="List of fruits"
        onChange={(event) => setPhrase(event.target.value.toLocaleLowerCase())}
      />
      <ComboboxList>
        {fruits
          .filter((f) => f.toLocaleLowerCase().includes(phrase))
          .map((fruit) => (
            <ComboboxItem key={fruit} value={fruit}>
              {fruit}
            </ComboboxItem>
          ))}
      </ComboboxList>
    </Combobox>
  );
}

Combobox components breakdown

  • Combobox - Main wrapper component for the combobox functionality

    • selectedValue?: string - Value that represents the currently selected option (set outside of the Combobox).
    • submitValue?: string - Value other than selectedValue to be assigned to the combobox input for form submission.
    • children?: ReactNode - Child components that make up the combobox, typically including ComboboxInput, ComboboxList, and sComboboxItem.
    • onOptionSelected?: fn - Callback function that is called when an option is selected. It can return a boolean value (true) to prevent closing the dropdown.
  • ComboboxInput - Input field for user search and interaction

    • onChange?: fn - Callback function that is called when the input value changes. It receives the input event as an argument.
  • ComboboxList - Container for the dropdown list of options

    • children?: ReactNode - Child components that represent the individual options in the dropdown.
  • ComboboxItem - Individual selectable option in the dropdown list

    • value: string - Value of the option that will be passed to onOptionSelected().
    • empty?: boolean - Mark the item as empty, which will repost null as a selected value.

Dialog

Helper for creating Acceisible Dialogs (modals) with imperative controller.

Usage

import { createDialog } from "@ludekarts/scrap-ui";
...

const [Dialog, dialogController] = createDialog({ animate: true });
...

function CustomDialog() {
  return(
    <main>
    <button onClick={() => dialogController.open()}>Open Dialog</button>

    <Dialog noDismiss>
      <h2>Hello, this is a dialog!</h2>
      <p>You can put any content here.</p>
      <button onClick={dialogController.close}>Close</button>
    </Dialog>
    </main>
  );
}

PopupMenu

...

Show

...