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

super-select-react

v0.9.1

Published

An enhanced drop-in replacement for native select with a consistent experience across devices.

Readme

Super Select

Super Select is a drop-in replacement for the native <select> in React.

It keeps the familiar parts of native selects: <option> and <optgroup> children, name, multiple, required, disabled, value, defaultValue, and onChange. The value model and form behavior stay close to the platform, even when the rendered UI is not the browser's native select.

The default mode is a searchable modal inspired by Android's select pattern: the field stays compact in the form, then selection happens in a focused surface. The goal is one select format that works well with mouse, keyboard, and touch, on desktop or mobile.

Super Select adds a few custom props to the standard select API:

  • optionSource provides options from an API or other data source, including search, pagination, and selected value resolution.
  • mode controls how the field is rendered: modal picker, inline option list, toggle buttons, or native <select>.
  • onValueChange gives you the selected value directly when you do not need the full onChange event.
  • customization changes the rendered UI with classes, styles, or replacement components while keeping the selection behavior in Super Select.

See the documentation and live examples for complete usage details.

Installation

npm install super-select-react

Basic Usage

import { SuperSelect } from "super-select-react";
import "super-select-react/style.css";

export function PersonField() {
    return (
        <SuperSelect name="person">
            <option value="robert-balboa">Robert Balboa</option>
            <option value="adrian-pennino">Adrian Pennino</option>
            <option value="apollo-creed">Apollo Creed</option>
        </SuperSelect>
    );
}

Modes

The same field can be rendered in different ways:

<SuperSelect mode="modal" />
<SuperSelect mode="option-list" />
<SuperSelect mode="toggle-button" />
<SuperSelect mode="native" />

modal is the default. option-list renders inline radios or checkboxes. toggle-button renders local options as a compact button group. native renders a real browser <select>.

Async Options

If your options come from an API or other data source, pass an optionSource.

import { SuperSelect, useOptionSource } from "super-select-react";

export function PersonSelect() {
    const peopleSource = useOptionSource(async ({ values, search = "", offset = 0, limit = 100, signal }) => {
        const query = values
            ? values.map((value) => `ids=${encodeURIComponent(value)}`).join("&")
            : `search=${encodeURIComponent(search)}&offset=${offset}&limit=${limit}`;
        const response = await fetch(`/api/people?${query}`, { signal });
        if (!response.ok) {
            throw new Error(`Unable to load people: ${response.status}`);
        }
        const data = await response.json();
        return {
            options: data.items.map((person: { id: string; name: string }) => ({
                value: person.id,
                label: person.name,
            })),
            hasMore: data.hasMore,
        };
    });

    return <SuperSelect name="person" optionSource={peopleSource} />;
}

Super Select sends values when it needs to resolve labels for already-selected options, such as a saved value that is not on the first page. Handle that request so those options come back even when they would not match the current search.

Customization

Super Select is not tied to a UI framework. You can use the default CSS, adapt it to your own classes, or replace pieces of the rendered UI for libraries like Bootstrap, Mantine, or Material UI.

More Information

License

Super Select is available under either the MIT License or The Unlicense, at your choice.