Componentform0.95 KB gzipZero dependencies
Payment Methods
Payment method selector with card, bank, cash, wallet icons.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add payment-methodsOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { PaymentMethods } from "@/components/ui/payment-methods"; <PaymentMethods />Source code
payment-methods.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| methods | PaymentMethod[] | Configures methods. (Default: []) |
| value | string | Controlled value. |
| defaultValue | string | Initial value when uncontrolled. |
| onValueChange | (id: string) => void | Callback invoked on value change. |