1.1.0 • Published 11 months ago

dropzy v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Dropzy

Dropzy is a customizable drop-down list for your ReactJS project.

Specification

  • Search box : You can use the search box to filter dropdown list items
  • Animation : Animation of drop-down list on opening and closing
  • Responsive : Adapts to all screens size
  • Customizable : Ability to modify several options
  • Accessibility : Navigable with keyboard

Installation

  1. You can install the Dropzy library with npm :
npm install dropzy
  1. Import Dropzy on your ReactJS project :
import { Dropzy } from 'dropzy';
  1. Use the Dropzy component in your React project :
import { useState } from 'react';

import { Dropzy } from 'dropzy';

export default function App() {
	const [value, setValue] = useState('');
    const options = [
        "value 1",
        "value 2"
    ];
	return (
		<div>
			<Dropzy
				value={value}
				setValue={setValue}
				options={options}
			/>
		</div>
	);
}

Options

OptionData typeDefaultExampleRequiredDescription
valuestring''value={value}YESValue of useState with value select by user
setValuefunctionsetValue={setValue}YESFunction useState for change value
optionsarray[]options={['value 1", "value 2"]}YESOptions array
animatebooléan (true | false)truesearchInput={false}NORemove animation when opening and closing dropdown
searchInputbooléan (true | false)truesearchInput={false}NOremoving search box to filter dropdown list items
colorstring'#0486c2'color={'#FFFFFF'}NOChange Background color of the option at hover mouse
selectHeightstring'30px'selectHeight={'100vh'}NOChange drop-down list height size
optionsHeightstring'150px'optionsHeight={'100vh'}NOChange box height size

Developer

Drop-down list create by Kuusenmetsa - Camille Crapat

1.1.0

11 months ago

0.3.3

11 months ago

0.3.2

11 months ago

0.3.1

11 months ago

0.3.0

11 months ago

0.2.1

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago