Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/counter

Package Overview
Dependencies
Maintainers
4
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/counter

A React hook for managing counters

  • 1.0.0-rc.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
471K
decreased by-5.83%
Maintainers
4
Weekly downloads
 
Created
Source

Counter

A React hook that provides simple and advance counter functionalities. Mostly used to create numeric inputs and countdown timers.

Installation

yarn add @chakra-ui/counter

# or

npm i @chakra-ui/counter

Import hook

import { useCounter } from "@chakra-ui/counter"

Basic usage

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>
  )
}

Keywords

FAQs

Package last updated on 27 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc