Skip to Content

Payment Method Form

Payment method form card with cardholder name, a plan radio group, card number, expiry month and year selects and a CVC field. Validated with react-hook-form and zod; expiry years come from the browser date.

pnpm dlx shadcn add @01orbital/payment-method-form

Usage

import { PaymentMethodForm } from "@/components/forms/payment-method-form"

Needs props to render

Pass title, plans, months, labels; see the API reference below.

Examples

New

payment-method-form-membership

payment-method-form-membership

Membership

Checkout form example showing the PaymentMethodForm with two membership plans to pick between before entering card details.

pnpm dlx shadcn add @01orbital/payment-method-form-membership

API reference

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: @hookform/resolvers, react-hook-form, zod. The CLI installs them for you.

Registry pieces it installs with it: