# @packpackman/counter

> A React hook for managing counters

Latest version **2.1.0** (published 2023-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @packpackman/counter
pnpm add @packpackman/counter
yarn add @packpackman/counter
bun add @packpackman/counter
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2023-11-25 |
| First published | 2023-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40726 |
| Author | Segun Adebayo |
| Maintainers | raj4646 |
| Keywords | counter, hooks, react, chakra-ui, react-component, counter-hook, count-up, counter-down, numeric |

## Links

- npm: https://www.npmjs.com/package/@packpackman/counter
- Repository: https://github.com/chakra-ui/chakra-ui
- Homepage: https://github.com/chakra-ui/chakra-ui#readme
- Issues: https://github.com/chakra-ui/chakra-ui/issues
- npm.io page: https://npm.io/package/@packpackman/counter

## Dependencies (3)

- [@chakra-ui/number-utils](https://npm.io/package/@chakra-ui/number-utils.md) npm:@packpackman/number-utils@2.0.7
- [@chakra-ui/shared-utils](https://npm.io/package/@chakra-ui/shared-utils.md) npm:@packpackman/shared-utils@2.0.5
- [@chakra-ui/react-use-callback-ref](https://npm.io/package/@chakra-ui/react-use-callback-ref.md) npm:@packpackman/react-use-callback-ref@2.1.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2023-11-25

## README

# Counter

A React hook that provides simple and advance counter functionalities. Mostly
used to create numeric inputs and countdown timers.

## Installation

```sh
yarn add @chakra-ui/counter

# or

npm i @chakra-ui/counter
```

## Import hook

```js
import { useCounter } from "@chakra-ui/counter"
```

## Basic usage

```jsx
export function Example() {
  const counter = useCounter({
    max: 10,
    min: 0,
    step: 0.1,
  })

  return (
    <div>
      <button onClick={() => counter.increment()}>Increment</button>
      <p>{counter.value}</p>
      <button onClick={() => counter.decrement()}>Decrement</button>
    </div>
  )
}
```

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