# mui-tri-state-checkbox

> A tri-state checkbox component (false, null, or true) built on material-ui Checkbox

Latest version **0.2.0** (published 2019-12-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install mui-tri-state-checkbox
pnpm add mui-tri-state-checkbox
yarn add mui-tri-state-checkbox
bun add mui-tri-state-checkbox
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-12-06 |
| First published | 2019-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 37.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Tyler Rick |
| Maintainers | tyler.rick |
| Keywords | tri-state, checkbox, check box, material-ui, react, react component, component |

## Links

- npm: https://www.npmjs.com/package/mui-tri-state-checkbox
- Repository: https://github.com/TylerRick/mui-tri-state-checkbox
- npm.io page: https://npm.io/package/mui-tri-state-checkbox

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@mesalvo/react-ui](https://npm.io/package/@mesalvo/react-ui.md) — 1.7K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-12-06
- 0.1.2 — 2019-12-06
- 0.1.1 — 2019-12-05

## README

# mui-tri-state-checkbox

[![npm version](https://badge.fury.io/js/mui-tri-state-checkbox.svg)](https://badge.fury.io/js/mui-tri-state-checkbox)

A tri-state checkbox component (false, null, or true) built on [material-ui](https://material-ui.com/)'s [Checkbox](https://material-ui.com/api/checkbox/)

The `null` state represents an indeterminate state. It's like a "partially checked" state in between `false` and `true`.

Useful for indicating that it is not yet known whether the value is `true` or `false` (such as when the user has never selected a value yet).

# Usage

Example ([Codesandbox](https://codesandbox.io/s/material-demo-1bzfj)):

```js
import React, { useState } from 'react'
import { MuiTriStateCheckbox } from 'mui-tri-state-checkbox'

export default function Demo() {
  const [checked, setChecked] = useState<boolean | null>(null)

  return (
    <>
      <h2>Controlled (checked: {JSON.stringify(checked)})</h2>
      <div>
        <MuiTriStateCheckbox
          value="value"
          checked={checked}
          onChange={(e, checked) => setChecked(checked)}
        />
      </div>
    </>
  )
}
```

# Demo

Start the demo with `yarn start`. (To do: publish it to GitHub pages.)

# Contributing

Pull requests welcome!

# License

This project is free software, licensed under the terms of the [MIT license](/License).

---
_Source: https://npm.io/package/mui-tri-state-checkbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
