# @vaadin/active-state-mixin

> This package provides `ActiveStateMixin` that does the following:

Latest version **0.1.8** (published 2020-04-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @vaadin/active-state-mixin
pnpm add @vaadin/active-state-mixin
yarn add @vaadin/active-state-mixin
bun add @vaadin/active-state-mixin
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2020-04-24 |
| First published | 2019-12-20 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 18.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Vaadin Ltd |
| Maintainers | alvarezguille, artur-, diegocardoso, haprog, jouni, manolo, pekam, peppe, platosha, sunzhewyq, tomivirkki, tulioag, vaadin-owner, vlukashov, web-padawan, yuriyyev |

## Links

- npm: https://www.npmjs.com/package/@vaadin/active-state-mixin
- Repository: https://github.com/vaadin/component-mixins
- Homepage: https://github.com/vaadin/component-mixins#readme
- Issues: https://github.com/vaadin/component-mixins/issues
- npm.io page: https://npm.io/package/@vaadin/active-state-mixin

## Dependencies (6)

- [lit-html](https://npm.io/package/lit-html.md) ^1.0.0
- [lit-element](https://npm.io/package/lit-element.md) ^2.0.0
- [@vaadin/mixin-utils](https://npm.io/package/@vaadin/mixin-utils.md) ^0.1.0
- [@vaadin/down-up-mixin](https://npm.io/package/@vaadin/down-up-mixin.md) ^0.1.1
- [@vaadin/keyboard-mixin](https://npm.io/package/@vaadin/keyboard-mixin.md) ^0.1.2
- [@vaadin/disabled-state-mixin](https://npm.io/package/@vaadin/disabled-state-mixin.md) ^0.1.1

## Recent versions

- 0.1.8 (latest) — 2020-04-24
- 0.1.7 — 2020-03-24
- 0.1.6 — 2020-03-18
- 0.1.5 — 2020-03-10
- 0.1.4 — 2020-03-03
- 0.1.3 — 2020-03-02
- 0.1.2 — 2020-02-06
- 0.1.1 — 2019-12-20
- 0.1.0 — 2019-12-20

## README

# @vaadin/active-state-mixin

This package provides `ActiveStateMixin` that does the following:

1. Listen to keyboard, mouse and touch events on the host element

2. Set `active` attribute on the host element in following cases:

- Element has `disabled` property set to `false`
- Mouse: primary (left) button is pressed
- Keyboard: <kbd>Enter</kbd> or <kbd>Space</kbd> is pressed

3. Remove `active` attribute when mouse / key / touch is released.

The mixin accepts a class that must apply `DisabledStateMixin`.

---
_Source: https://npm.io/package/@vaadin/active-state-mixin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
