@blaze-react/checkboxes

0.7.0 • Public • Published

Description

Boxes that are checked (ticked) when activated. They allow you to select single values for submission in a form (or not).

Usage

  • Multiselect
const multiple = [
  {
    label: "First",
    value: 1,
    id: "one"
  },
  {
    label: "Second",
    value: 2,
    id: "two"
  },
  {
    label: "Third",
    value: 3,
    id: "three"
  },
  {
    label: "Disabled",
    value: 4,
    disabled: true
  }
];

<Checkboxes options={multiple} onChange={({ event, value }) => {}} />;
  • Single & required
const single = {
  label: 'Do you agree?',
  required: true
};

<Checkboxes
  options={single}
  boolean
  onChange={({ event, value }) => {}}

API

Checkboxes can receive a number of props as follow:
NAME TYPE DEFAULT
options Array []
disabled Boolean false
required Boolean false
boolean Boolean false
onChange Function () => {}

Readme

Keywords

none

Package Sidebar

Install

npm i @blaze-react/checkboxes

Weekly Downloads

189

Version

0.7.0

License

ISC

Unpacked Size

15.6 kB

Total Files

10

Last publish

Collaborators

  • mcabrerapf
  • tanane
  • daoyong
  • marekb9
  • grzegorzi
  • ishrat
  • andypail