# @hig/behaviors

> Shared component behaviors

Latest version **2.1.0** (published 2022-01-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @hig/behaviors
pnpm add @hig/behaviors
yarn add @hig/behaviors
bun add @hig/behaviors
```

## 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.1.0 |
| Published | 2022-01-24 |
| First published | 2018-10-31 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 194 |
| Author | Autodesk Inc. |
| Maintainers | hig-bot, devfoncy, nfiniteset, wmui51, staceyshk, grantkellyadsk |

## Links

- npm: https://www.npmjs.com/package/@hig/behaviors
- Repository: https://github.com/Autodesk/hig
- Homepage: https://github.com/Autodesk/hig#readme
- Issues: https://github.com/Autodesk/hig/issues
- npm.io page: https://npm.io/package/@hig/behaviors

## Dependencies (1)

- [prop-types](https://npm.io/package/prop-types.md) ^15.6.1

## Recent versions

- 2.1.0 (latest) — 2022-01-24
- 2.0.0 — 2022-01-13
- 1.1.2 — 2022-01-12
- 1.1.1 — 2019-01-03
- 1.1.0 — 2018-12-11
- 1.0.0 — 2018-10-31

## README

# Behaviors

> Shared component behaviors used across component

## Getting started

```bash
yarn add @hig/behaviors
```

## Import the component and CSS

```js
import { HoverBehavior } from "@hig/behaviors";
```

## Basic usage

```jsx
<HoverBehavior>
  {({ hasHover, onMouseEnter, onMouseLeave }) => (
    <span
      style={{ color: hasHover ? "red" : "white" }}
      onMouseEnter={onMouseEnter}
      onMouseLeave={onMouseLeave}
    >
      Hello World
    </span>
  )}
</HoverBehavior>
```

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