Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Blocks / Forms & inputs

Contact and checkout

A checkout form with grouped card, currency, and promo inputs, a segmented payment method, and a live order summary.

bunx --bun @getweini/cli@latest add alert button button-group card checkbox input input-group label select
Customize
  • The block is controlled. Pass `lines` for the cart, set `loading` while your payment request runs, and pass `error` for a failure. It emits `submit` with the validated email, method, country, tip, and applied promo.
  • `InputGroup` keeps a prefix, suffix, or action inside one border: the card icon, the currency tip, and the promo Apply button. `ButtonGroup` joins the payment methods; each button reports its choice with `aria-pressed`.
  • Card number and expiry format as you type, and fields validate after blur or a failed submit with `aria-describedby` messages. Focus moves to the first invalid field.
  • Native `autocomplete` tokens such as `cc-number` let browsers fill the form. Replace the demo `SPRING25` promo check and the 23% tax with your own pricing logic.
  • This block uses a native form. To validate with a schema, wrap the fields in Weini’s `Form` and give each control its `name`; that needs the validation provider installed in your app.