New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-multiple-select-dropdown-lite

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-multiple-select-dropdown-lite

React Multiple Select Light Weight Dropdown list | Searchable | Addable | Groupable etc

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Multiple Select Dropdown Lite

A lightweight Multiple/Single Select component for react using React-Hooks

Production minified 4.6 kb , gzipped 1.6 kb Bundlephobia

Screenshot

react-multiple-select-dropdown-menu

Install

npm i react-multiple-select-dropdown-lite

Basic Initialization

import React, { useState } from 'react'
import MultiSelect from  'react-multiple-select-dropdown-lite'
import  'react-multiple-select-dropdown-lite/dist/index.css'

const App = () => {

	const [value, setvalue] = useState('')

	const  handleOnchange  =  val  => {
		setvalue(val)
	}

	const  options  = [
		{ label:  'Option 1', value:  'option_1'  },
		{ label:  'Option 2', value:  'option_2'  },
		{ label:  'Option 3', value:  'option_3'  },
		{ label:  'Option 4', value:  'option_4'  },
	]

	return(
		<div className="app">
			<div  className="preview-values">
				<h4>Values</h4>
				{value}
			</div>

		<MultiSelect
		onChange={handleOnchange}
		options={options}
		/>

		</div>
)}
export  default App

Features and Roadmap

  • JSON Value
  • Clearable
  • Disable Chip
  • Custom Down Arrow Icon
  • Searchable
  • Disabled
  • Required
  • Group
  • Sublist
  • Select Limit
  • Custom Creatable Value

Props Options

Propstypedefaultdescription
optionsarray""pass options as array of object
label : (string) Options Label
value : Option value
style : (object) custom style
classes : (string) style classes

example:
[ { label : "Option 1", value : "opt_1", style: {textAlign: 'center'}, classes: "classA classB" } ]
onChangefunctionReturn value on input change
widthint300Specify width in px
namestring''specify a name
defaultValuestring | array of object | string array''specify default value
jsonValueboolfalseget value from input as json
singleSelectboolfalseallow one select only
downArrowIconstring | icon | componentIconSpecify custom down arrow icon
clearablebooltrueshow / hide close icon to clear value
downArrowbooltrueshow / hide down icon in dropdown
classNamestring | objectspecify custom class
placeholderstringSelect...Input Placeholder
disableChipboolfalsedisable multiple select chips show value or total selected value only
attrobjectset custom attr to element



Sponsor

License

MIT © Arif-Un | Build for Bit Form

Keywords

FAQs

Package last updated on 09 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc