1.0.2 • Published 8 months ago

df-checkbox v1.0.2

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

df-checkbox - Get started

Custom checkbox react component built with tailwindcss.

Install

Add checkbox to your project.

npm install --save df-checkbox

* added styles.css to your application *

import 'df-checkbox/styles.css'

Use

Checkbox

import Checkbox from 'df-checkbox';

  const example = () => (
    <div>
       <Checkbox style="primary" label="Check me!"/>
    </div>
  )

Props

type Props = React.ClassAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLInputElement>

&
PropValues
checkboxStyle'primary', 'success'
isDisabledtrue, false
indeterminatetrue, false
labelstring text containing the Checkbox label
classNametailwind classes -> string format
onChangecallback funtion to on change

Override styles

You can easily override any style of component just adding a custom tailwind class inside element's className property. For that, it's required to have tailwindcss as a dependency and setup on the project.

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago