2.1.17 • Published 6 years ago

react-stateless-switcher v2.1.17

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

react-stateless-switcher

React Switcher is a clear lightweight and customizable library for react application.

Stateless, sure.

Install

Just run

npm i react-stateless-switcher

Using

and import Switcher component to your application

import Switcher from 'react-stateless-switcher';

So it`s time to use it

<Switcher
    value={this.state.value}
    onChange={(value) => this.setState({value})}/>

Features

alt text

react-stateless-switcher - is a simple library. That`s mean you should add your own CSS styles. I hope you can.

react-stateless-switcher supports TypeScript/any version of React

Component adds a hidden input that have a value true/false/undefined. It depend on user choice. If you need tripple positioned switcher, just set a nullable property to true.

List of properties

PropertyTypeDetails
idstringoptional
namestringoptional
valueboolean or undefineddetermines the position of switcher
onChangevoidnew value is an argument
classNamestringoptional
disabledbooleanoptional
nullablebooleanoptional
2.1.17

6 years ago

2.1.16

6 years ago

2.1.15

6 years ago

2.1.14

6 years ago

2.1.12

6 years ago