# dile-checkbox

> Webcomponent dile-checkbox following open-wc recommendations

Latest version **2.0.2** (published 2020-07-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install dile-checkbox
pnpm add dile-checkbox
yarn add dile-checkbox
bun add dile-checkbox
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2020-07-07 |
| First published | 2019-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | @midesweb |
| Maintainers | midesweb |
| Keywords | LitElement, Web Component, Checkbox, Form, Input, Check |

## Links

- npm: https://www.npmjs.com/package/dile-checkbox
- Repository: https://github.com/Polydile/dile-checkbox
- Issues: https://github.com/Polydile/dile-checkbox/issues
- npm.io page: https://npm.io/package/dile-checkbox

## Dependencies (2)

- [lit-html](https://npm.io/package/lit-html.md) ^1.0.0
- [lit-element](https://npm.io/package/lit-element.md) ^2.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2020-07-07
- 2.0.1 — 2019-12-04
- 2.0.0 — 2019-08-07
- 1.2.0 — 2019-08-05
- 1.1.1 — 2019-08-05
- 1.1.0 — 2019-07-07
- 1.0.6 — 2019-07-06
- 1.0.5 — 2019-07-05
- 1.0.4 — 2019-07-05
- 1.0.3 — 2019-07-05
- 1.0.2 — 2019-07-05
- 1.0.1 — 2019-07-05
- 1.0.0 — 2019-07-05

## README

# Moved

**This package has moved** and is now available at [@dile/dile-checkbox](https://github.com/Polydile/dile-components). Please update your dependencies. This repository is no longer maintained.

# \<dile-checkbox>

Web Component to create a customized checkbox input interface, based on LitElement.

Let's [go to DEMOS page](https://dile-checkbox.polydile.com)!

## Installation
```bash
npm i dile-checkbox
```

## Usage
```html
<script type="module">
  import 'dile-checkbox/dile-checkbox.js';
</script>

<dile-checkbox>Label for the element</dile-checkbox>
```

### Properties

- **checked**: Boolean, defines the checkbox state.
- **disabled**: Boolean, mark checkbox as disabled.

### Custom events

- **dile-checkbox-changed**: Every time the checkbox changes emits a dile-checkbox-changed event. The checkbox current state is received in the handler usign the event object "detail" property.

### CSS Custom Properties

You can customize it using CSS Custom Properties.

Custom property | Description | Default
----------------|-------------|---------
--dile-checkbox-checked-color | Checked color for check control | #30a030
--dile-checkbox-unchecked-color | Unchecked color for check control | #ccc
--dile-checkbox-fill-color | Fill color for the check control | #fff
--dile-checkbox-unchecked-fill-color | Checked color for check control when is in unchecked status| #fff
--dile-checkbox-label-color | label regular color | #303030
--dile-checkbox-label-disabled-color | Label color for disabled status | #303030
--dile-checkbox-font-weight | Font weight for te label | normal
--dile-checkbox-size | Checkbox size | 20px
```
<style>
.customized {
  --dile-checkbox-checked-color: #006;
  --dile-checkbox-unchecked-color: #f66;
  --dile-checkbox-fill-color: #fcc;
  --dile-checkbox-unchecked-fill-color: #666;
  --dile-checkbox-label-color: #c57;
  --dile-checkbox-font-weight: bold;
  --dile-checkbox-label-disabled-color: #ddd;
}
</style>

<dile-checkbox checked class="customized">Mark as urgent</dile-checkbox>
```

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