ham7a311

Tally Button

Buttons 5

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
  • Wave Mesh

    Wave Mesh

    185
  • Route Globe

    Route Globe

    154
  • Glass Tiles

    Glass Tiles

    146
  • Glyph Swell

    Glyph Swell

    60
  • Orbit Ring Stats

    Orbit Ring Stats

    57
  • Ask Bar

    Ask Bar

    46
  • Intent Label

    Intent Label

    39
  • Glass Ribbons

    Glass Ribbons

    37

More in Buttons

View all
  • Texture Button

    Texture Button

    108
  • Button

    Button

    14
  • Notification Button

    Notification Button

    117
  • HeroUI Button Group

    HeroUI Button Group

    2
  • Eclipse Button

    Eclipse Button

    44
  • Button Save

    Button Save

    50
  • App Store Button

    App Store Button

    484
  • Base Button

    Base Button

    1