ham7a311

Tally Button

Buttons

About

A save or like toggle button whose count animates like an odometer, rolling only the digits that change.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Tally Button to your project and fits it to your theme.

Code

How Tally Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import TallyButton from "@/components/ui/tally-button";

export default function Demo({ variant = "night" }: { variant?: string }) {
  const paper = variant === "paper";
  const t = paper ? "paper" : "night";
  return (
    <div
      className={`flex min-h-screen w-full items-center justify-center p-6 ${paper ? "bg-[#f3f1ec]" : "bg-[#0b0a0d]"}`}
    >
      <div
        className={`w-full max-w-[26rem] rounded-[20px] p-5 ${paper ? "bg-white shadow-[inset_0_0_0_1px_rgb(27_26_23/0.08)]" : "bg-[#121015] shadow-[inset_0_0_0_1px_rgb(239_232_220/0.08)]"}`}
      >
        <p
          className={`font-mono text-[0.6875rem] uppercase tracking-[0.14em] ${paper ? "text-[#6f6a62]" : "text-[#9c96a1]"}`}
        >
          Recipe · 40 minutes
        </p>
        <p
          className={`mt-2 text-[1.125rem] font-semibold tracking-[-0.015em] ${paper ? "text-[#1b1a17]" : "text-[#efe8dc]"}`}
        >
          Shuwa-spiced lamb with saffron rice
        </p>
        <p
          className={`mt-1 text-[0.875rem] ${paper ? "text-[#6f6a62]" : "text-[#9c96a1]"}`}
        >
          A weeknight version of the Eid classic, from Umm Faisal&rsquo;s
          kitchen in Ibra.
        </p>
        <div className="mt-5 flex flex-wrap gap-2.5">
          <TallyButton theme={t} label="Save" noun="saves" count={1299} />
          <TallyButton
            theme={t}
            label="Like"
            noun="likes"
            icon="heart"
            count={99}
          />
        </div>
      </div>
    </div>
  );
}

More by ham7a311

View all
  • Route Globe

    Route Globe

    70
  • Wave Mesh

    Wave Mesh

    65
  • Glass Tiles

    Glass Tiles

    56
  • Glyph Swell

    Glyph Swell

    23
  • Orbit Ring Stats

    Orbit Ring Stats

    19
  • Ask Bar

    Ask Bar

    18
  • Streak Field Stats

    Streak Field Stats

    17
  • Glass Carousel

    Glass Carousel

    17

More in Buttons

View all
  • Button

    Button

    5
  • Texture Button

    Texture Button

    97
  • Button Group

    Button Group

  • Eclipse Button

    Eclipse Button

    39
  • Button

    Button

    4
  • HeroUI Button Group

    HeroUI Button Group

  • Base Button

    Base Button

    4
  • App Store Button

    App Store Button

    458