BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/moumenlab/ticket-number-ticker

Ticket Number Ticker

moumenlab/ticket-number-ticker
FreeComponent

An odometer that runs digits up on tabular-nums and middle-truncates long ids to start…end, with an optional GitHub PR status badge.

Live preview

live · rendered by the registry
Rendered by moumenlab on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://lab.moumen.dev/r/ticket-number-ticker.json

Source

registry/lab/ticket-number-ticker/ticket-number-ticker.tsxlab.moumen.dev/r/ticket-number-ticker.json · first 6 KB
1"use client";
2
3import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties } from "react";
4import { motion, MotionConfig, useAnimationControls, useReducedMotion } from "motion/react";
5
6// Ticket number ticker - a ticket id shown as one celebratory value.
7//
8// The pill hugs its value and grows with it up to a max-width; a short #42 is a
9// small pill, a longer id fills out toward the cap. Past the cap it uses the
10// idiom every commit-SHA and wallet-address UI already uses: MIDDLE-TRUNCATE to
11// `start…end`, keeping the two ends that identify and disambiguate and dropping
12// the middle you can recover on hover (tooltip) or copy:
13//
14// #100000000042 → #10000…0042
15// #billing-webhook-...2026 → #billing-…-2026
16//
17// How much survives is measured against the CAP's budget (not the current hug
18// width) - a hidden clone is binary-searched to the last `#start…end` that fits.
19//
20// Numbers additionally get the odometer run-up: each surviving digit is a reel -
21// a 1em window over a 0-9 strip - snapped to 0 then released to `10 + digit` so
22// it scrolls a full turn and lands on target, cascading left→right. Bump
23// `runKey` to play it (e.g. when a new ticket arrives). tabular-nums keeps every
24// column exactly 1ch so nothing shifts as it rolls or truncates. Drop the digits
25// entirely and it's a plain name: no reels.
26//
27// Pass `status` to show a GitHub pull-request state badge (open/draft/merged/
28// closed, GitHub's own colours); pass `onStatusClick` to make it interactive.
29// `width="fixed"` gives every pill one footprint for steady columns. As you
30// type, motion's `layout` glides the centred pill to its new spot instead of
31// snapping (position only - the width change stays instant so the new digit is
32// never clipped). Animation via motion/react; honours prefers-reduced-motion.
33// Requires the lab-theme tokens. Fully Tailwind, no CSS files.
34//
35// NOTE ON SIZE: the pill is deliberately compact (text-xl value, h-8 actions)
36// so it drops straight into dashboards, list rows and toolbars. The lab demo
37// page renders it inside a scale wrapper purely for presentation - what you
38// install is the dashboard size you see in your own app.
39
40const MEASURE_SAFETY = 2; // px of slack so the value never kisses the clip edge
41
42const EASE = [0.22, 1, 0.36, 1] as const;
43const EASE_ICON = [0.2, 0, 0, 1] as const;
44
45export type PrStatus = "open" | "draft" | "merged" | "closed";
46
47export interface TicketNumberState {
48// … truncated

What it pulls in

npm packages

  • motion

Other registry items

  • https://lab.moumen.dev/r/lab-theme.json

Files it writes

  • registry/lab/ticket-number-ticker/ticket-number-ticker.tsx

Facts

Registry
moumenlab
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on moumenlab lab.moumen.dev moumen-soliman/lab on GitHub Raw registry item This item as JSON

More from moumenlab

All 14 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Caret-Anchored Mention Popovercaret-mention-popovermoumenlabComponentsFree1 dep
Command Palette with Argument Chipscommand-palettemoumenlabComponentsFree1 dep
Drag-to-Reorder Listdrag-to-reorder-listmoumenlabComponentsFree1 dep
File Upload Staging Areafile-upload-stagingmoumenlabComponentsFree1 dep
Hover-Expand Icon Striphover-expand-icon-stripmoumenlabComponentsFree1 dep
Inertial Wheel Listinertial-wheel-listmoumenlabComponentsFree1 dep
Morphing Checkout Flowmorphing-checkoutmoumenlabComponentsFree1 dep
OTP Segmented Inputotp-segmented-inputmoumenlabComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex