SomPayKit

Wallet picker

Radio cards for EVC Plus, Zaad, Sahal and eDahab.

Live preview

Install

npx shadcn@latest add https://sompaykit.aoubak.com/r/wallet-picker.json

Already included with the checkout form.

Usage

'use client';

import type { MobileWallet } from '@sompaykit/core';
import { useState } from 'react';
import { WalletPicker } from '@/components/sompaykit/wallet-picker';

export function PickWallet() {
  const [wallet, setWallet] = useState<MobileWallet | null>(null);
  return <WalletPicker value={wallet} onChange={setWallet} name="wallet" locale="so" />;
}

Native radio buttons underneath, so arrow keys, form submission and screen readers work as expected. Each card is at least 60px tall for easy tapping.

Props

PropTypeDefault
valueMobileWallet | null—
onChange(wallet: MobileWallet) => void—
walletsMobileWallet[]all fourWallets to offer, in order.
locale'so' | 'en' | 'ar''so'
legendstring"Pay with"Overrides the translated legend.
namestringautoForm field name.
disabledbooleanfalse
classNamestring—

On this page