# waterbox-component

> A simple web component displaying an isometric water box.

Latest version **0.2.3** (published 2020-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install waterbox-component
pnpm add waterbox-component
yarn add waterbox-component
bun add waterbox-component
```

## 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.3 |
| Published | 2020-01-13 |
| First published | 2020-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 319.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Vincent Wochnik |
| Maintainers | vwochnik |

## Links

- npm: https://www.npmjs.com/package/waterbox-component
- Repository: https://github.com/vwochnik/waterbox-component
- Issues: https://github.com/vwochnik/waterbox-component/issues
- npm.io page: https://npm.io/package/waterbox-component

## Dependencies (3)

- [lit-element](https://npm.io/package/lit-element.md) ^2.2.1
- [@ctrl/tinycolor](https://npm.io/package/@ctrl/tinycolor.md) ^2.6.0
- [@juggle/resize-observer](https://npm.io/package/@juggle/resize-observer.md) ^3.0.2

## Recent versions

- 0.2.3 (latest) — 2020-01-13
- 0.2.2 — 2020-01-12
- 0.2.1 — 2020-01-12
- 0.1.0 — 2020-01-11

## README

<div align="center">
<h1>Waterbox Component</h1>

![Waterbox](preview.png?raw=true "Waterbox")
</div>

> A simple web component displaying an isometric water box.

## Installation

You can use NPM to install this component.

```
npm i --save waterbox-component
```

## Usage

To use this web component in your project you can utilize one of the following styles of syntax.

```
/* In an existing module / web component */
import 'waterbox-component';
/* At top of an application */
<script type="module" src="node_modules/waterbox-component/dist/bundle.js"></script>
/* Alternatives for top of application */
<script type="module">
  import 'waterbox-component';
</script>
```

You can now use the component in your HTML:

```
<water-box value="50"></water-box>
```

This component is responsive. Simply set its `width` and `height` via CSS.

```
water-box {
  width: 100px;
  height: 180px;
}
```

## Properties

<table>
	<tr>
		<th>Property</th>
		<th>Attribute</th>
		<th>Type</th>
		<th>Description</th>
		<th>Example</th>
	</tr>
	<tr>
		<td><code>value</code></td>
		<td><code>value</code></td>
		<td>Number</td>
		<td>Percentual level of water.</td>
		<td><code>50</code></td>
	</tr>
	<tr>
		<td><code>strokeColor</code></td>
		<td><code>stroke-color</code></td>
		<td>String</td>
		<td>Stroke color.</td>
		<td><code>rgba(64,64,64,0.8)</code></td>
	</tr>
	<tr>
		<td><code>fillColor</code></td>
		<td><code>fill-color</code></td>
		<td>String</td>
		<td>Water fill color.</td>
		<td><code>rgba(192,192,225,0.8)</code></td>
	</tr>
	<tr>
		<td><code>boxColor</code></td>
		<td><code>box-color</code></td>
		<td>String</td>
		<td>Box fill color.</td>
		<td><code>rgba(127,127,127,0.8)</code></td>
	</tr>
	<tr>
		<td><code>strokeWidth</code></td>
		<td><code>stroke-width</code></td>
		<td>Number</td>
		<td>Stroke width.</td>
		<td><code>2</code></td>
	</tr>
	<tr>
		<td><code>separators</code></td>
		<td><code>separators</code></td>
		<td>Number</td>
		<td>Number of scale separators.</td>
		<td><code>5</code></td>
	</tr>
	<tr>
		<td><code>drawTop</code></td>
		<td><code>draw-top</code></td>
		<td>Boolean</td>
		<td>Whether to draw the box ceiling.</td>
		<td><code>true</code></td>
	</tr>
	<tr>
		<td><code>contrast</code></td>
		<td><code>contrast</code></td>
		<td>Number</td>
		<td>Color contrast.</td>
		<td><code>15</code></td>
	</tr>
</table>

## License

MIT

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