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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@getdrip/much-selector-elm

v0.0.11

Published

A fancy selector web component written (mostly) in elm.

Downloads

2

Readme

<much-selector>

Doge Meme

A web component - powered by Elm - that will create a powerful select menu.

Prior Art/Inspiration/Goals

The project draws heavy inspiration from the jquery based selectize.js.

The need for this project is that we want to use selectize.js however we need the over all app to be built in Elm. Elm needs to "own" the DOM and selectize is built in a way that's not compatible with that.

The goal for this project to achieve near feature parity with selectize using web components. The API will be different, so it will not be a drop in replacement but hopefully it will not be too hard to replace one with the other.

Installation

npm i much-selector-elm

Usage

The npm package gives you the class MuchSelector (which inherits from HTMLElement), what you need to do is use it to define your own element.

import MuchSelector from "@getdrip/much-selector-elm";

if (!customElements.get("much-selector")) {
  // Putting guard rails around this because browsers do not like
  //  having the same custom element defined more than once.
  window.customElements.define("much-selector", MuchSelector);
}

Development

To work on this project, clone the repo to your machine, then.

Initial Setup

Just do like you'd expect to get started. Only development dependencies.

npm install

Watch and Develop

To run a webpack development server with the sandbox/demo page:

npm run watch

Now you can visit http://localhost:8000

Production Build

To do a production build run

npm run build

API

DOM

Attributes

selected

The selected attribute is used to set the value of the <much-selector>.

placeholder

The placeholder attribute is used to set the placeholder in the text input of the <much-selector>. Just like in the <input type="text"> it should only show up if the input is empty.

Options

Events

Functions