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
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add nfc-badgeOr install the full npm package:
npm install bigbulluiUsage
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 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| holderName | string | Name of the credential holder |
| passId | string | Unique NFC chip / badge identifier |
| department | string | Department, crew role, or category |
| accessLevel | string | Access tier label displayed on stamp |
| gate | string | Gate turnstile or terminal identifier |
| validUntil | string | Expiration or season validity string |
| status | NfcStatus | Controlled status override |
| autoResetDuration | number | Duration in ms to show admission success before resetting to idle (0 to stay) |
| showChimeVisual | boolean | Whether to render the acoustic chime visual indicator on success |
| onTap | () => void | Callback fired when pass is tapped |
| onAdmission | (passId: string) => void | Callback fired on successful gate admission |
| className | string | Custom className |