BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ns-ui/badge-unread-tarnish
This component no longer exists. It was in ns-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-07 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Badge Unread Tarnish

ns-ui/badge-unread-tarnish
RemovedComponent

Unread badge that tarnishes like brass: solid when fresh, an outline within a day, a muted ring after a week — new activity instantly re-polishes it with a small flare.

Live preview

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

Install it

npx shadcn@latest add https://design.helpmarq.com/r/badge-unread-tarnish.json

Source

registry/core/badge-unread-tarnish/component.tsxdesign.helpmarq.com/r/badge-unread-tarnish.json · first 6 KB
1"use client";
2
3import { useEffect, useId, useRef, useState } from "react";
4
5// ---------------------------------------------------------------------------
6// PatinaPip — an unread badge that ages like brass instead of just counting.
7// Its data-stage is derived from the newest item's timestamp, not the count:
8// fresh (< 1 day) is a solid --foreground fill with background-token digits,
9// waning (< 1 week) thins to a transparent fill with a 1.5px --foreground
10// ring, dormant (>= 1 week) settles into a 1px --muted ring with --muted
11// digits — fill, outline weight and text tone all move together so the three
12// stages read apart under monochrome viewing, never by hue alone. Ordinary
13// aging (the interval tick, or a prop simply reflecting more elapsed time)
14// crossfades those properties over 400ms via a plain CSS transition; new
15// activity is different in kind, not degree, so it's fast-pathed around that
16// transition (a one-frame transitionDuration:0 clamp) straight to "fresh"
17// and topped with a 200ms spring-eased scale(1 → 1.12 → 1) flare via the Web
18// Animations API, so re-polish always reads as instantaneous, not eased.
19// The pip itself is decorative (role="img", not a control) — the accessible
20// name lives on it as an aria-label ("3 unread, newest 2 days ago") for a
21// focusable nav item to pull in via aria-describedby, and a visually-hidden
22// aria-live region separately announces new arrivals as they happen. Pure
23// DOM + CSS, zero dependencies, no canvas.
24// ---------------------------------------------------------------------------
25
26export type PatinaPipStage = "fresh" | "waning" | "dormant";
27
28export interface PatinaPipProps {
29 /** unread item count. Incidental to the component's point — see newestTimestamp. */
30 count: number;
31 /** timestamp of the newest unread item; the sole driver of the tarnish stage. */
32 newestTimestamp: number | Date;
33 /** id placed on the pip itself, e.g. so a nav item can aria-describedby it. Defaults to an internal useId. */
34 id?: string;
35 className?: string;
36}
37
38const MINUTE_MS = 60_000;
39const HOUR_MS = 60 * MINUTE_MS;
40const DAY_MS = 24 * HOUR_MS;
41const WEEK_MS = 7 * DAY_MS;
42
43// how often the pip re-checks its own age while mounted, so a badge left
44// open on screen tarnishes on its own without any new prop ever arriving.
45const TICK_MS = MINUTE_MS;
46
47const FLARE_KEYFRAMES: Keyframe[] = [
48 { transform: "scale(1)" },
49 { transform: "scale(1.12)", offset: 0.5 },
50 { transform: "scale(1)" },
51];
52// … truncated

Files it writes

  • registry/core/badge-unread-tarnish/component.tsx

Facts

Registry
ns-ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-02
Last confirmed
12 days ago

Go to the source

Docs on ns-ui design.helpmarq.com nikolas-sapa/ns-ui on GitHub Raw registry item This item as JSON

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