# @chameleon-ds/textarea

> Chameleon textarea

Latest version **2.0.1** (published 2020-06-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @chameleon-ds/textarea
pnpm add @chameleon-ds/textarea
yarn add @chameleon-ds/textarea
bun add @chameleon-ds/textarea
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2020-06-22 |
| First published | 2019-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 28.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | Maritz Motivation Solutions, Inc. |
| Maintainers | kewalter, mandymichel, olerk16, ryuhhnn, tfreiner, zemptime |

## Links

- npm: https://www.npmjs.com/package/@chameleon-ds/textarea
- Repository: https://github.com/MaritzSTL/chameleon
- Homepage: https://github.com/MaritzSTL/chameleon/tree/master/packages/textarea#readme
- Issues: https://github.com/MaritzSTL/chameleon/issues
- npm.io page: https://npm.io/package/@chameleon-ds/textarea

## Dependencies (1)

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

## Recent versions

- 2.0.1 (latest) — 2020-06-22
- 2.0.0 — 2020-06-18
- 1.4.2 — 2020-04-03
- 1.4.0 — 2020-03-23
- 1.3.1 — 2019-12-24
- 1.3.0 — 2019-12-05
- 1.2.1 — 2019-11-21
- 1.2.0 — 2019-11-06
- 1.1.1 — 2019-10-31
- 1.1.0 — 2019-10-30
- 1.0.0 — 2019-10-29
- 0.3.3 — 2019-10-24
- 0.3.2 — 2019-10-23
- 0.3.1 — 2019-10-23
- 0.3.0 — 2019-10-23
- … 9 more at https://npm.io/package/@chameleon-ds/textarea/versions

## README

# Chameleon Textarea

```js script
import { html } from "@open-wc/demoing-storybook";
import { withKnobs, text, number, boolean } from "@open-wc/demoing-storybook";
import "./chameleon-textarea.js";

export default {
  title: "Components|Form Elements/Textarea",
  component: "chameleon-textarea",
  decorators: [withKnobs],
  options: { selectedPanel: "storybookjs/docs/panel" },
};
```

## Properties

| Property Name       | Type(s) | Default Value    | Description                                                                                              |
| ------------------- | ------- | ---------------- | -------------------------------------------------------------------------------------------------------- |
| `autocomplete`      | Boolean | `false`          | A string indicating the type of autocomplete functionality, if any, to allow on the textarea             |
| `spellcheck`        | Boolean | `false`          | Specifies whether the `<textarea>` is subject to spell checking by the underlying browser/OS             |
| `name`              | String  | `"cha-textarea"` | The textarea's form name                                                                                 |
| `autofocus`         | Boolean | `false`          | A Boolean which, if present, makes the textarea take focus when the form is presented                    |
| `cols`              | Number  | `20`             | The visible width of the text control, in average character widths                                       |
| `rows`              | Number  | `2`              | The number of visible text lines for the control                                                         |
| `disabled`          | Boolean | `false`          | A Boolean attribute which is present if the textarea should be disabled                                  |
| `readonly`          | Boolean | `false`          | A Boolean attribute which, if true, indicates that the textarea cannot be edited                         |
| `required`          | Boolean | `false`          | A Boolean which, if true, indicates that the textarea must have a value before the form can be submitted |
| `placeholder`       | String  | `""`             | The textarea's placeholder value                                                                         |
| `value`             | String  | `""`             | The textarea's current value                                                                             |
| `maxLength`         | Number  | `null`           | The textarea's maximum length                                                                            |
| `minxLength`        | Number  | `null`           | The textarea's minimum length                                                                            |
| `label`             | String  | `""`             | The textarea's label text                                                                                |
| `invalid`           | Boolean | `false`          | Invalid boolean to allow validity access from higher level form errors                                   |
| `validationMessage` | String  | `""`             | The textarea's error message                                                                             |
| `nonresizeable`     | Boolean | `false`          | Prevents users from manualy changing the size of the textarea                                            |

## Examples

### Default

```js preview-story
export const Default = () => {
  const disabled = boolean("Disabled", false);
  const label = text("Label", "Description");
  const error = text("Error", "");
  const placeholder = text("Placeholder", "Text...");
  const minlength = number("minlength", 0);
  const maxlength = number("maxlength", 500);
  const rows = number("Rows", 2);
  const cols = number("Columns", 20);
  const nonresizeable = boolean("non-resizeable", false);
  const value = text("Value", "");
  const invalid = boolean("Invalid", false);
  const required = boolean("Required", false);

  return html`
    <chameleon-textarea
      ?disabled="${disabled}"
      ?required="${required}"
      .placeholder="${placeholder}"
      value="${value}"
      .label="${label}"
      .validationMessage="${error}"
      .minlength="${minlength}"
      .maxlength="${maxlength}"
      .rows="${rows}"
      .cols="${cols}"
      ?invalid="${invalid}"
      .nonresizeable="${nonresizeable}"
    ></chameleon-textarea>
  `;
};
```

### Error State

```js preview-story
export const ErrorState = () => html`
  <chameleon-textarea
    label="Description"
    validationMessage="Field cannot be left blank"
    ?invalid="${true}"
  ></chameleon-textarea>
`;
```

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