Passer au contenu principal

PaymentMethod

Deprecated

Payment method row — radio + icon + label + description + extra info. Used in CheckoutSummary payment selector. Superseded by paymentmethodcard.

Categorymolecules
Sourcepatterns/molecules/paymentmethod.html
AI HintUse for grouped UI patterns. Combine atoms into functional units.

Ligne de mode de paiement — radio + icône + libellé + description + info complémentaire. Utilisée dans le sélecteur CheckoutSummary.

PaymentMethod

Input molecule (Family 5 — Tier 1)

Payment method row — radio + icon + label + description + extra info. Used in CheckoutSummary payment selector.

This component supports light and dark mode.

Usage

import { PaymentMethod } from '@epasslive/design-system'

const methods = [
  { id: 'card_visa', label: 'Visa •••• 4242', description: 'Expire 12/27', icon: <VisaIcon /> },
  { id: 'apple_pay', label: 'Apple Pay', description: 'Validation Face ID' },
]

{methods.map((m) => (
  <PaymentMethod
    key={m.id}
    id={m.id}
    name="payment_method"
    label={m.label}
    description={m.description}
    icon={m.icon}
    selected={selected === m.id}
    onSelect={setSelected}
  />
))}

When to use

  • CheckoutSummary payment selector (Visa / MC / Apple Pay / Nuvei).
  • Saved payment methods in the account dashboard.
  • Admin deposit / payout method picker.

Accessibility

Each row is a real <label> wrapping the radio input \u2014 the entire row is the click target, so touch and keyboard users both get a large hit area. The icon is decorative (the label carries the meaning). Selected state is exposed via the underlying checked attribute.

Props

Prop
Type
Default
Description
id*
string
—

Radio input id + value.

name*
string
—

Radio group name (for shared selection).

label*
string
—

Display label (e.g., "Visa •••• 4242").

description
string
—

Secondary line.

icon
React.ReactNode
—

Brand or method icon.

extra
React.ReactNode
—

Trailing area (badge, fee, etc.).

selected
boolean
false

Whether this row is selected.

onSelect*
(id: string) => void
—

Selection handler.

Props

Preview

PaymentMethod

Prop
Type
Required
Default
Description
id
string
Required
—
No description.
selected
boolean
Required
—
No description.
onSelect
() => void
Required
—
No description.
Quick use:<PaymentMethod />

Accessibility

ARIA roleradio

Type

1 rule

NASA Rule 5

id, selected, onSelect required

ARIA

1 rule

WAI-ARIA Radio Pattern

role='radio' inside role='radiogroup'

Usage

Import

tsxSnippet
import { PaymentMethod } from "@epasslive/design-system"

Example 1

tsxSnippet
<PaymentMethod />

Example 2

tsxSnippet
<PaymentMethod variant="default" />

Anti-patterns

— Do not hardcode data in molecules

— Avoid complex business logic in molecules

Design System v4.1.0 | ePassLive