1.3.2 • Published 5 years ago

@hriczzoli/react-animated_checkbox v1.3.2

Weekly downloads
10
License
MIT
Repository
github
Last release
5 years ago

react-animated_checkbox

A customizable animated checkbox for React

Preview of checkbox

NPM JavaScript Style Guide

Install

npm install --save @hriczzoli/react-animated_checkbox

Usage

import React, { Component } from 'react'

import {default as AnimatedCheckbox} from '@hriczzoli/react-animated_checkbox'

class Example extends Component {
  render () {
    return (
      <AnimatedCheckbox />
    )
  }
}

Props

NameTypeDefaultDescription
idstringtestplain text
namestringNPMplain text
valuenode1anything that can be rendered: numbers, strings, elements or an arra (or fragment) containing these types
onChangefunctionaccepts a function - use e.g. to toggle isChecked state of the component
disabledboolfalsetrue/false to predetermine if checkbox should be checked when component is rendered
fillboolfalsetrue/false to select wether or not checkbox has a green background
import React, { Component } from 'react'

import {default as AnimatedCheckbox} from '@hriczzoli/react-animated_checkbox'

class App extends Component {
  render () {
    return (
      <AnimatedCheckbox
        id="check"
        name="NPM"
        value={2}
        disabled={false}
        onChange={() => { this.setState({ isChecked:!this.state.isChecked })}}
      />
    )
  }
}

License

MIT © hriczzoli

1.3.2

5 years ago

1.3.1

5 years ago

1.2.0

5 years ago

1.3.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago