ValyroUI Русская версия

Checkout Form

Checkout: shipping, address type, payment and field validation. Pro · Shop and payments › Cart and orders

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add checkout-form
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { CheckoutForm } from 'valyro-ui-pro';

Props

PropTypeDefault
countries *SelectItem[]Countries for the country select.
deliveryOptionsRadioGroupOption[]Address types or delivery windows; the section is hidden without them.
savedMethodsPaymentMethod[]Saved cards and wallets; a "New card" option is added after them.
valueCheckoutFormValueThe whole form (controlled).
defaultValueCheckoutFormValueInitial value when uncontrolled.
onValueChange(value: CheckoutFormValue) => voidCalled with the new value when it changes.
onSubmit(value: CheckoutFormValue) => voidCalled with the value once every field passes validation.
submittingbooleanfalseShows the submit button as busy (while the payment goes through).
totalReactNodeAmount on the submit button: "$49.00" makes it "Pay $49.00".
headingLevel1 | 2 | 3 | 4 | 5 | 62Level of the section headings (default 2).
labelsPartial<CheckoutFormLabels>Overrides for the built-in English text; keys left out keep their defaults.
cardLabelsPartial<CardInputLabels>Strings of the card field.

Related components

Previous: Checkout Summary · Next: Order Tracking · All Shop and payments