››payment-card
Payment Card
A card's number, expiry and security code: spaced as typed, brand shown and checked, each joining a Field; or a payment provider's hosted fields framed in the same look.
Parts
| Part | File | Does |
|---|---|---|
| PaymentCard | PaymentCard.vue | Groups a card's number, expiry and security code so they share the brand the number shows. |
| PaymentCardBrands | PaymentCardBrands.vue | The card marks at the end of a number field: all it offers until the number shows its brand, then that brand's alone. |
| PaymentCardCvc | PaymentCardCvc.vue | Takes a card's security code, as long as the brand the number shows asks for; or frames a payment provider's hosted code field. |
| PaymentCardExpiry | PaymentCardExpiry.vue | Takes a card's expiry as MM/YY, adding the slash as it is typed; or frames a payment provider's hosted expiry field. |
| PaymentCardNumber | PaymentCardNumber.vue | Takes a card number, spaced as the card prints it, with its brand's logo at the end; or frames a payment provider's hosted number field. |
Anatomy
<PaymentCard>
<PaymentCardNumber>
<PaymentCardBrands />
</PaymentCardNumber>
<PaymentCardExpiry />
<PaymentCardCvc />
</PaymentCard>Styling
All of Payment Card’s styles live in payment-card.json. New to styling in Frontic UI? How styling works →
Install
- Installs with it
- input-group
- npm packages
- @lucide/vue
- card-validator
- credit-card-type
- reka-ui
Built from
API reference
Groups a card's number, expiry and security code so they share the brand the number shows.
Props 1
| Prop | Type | Default | |
|---|---|---|---|
| brand | PaymentCardBrand | — | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| update:brand | value: PaymentCardBrand | undefined | |
| ||
Payment Card