Stablev0.1.0payment

PaymentMethodPicker

支付方式選擇器

涵蓋台灣主要電子錢包(LINE Pay、街口、全支付、悠遊付、iCash)、行動支付(Apple/Google/Samsung Pay)、信用卡、ATM、超商代收的單選元件。

Multi-provider payment-method radio group covering Taiwan e-wallets (LINE Pay, 街口, 全支付, 悠遊付, iCash) plus Apple/Google/Samsung Pay, credit card, ATM, and convenience-store payment.

Installation

CLI

npx taiwan-ui add payment-method-picker

npm package

npm install @taiwan-ui/react

Live Demo

{ "selected": "linepay" }

Props API

PropTypeDefault
value*PaymentMethodId | null
onChange*(id: PaymentMethodId) => void
methodsPaymentMethodId[]
englishbooleanfalse
variant"grid" | "list""grid"
disabledbooleanfalse

Playground

Props

Non-editable type — edit in code.

已選支付方式

顯示英文標籤

顯示變體

停用選取

Generated code
import PaymentMethodPicker from "@/components/taiwan/PaymentMethodPicker";

export default function Example() {
  return (
    <PaymentMethodPicker
  variant="grid"
/>
  );
}

Code Examples

import { useState } from "react";
import PaymentMethodPicker, { type PaymentMethodId } from "@/components/taiwan/PaymentMethodPicker";

export default function Checkout() {
  const [method, setMethod] = useState<PaymentMethodId | null>(null);

  return <PaymentMethodPicker value={method} onChange={setMethod} />;
}
LINE Pay街口支付全支付Apple Pay11 providers

Related Components