Bangladesh

Payment method picker

bKash, Nagad, Rocket, Upay, card, cash, bank, cash on delivery. Cards, list or chips; fees beside each.

Cards, with fees

List, every method

Chips

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { PaymentMethodPicker } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<PaymentMethodPicker>

src/components/ui/payment-method-picker.tsx
PropTypeDefaultDescription
valuestring—
defaultValuestring—
onValueChange(id: string) => void—
methods(PaymentMethodId | PaymentMethod)[]["bkash", "nagad", "card", "cash"]
feesPartial<Record<string, React.ReactNode>>—Beside each method: "No fee", "1.85%", "−৳50".
variant"cards" | "list" | "chips""cards"
disabledboolean—
aria-labelstring"Payment method"
classNamestring—

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui