UI Components
Organisms
Payment Methods

PaymentMethods

The PaymentMethods component displays the logos of the available payment options in a store.

Import

Import the component from @faststore/ui

import { PaymentMethods } from '@faststore/ui'

Import Styles

import '@faststore/ui/src/components/organisms/PaymentMethods/styles.scss'

Usage


Props

NameTypeDescriptionDefault
testIdstringID to find this component in testing tools (e.g.: cypress, testing-library, and jest).fs-payment-methods
titlestring | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortalTitle of the payment methods section (e.g.: "Payment methods", "Accepted Cards").
aria-labelstringDefines a string value that labels the current element when title is not used.
flagList*Flag[]List of flags to be displayed in the payment methods section (e.g.:, visa, mastercard, etc).

Flag

NameTypeDescriptionDefault
imageReactNodeA React component that will represent the flag image.
textstringDescription of the flag image to be also used for accessibility purposes.

Design Tokens

Nested Elements

Title

Local tokenDefault value/Global token linked
--fs-payment-methods-title-sizevar(--fs-text-size-body)
--fs-payment-methods-title-weightvar(--fs-text-weight-bold)
--fs-payment-methods-title-line-height1.25

Flags

Local tokenDefault value/Global token linked
--fs-payment-methods-flags-row-gapvar(--fs-spacing-1)
--fs-payment-methods-flags-margin-topvar(--fs-spacing-3)

Flag

Local tokenDefault value/Global token linked
--fs-payment-methods-flag-widthvar(--fs-spacing-5)
--fs-payment-methods-flag-heightvar(--fs-spacing-4)
--fs-payment-methods-flag-border-widthvar(--fs-border-width)
--fs-payment-methods-flag-border-color
var(--fs-color-neutral-3)
--fs-payment-methods-flag-border-radiusvar(--fs-border-radius-small)

Customization

data-fs-payment-methods

data-fs-payment-methods-title

data-fs-payment-methods-flags

data-fs-payment-methods-flag