Avara UI

Shadcn Counter

Four animated counters on soft shadowed surfaces: a scale picker, a countdown, a quantity stepper and circular progress. Each is its own component with its own install command, so you add only the one you need.

The slide countdown is the same one the Waitlist launch panel uses.

Applies to this page's previews only

About Shadcn Counter

What it is. Shadcn Counter is four separate components that share a look: ScalePicker (scroll, drag or arrow-key through a range), Countdown (a tray of cells or compact slide tiles), QuantityStepper (plus and minus in four layouts) and CircularProgress (an animated ring).

How it is built. Each one installs on its own and takes only the props it needs. They share a small theme helper (counter-theme.ts) and, for the rolling figure, counter-roll.ts, which install alongside. Icons come from the bundled ui-animated-icons component, so there is no extra npm dependency.

When to use it. Use ScalePicker for age or size pickers, QuantityStepper for cart quantities, CircularProgress for goal rings, and Countdown for product launch or event deadlines.

For AI agents

Hand your agent this brief or the Markdown page, not a screenshot.

When to use

  • Age, size or value pickers (scale-picker), cart quantity controls (quantity-stepper)
  • Goal progress rings (circular-progress), product launch or event countdowns (countdown)

When not to use

Agent notes

  • These are four registry items, not one: scale-picker (ScalePicker), countdown (Countdown), quantity-stepper (QuantityStepper) and circular-progress (CircularProgress). Install only the one the job needs.
  • ScalePicker takes min, max, initialValue, label and suffix; one scroll gesture moves one notch.
  • Countdown takes targetDate and doneLabel; variant="slide" is the tile design the Waitlist uses.
  • QuantityStepper takes variant (default, soft, vertical, card) and clamps to min and max, disabling the buttons at each end.
  • ScalePicker and QuantityStepper keep their count in internal state and expose it through onChange(value); there is no controlled value prop.
  • CircularProgress reads value as a percentage from 0 to 100.
  • Every one takes color; use color="inherit" to take the surrounding text colour.
For AI agents8 variants. Ask the user which one.

Ask before you pick. This page has 8 variants. If the user has not named one and has not asked you to choose for them, ask which they want before you install anything or write code, and show every option with its live link. If they ask you to choose, pick from each variant's best-for and avoid-if lines against their brief, and say why. If the user named a variant, use it and do not ask.

All 8 options as live previews: https://avaraui.com/view/counter

When to use it. Four animated counters, each its own component: a scale picker, a countdown, a quantity stepper or a circular progress ring. First find out which job it must do, then offer only the designs for that job.

When to use something else

  • Counter Section: for a whole statistics section of several numbers rather than one counter.

Gotchas

  • Each job is its own item: `scale-picker`, `countdown`, `quantity-stepper` or `circular-progress`. Install only the one the variant names, and set `variant` where the index lists one.
  • The user's job decides the group: a quantity control, a countdown, or a number that counts up. Do not offer a stepper for a countdown.
  • A countdown's figures read `--` until the first tick so server and client paint the same.

The 8 variants

  1. Scale picker scale-picker

    A big figure over a scale: scroll down to raise it, up to lower it, or drag or use the arrow keys. Light and dark.

    • Best for: picking an age, size, weight or any number in a range
    • Avoid if: you need a plus and minus control or a deadline
    • Traits: scroll or drag, needle on a scale, min and max, onChange
    • Install: npx shadcn@latest add @avara-ui/scale-picker
    • Docs section
  2. Countdown countdown

    Ticks down to a target date: a tray with one gray cell per unit under a pill with a clock. The default countdown.

    • Best for: a sale, launch or event deadline
    • Avoid if: you are counting up or choosing a quantity
    • Traits: cell per unit, clock pill, target date or three days from mount
    • Install: npx shadcn@latest add @avara-ui/countdown
    • Docs section
  3. Slide countdown slide-countdown

    A countdown in the sliding tile design.

    • Best for: a countdown that should feel like flipping tiles
    • Avoid if: you prefer the tray-of-cells look
    • Traits: tile design
    • Install: npx shadcn@latest add @avara-ui/countdown
    • Docs section
  4. Stepper stepper

    A white pill with a gray minus and an accent plus; the figure rolls with a blur. `min` and `max` clamp the value.

    • Best for: a quantity selector in a shop or cart
    • Avoid if: you need a countdown or a statistic
    • Traits: pill, plus and minus buttons, min and max, default stepper
    • Install: npx shadcn@latest add @avara-ui/quantity-stepper
    • Docs section
  5. Soft stepper soft-stepper

    A gray well holding white round buttons.

    • Best for: a gentle stepper inside a card or sidebar
    • Avoid if: it must stand out as the main call to action
    • Traits: gray well, low contrast
    • Install: npx shadcn@latest add @avara-ui/quantity-stepper
    • Docs section
  6. Card stepper card-stepper

    A quantity card: a large figure, an `n of max` chip and a meter that fills with the count.

    • Best for: seats, guests or units where the quantity is the main thing on the surface
    • Avoid if: it must fit inline in a cart row
    • Traits: large figure, meter, own surface
    • Install: npx shadcn@latest add @avara-ui/quantity-stepper
    • Docs section
  7. Vertical stepper vertical-stepper

    The controls are stacked, for tight sidebars.

    • Best for: a narrow column where a horizontal stepper will not fit
    • Avoid if: you have room for the usual horizontal control
    • Traits: stacked controls
    • Install: npx shadcn@latest add @avara-ui/quantity-stepper
    • Docs section
  8. Circular progress circular

    The value drawn as an animated SVG ring instead of a number alone.

    • Best for: a goal or completion figure that reads well as a ring
    • Avoid if: you want a plain number
    • Traits: animated ring
    • Install: npx shadcn@latest add @avara-ui/circular-progress
    • Docs section
Install
npx shadcn@latest add https://avaraui.com/r/counter.json
Registry name
@avara-ui/counter, through the shadcn MCP server
Index
llms.txt lists every page, or add the agent skill once

Props Reference

ScalePicker

PropTypeDefaultDescription
min / maxnumber

0 / 100

The ends of the scale.
initialValuenumber50Where it starts, clamped into the range.
labelstring

—

The caption above the figure.
suffixstring

—

The unit under the figure, e.g. "years old".
color"primary" | "indigo" | "rose" | "emerald" | "zinc" | "inherit" | string"primary"A theme name or a valid hex code (e.g. "#00FF00"). inherit takes the surrounding text colour, for a counter inside a section that sets its own.
onChange(value: number) => void

—

Fires with the new figure each time it changes.

Countdown

PropTypeDefaultDescription
variant"default" | "slide""default"default is a tray with one cell per unit under a clock pill; slide is compact tiles where only the figure that changed rolls.
targetDateDate | string | number3 days from nowWhen the timer reaches zero — a Date, an ISO string or a timestamp.
labelstring

—

The caption above the figures.
doneLabelstring"Time's up"What the label becomes once the date has passed. Both variants drop their figures then.
color"primary" | "indigo" | "rose" | "emerald" | "zinc" | "inherit" | string"primary"A theme name or a valid hex code (e.g. "#00FF00"). inherit takes the surrounding text colour, for a counter inside a section that sets its own.

QuantityStepper

PropTypeDefaultDescription
variant"default" | "soft" | "vertical" | "card""default"default is a pill, soft a gray well, vertical stacks the controls and card adds an n of max chip and a meter.
min / maxnumber

0 / 100

Clamp the value; the buttons disable at each end.
initialValuenumber1Where it starts; the count is internal from then on.
labelstring

—

Captions the control.
color"primary" | "indigo" | "rose" | "emerald" | "zinc" | "inherit" | string"primary"A theme name or a valid hex code (e.g. "#00FF00"). inherit takes the surrounding text colour, for a counter inside a section that sets its own.
onChange(value: number) => void

—

Fires with the new figure each time it changes.

CircularProgress

PropTypeDefaultDescription
valuenumber100A percentage, clamped to 0–100 for the ring. The figure counts up to it.
suffixstring

—

Shown beside the figure, e.g. "%".
labelstring

—

The caption under the ring.
color"primary" | "indigo" | "rose" | "emerald" | "zinc" | "inherit" | string"primary"A theme name or a valid hex code (e.g. "#00FF00"). inherit takes the surrounding text colour, for a counter inside a section that sets its own.

Works with other components

  • Combine Countdown and QuantityStepper with Split-Flap Display for mechanical counters.
  • Pair CircularProgress with Progress for linear goal bars and Card for KPI metric tiles.
  • Use the slide countdown in Waitlist-style launch panels, or see Counter Section for full-width stats layouts.

Which counter do I install?

Each one is its own item: scale-picker for a scrollable range, countdown for a deadline, quantity-stepper for plus and minus, and circular-progress for a ring. Add the one you need; they do not depend on each other.

How does the slide countdown avoid SSR hydration mismatches?

Countdown only reads the clock inside an effect, so every cell and tile renders -- until the first client tick. Server HTML and the first client paint then match.

What happens when the countdown reaches targetDate?

doneLabel (default "Time's up") replaces label. The figures are removed and only that text remains. Pass targetDate as a Date, ISO string or timestamp; without it, the timer counts down three days from mount.

How do I get the current value out of the stepper or scale picker?

Pass onChange. It fires with the new figure each time QuantityStepper or ScalePicker changes, so a cart or form can keep its own copy. The count itself is internal, starting at initialValue; there is no controlled value prop.

How does the scale picker change its figure?

One scroll gesture moves it one notch, and a harder scroll steps one number at a time rather than jumping. Scrolling down raises the figure and scrolling up lowers it. Dragging the scale or pressing the arrow keys (Home, End, PageUp and PageDown too) does the same. Once it reaches min or max, the wheel scrolls the page again, so it never traps a visitor. It is a role="slider" and follows the theme, so it is dark in dark mode.

Do the counters respect prefers-reduced-motion?

Mostly. The stepper, scale picker and countdown figures swap without the blur roll. The circular ring's fill animation does not check the preference. The countdown is a role="timer" with aria-live="off", so screen readers are not told every second.

How do I use CircularProgress and what range does it take?

Pass value and an optional suffix such as "%". The ring is drawn from the value as a percentage, so it is clamped between 0 and 100 for the arc, and the centre shows the animated whole number. Use color to recolour the stroke.