Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skycloud1030/react-selectlist
React component used for selecting multiple values or single states from several options
https://github.com/skycloud1030/react-selectlist
checkbox radio react
Last synced: 11 days ago
JSON representation
React component used for selecting multiple values or single states from several options
- Host: GitHub
- URL: https://github.com/skycloud1030/react-selectlist
- Owner: skycloud1030
- License: mit
- Created: 2016-03-16T01:34:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T08:48:31.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T23:59:17.737Z (7 months ago)
- Topics: checkbox, radio, react
- Language: JavaScript
- Homepage: https://skycloud1030.github.io/react-selectlist/html/checkbox.html
- Size: 3.32 MB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-selectlist
[![Travis](https://api.travis-ci.org/skycloud1030/react-selectlist.svg?branch=master)](https://travis-ci.org/skycloud1030/react-selectlist)
[![Coverage Status](https://coveralls.io/repos/github/skycloud1030/react-selectlist/badge.svg?branch=master)](https://coveralls.io/github/skycloud1030/react-selectlist?branch=master)
[![Version](https://img.shields.io/npm/v/react-selectlist.svg)](https://www.npmjs.com/package/react-selectlist)
[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
[![Donloads](https://img.shields.io/npm/dm/react-selectlist.svg)](https://www.npmjs.com/package/react-selectlist)React component used for selecting multiple values or single statess from several options
## Install
```sh
npm i --save react-selectlist
```## Demo
- [preview](https://skycloud1030.github.io/react-selectlist/html/checkbox.html)
- [code](https://github.com/skycloud1030/react-selectlist/blob/gh-pages/app/checkbox.jsx)## props
```js
import ReactSelectList from "react-selectlist";
;
```### data
```sh
data:[
{ value: 1, label: 'Nuggets'},
{ value: 2, label: 'Jazz'},
{ value: 3, label: 'Warriors' },
{ value: 4, label: 'Lakers' },
]or
data:[0,1,2,3,4]
```### value
```sh
array: [1,2,3]
```### valueField & textField
```sh
string: default value & label
```### multiple
```sh
type boolean: true|false
```### orientation
```sh
string :horizontal|vertical
```### onChange
```sh
call back function
The select value return in string array
return (["0","1"],id)
```## License
```sh
MIT
```