# @weave-design/behaviors

> Shared component behaviors

Latest version **1.0.0** (published 2023-02-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @weave-design/behaviors
pnpm add @weave-design/behaviors
yarn add @weave-design/behaviors
bun add @weave-design/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 | 1.0.0 |
| Published | 2023-02-22 |
| First published | 2023-02-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 193 |
| Author | Autodesk Inc. |
| Maintainers | hig-bot, wmui51 |

## Links

- npm: https://www.npmjs.com/package/@weave-design/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/@weave-design/behaviors

## Dependencies (1)

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

## Recent versions

- 1.0.0 (latest) — 2023-02-22
- 1.0.0-alpha (alpha-1.0.0) — 2023-02-19

## README

# Behaviors

> Shared component behaviors used across component

## Getting started

```bash
yarn add @weave-design/behaviors
```

## Import the component and CSS

```js
import { HoverBehavior } from "@weave-design/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/@weave-design/behaviors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
