🎉Paper UI v2.0 is here!
See what's new

PUCounter Component

A hand-drawn style counter component with increment/decrement controls and smooth animations

Usage

Basic Usage

5

With Suffix

12items

Different Sizes

8
8
8

Disabled State

3

Without Controls

42views

Props

PropTypeRequiredDefaultDescription
modelValuenumberNo0Current counter value
minnumberNo0Minimum value
maxnumberNo999Maximum value
stepnumberNo1Increment/decrement step
suffixstringNo''Text suffix after value
showControlsbooleanNotrueShow increment/decrement buttons
disabledbooleanNofalseDisabled state
sizesmall | medium | largeNomediumCounter size
customClassstringNo''Custom CSS classes

Events

EventPayloadDescription
update:modelValuenumberEmitted when value changes
changenumberEmitted when increment/decrement is clicked

Features

  • Hand-drawn style buttons with organic shadows
  • Smooth animations for value changes
  • Increment/decrement controls with disabled states
  • Optional suffix text
  • Multiple sizes for different use cases
  • Min/max value constraints
  • Customizable step increments
  • Dark mode support
  • Responsive design

Dependencies

  • Tailwind CSS for styling
  • Vue 3 Composition API