Componentticket-stub2.8 KB gzipZero dependencies

NFC Badge

Contactless gate pass tap simulator with animated radio wave ripple pulse, status badge, lanyard notch, and admission chime.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add nfc-badge

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { NfcBadge } from "@/components/ui/nfc-badge"; <NfcBadge holderName="MAXINE VANCE" passId="NFC-8842-VIP" onAdmission={(id) => console.log(id)} />

Source code

nfc-badge.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxnfc-badge.tsx392 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type NfcStatus = "idle" | "scanning" | "success" | "denied"; export interface NfcBadgeProps extends React.HTMLAttributes<HTMLDivElement> {  /** Name of the credential holder */  holderName?: string;  /** Unique NFC chip / badge identifier */  passId?: string;  /** Department, crew role, or category */  department?: string;  /** Access tier label displayed on stamp */  accessLevel?: string;  /** Gate turnstile or terminal identifier */  gate?: string;

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { NfcBadge } from "@/components/ui/nfc-badge"; <NfcBadge />
PropTypeDescription
holderNamestringName of the credential holder
passIdstringUnique NFC chip / badge identifier
departmentstringDepartment, crew role, or category
accessLevelstringAccess tier label displayed on stamp
gatestringGate turnstile or terminal identifier
validUntilstringExpiration or season validity string
statusNfcStatusControlled status override
autoResetDurationnumberDuration in ms to show admission success before resetting to idle (0 to stay)
showChimeVisualbooleanWhether to render the acoustic chime visual indicator on success
onTap() => voidCallback fired when pass is tapped
onAdmission(passId: string) => voidCallback fired on successful gate admission
classNamestringCustom className