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

multiselect-component-with-tags

v1.0.3

Published

node version: 14.16.0

Downloads

7

Readme

MultiSelect Component with Tags

node version: 14.16.0

npm version: 7.7.6

About

This npm package creates a mulit-select react component which accepts a list of tags, width (overall width of the component) and input colorPickerArray. Custom functionalities:

  1. Each TagRow is drag & dropable.
  2. Each Tag's text & color is customiable.
  3. Each TagRow can be edited & deletable.
  4. Multiple Tags can be selected for the input.
  5. A Tag can be discarded from the the input by clicking x icon.
  6. New Tags can be created if they are not in list.

Please note

This package have some dependencies on antd Library & react-sortable-hoc.

For development

npm i 

npm run start

Quick Start

import MultiSelect from 'multiselect-component-with-tags';

const tagslist = [
  {
      id: 1,
      label: 'Lead',
      bgColor: 'aqua',
      leftIcon: null
  },
  {
      id: 2,
      label: 'DBC',
      bgColor: 'green',
      leftIcon: null
  },
  { 
      id: 3,
      label: 'Follow',
      bgColor: 'red',
      leftIcon: null
  },
  {
      id: 4,
      label: 'Query',
      bgColor: 'magenta',
      leftIcon: null
  },
  {
      id: 5,
      label: 'Bill',
      bgColor: 'aqua',
      leftIcon: null
  },
  {
      id: 6,
      label: 'Complaint',
      bgColor: 'pink',
      leftIcon: null
  },
]

const colorPickerArray = [
  '#B80000',
  '#DB3E00',
  '#FCCB00',
  '#008B02',
  '#006B76',
  '#1273DE',
  '#004DCF',
  '#5300EB',
  '#EB9694',
  '#FAD0C3',
  '#FEF3BD',
  '#C1E1C5',
  '#BEDADC',
  '#C4DEF6',
  '#BED3F3',
  '#D4C4FB',
];

function App() {
  return (
    <div>
      <MultiSelect
        width="258px"
        tagslist={tagslist}
        colorPickerArray={colorPickerArray}
      />
    </div>
  );
}
 
export default App;

For testing

npm test

For building

npm run build

development Environment

  • Windows 10 (Intel i5 - 8th Gen, RAM - 12GB)
  • Visual Studio Code
  • Visual Studio code Extensions
    • Prettier - Code formatter
    • React Extension Pack
    • Path Intellisense

Test Coverage

Current test coverage is 42.85% (% lines) Click for more Details

npm package link

Storybook link

codesandbox link