{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "native-verified-badge-shadcnui", "type": "registry:component", "title": "Native Verified Badge", "description": "Verified badge component with multiple variants, sizes, and styles including outline and shield designs.", "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/native/native-verified-badge-shadcnui.tsx", "content": "\"use client\";\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { cn } from \"@/lib/utils\";\nimport type { ReactNode } from \"react\";\n\ntype BadgeVariant = \"default\" | \"blue\" | \"gold\" | \"green\" | \"black\";\ntype BadgeSize = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"xxl\";\n\ninterface VerifiedBadgeProps {\n variant?: BadgeVariant;\n size?: BadgeSize;\n className?: string;\n showLabel?: boolean;\n label?: string;\n icon?: ReactNode;\n tooltip?: string;\n}\n\nconst sizeClasses: Record<\n BadgeSize,\n { container: string; icon: string; text: string }\n> = {\n sm: { container: \"size-4\", icon: \"size-2\", text: \"text-xs\" },\n md: { container: \"size-5\", icon: \"size-2.5\", text: \"text-sm\" },\n lg: { container: \"size-6\", icon: \"size-3\", text: \"text-base\" },\n xl: { container: \"size-7\", icon: \"size-4\", text: \"text-lg\" },\n xxl: { container: \"size-8\", icon: \"size-5\", text: \"text-xl\" },\n};\n\nconst variantClasses: Record<\n BadgeVariant,\n { bg: string; icon: string; shine: string }\n> = {\n default: {\n bg: \"bg-foreground\",\n icon: \"text-background\",\n shine: \"from-transparent via-white/40 to-transparent\",\n },\n blue: {\n bg: \"bg-blue-500\",\n icon: \"text-white\",\n shine: \"from-transparent via-white/50 to-transparent\",\n },\n gold: {\n bg: \"bg-amber-500\",\n icon: \"text-white\",\n shine: \"from-transparent via-white/50 to-transparent\",\n },\n green: {\n bg: \"bg-emerald-500\",\n icon: \"text-white\",\n shine: \"from-transparent via-white/50 to-transparent\",\n },\n black: {\n bg: \"bg-black\",\n icon: \"text-white\",\n shine: \"from-transparent via-white/50 to-transparent\",\n },\n};\n\nfunction CheckIcon({ className }: { className?: string }) {\n return (\n \n \n \n );\n}\n\nfunction BadgeTooltip({\n children,\n content,\n}: {\n children: ReactNode;\n content?: string;\n}) {\n if (!content) return <>{children};\n\n return (\n \n \n {children}\n \n

{content}

\n
\n
\n
\n );\n}\n\nexport function VerifiedBadge({\n variant = \"default\",\n size = \"md\",\n className,\n showLabel = false,\n label = \"Verified\",\n icon,\n tooltip,\n}: VerifiedBadgeProps) {\n const { bg, icon: iconColor, shine } = variantClasses[variant];\n const { container, icon: iconSize, text } = sizeClasses[size];\n\n return (\n \n \n \n {/* Shine effect on hover */}\n \n\n {icon ? (\n \n {icon}\n \n ) : (\n \n )}\n \n\n {showLabel && (\n \n {label}\n \n )}\n \n \n );\n}\n\nexport function VerifiedBadgeOutline({\n variant = \"default\",\n size = \"md\",\n className,\n icon,\n tooltip,\n}: Omit) {\n const { container, icon: iconSize } = sizeClasses[size];\n\n const colorClasses: Record = {\n default: {\n stroke: \"stroke-foreground\",\n text: \"text-foreground\",\n },\n blue: {\n stroke: \"stroke-blue-500\",\n text: \"text-blue-500\",\n },\n gold: {\n stroke: \"stroke-amber-500\",\n text: \"text-amber-500\",\n },\n green: {\n stroke: \"stroke-emerald-500\",\n text: \"text-emerald-500\",\n },\n black: {\n stroke: \"stroke-black\",\n text: \"text-black\",\n },\n };\n\n const { stroke, text } = colorClasses[variant];\n\n return (\n \n \n \n \n \n \n {icon ? (\n \n {icon}\n \n ) : (\n \n )}\n \n \n );\n}\n\nexport function VerifiedShieldBadge({\n variant = \"default\",\n size = \"md\",\n className,\n icon,\n tooltip,\n}: Omit) {\n const { bg, icon: iconColor } = variantClasses[variant];\n const { icon: iconSize } = sizeClasses[size];\n\n const sizeMap: Record = {\n sm: \"size-5\",\n md: \"size-6\",\n lg: \"size-7\",\n xl: \"size-8\",\n xxl: \"size-9\",\n };\n\n return (\n \n \n \n \n \n \n \n \n {/* Shield background */}\n \n {/* Shine effect */}\n \n \n {icon ? (\n \n {icon}\n \n ) : (\n \n )}\n \n \n );\n}\n", "type": "registry:component", "target": "components/uitripled/native-verified-badge-shadcnui.tsx" } ] }