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

@chakra-ui/counter

Package Overview
Dependencies
Maintainers
3
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

  • 0.0.0-dev-202268165050
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
479K
decreased by-1.23%
Maintainers
3
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 08 Jul 2022

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