# Payment methods

> Selectable saved credit cards with brand and last four.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/checkbox-09).

- Page, with a live preview: https://shadcn.exchange/r/flx/checkbox-09
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/checkbox-09-light-4dcb43a19c129445.png
- Registry item: https://ui.flexnative.com/r/checkbox-09.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/checkbox-09.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `checkbox`, `field`

## Files

### `registry/patterns/checkbox/checkbox-09.tsx`

```tsx
import { Checkbox } from '@/components/ui/checkbox'
import {
  Field,
  FieldContent,
  FieldDescription,
  FieldGroup,
  FieldLabel,
  FieldTitle,
} from '@/components/ui/field'
import { CreditCardIcon } from 'lucide-react'

const cards = [
  {
    id: 'visa',
    brand: 'Visa',
    last4: '4242',
    expires: '08/27',
    defaultChecked: true,
  },
  {
    id: 'mastercard',
    brand: 'Mastercard',
    last4: '8210',
    expires: '11/26',
    defaultChecked: false,
  },
  {
    id: 'amex',
    brand: 'Amex',
    last4: '0005',
    expires: '03/25',
    defaultChecked: false,
  },
]

export function Checkbox09() {
  return (
    <FieldGroup className="w-full max-w-sm gap-3">
      {cards.map((card) => (
        <FieldLabel key={card.id} htmlFor={`checkbox-09-${card.id}`}>
          <Field orientation="horizontal">
            <div className="bg-muted flex size-9 shrink-0 items-center justify-center rounded-md border">
              <CreditCardIcon className="size-4" />
            </div>
            <FieldContent>
              <FieldTitle>
                {card.brand} •••• {card.last4}
              </FieldTitle>
              <FieldDescription>Expires {card.expires}</FieldDescription>
            </FieldContent>
            <Checkbox
              id={`checkbox-09-${card.id}`}
              defaultChecked={card.defaultChecked}
            />
          </Field>
        </FieldLabel>
      ))}
    </FieldGroup>
  )
}
```
