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/card-number-emboss
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.

Card Number Emboss

ns-ui/card-number-emboss
RemovedComponent

A card-number input rendered as an embossing machine — typed digits raise as bevel-shadowed metal, a stamping-head caret dips on every keystroke, and a brand watermark fades in once enough digits exist.

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/card-number-emboss.json

Source

registry/core/card-number-emboss/component.tsxdesign.helpmarq.com/r/card-number-emboss.json · first 6 KB
1"use client";
2
3import { useCallback, useEffect, useId, useMemo, useRef, useState, type ChangeEvent } from "react";
4
5// ---------------------------------------------------------------------------
6// EmbossPlate — a card-number input rendered as an embossing machine, not a
7// flat text field. Typed digits RAISE as embossed metal (a dual text-shadow
8// bevel, light top-left / dark bottom-right), grouped 4-4-4-4, with a small
9// stamping-head caret that dips on every keystroke. A brand watermark
10// (detected from the IIN prefix, or a generic wordmark) fades in once 4+
11// digits exist. Expiry and CVC share the same emboss treatment.
12//
13// Real input semantics: one native <input> per field, transparent and
14// overlaid exactly on top of its decorative display (never sr-only-tiny —
15// the visible plate area IS the click/tap target), so typing, autofill,
16// paste, and screen-reader behavior all come from genuine form controls.
17// The formatted display underneath is aria-hidden and purely presentational.
18// Because the real inputs are transparent, focus is shown on the DISPLAY
19// sibling via a CSS focus-visible + adjacent-sibling rule, not on the
20// (invisible) input itself.
21// ---------------------------------------------------------------------------
22
23export interface EmbossPlateProps {
24 className?: string;
25}
26
27const GROUP_SIZES = [4, 4, 4, 4] as const;
28
29function luhnValid(digits: string): boolean {
30 if (digits.length === 0) return false;
31 let sum = 0;
32 let alt = false;
33 for (let i = digits.length - 1; i >= 0; i--) {
34 let n = Number(digits[i]);
35 if (alt) {
36 n *= 2;
37 if (n > 9) n -= 9;
38 }
39 sum += n;
40 alt = !alt;
41 }
42 return sum % 10 === 0;
43}
44
45function detectBrand(digits: string): string {
46 if (digits.startsWith("4")) return "VISA";
47 if (/^5[1-5]/.test(digits)) return "MASTERCARD";
48 if (/^3[47]/.test(digits)) return "AMEX";
49 return "BANK";
50}
51
52function formatGroups(digits: string): string[] {
53 const groups: string[] = [];
54 let i = 0;
55 for (const size of GROUP_SIZES) {
56 groups.push(digits.slice(i, i + size));
57 i += size;
58 }
59 return groups;
60}
61
62// Monochrome film-grain overlay via feTurbulence — never a CSS gradient
63// function, so it can't read as a decorative color wash.
64const NOISE_BG = `url("data:image/svg+xml,${encodeURIComponent(
65// … truncated

Files it writes

  • registry/core/card-number-emboss/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