Componentform0.95 KB gzipZero dependencies

Payment Methods

Payment method selector with card, bank, cash, wallet icons.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add payment-methods

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { PaymentMethods } from "@/components/ui/payment-methods"; <PaymentMethods />

Source code

payment-methods.tsx + 1 helper

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

tsxpayment-methods.tsx64 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface PaymentMethod {  id: string;  label: string;  description?: string;  icon: "card" | "bank" | "cash" | "wallet";} export interface PaymentMethodsProps extends React.HTMLAttributes<HTMLDivElement> {  methods: PaymentMethod[];  value?: string;  defaultValue?: string;  onValueChange?: (id: string) => void;}

Props

Interactive Prop Playground

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

tsx3 lines
import { PaymentMethods } from "@/components/ui/payment-methods"; <PaymentMethods />
PropTypeDescription
methodsPaymentMethod[]Configures methods. (Default: [])
valuestringControlled value.
defaultValuestringInitial value when uncontrolled.
onValueChange(id: string) => voidCallback invoked on value change.