Styles

Internal styles

Customize your fields by specifying your styles configuration for typography and colors. Setting your styles configuration is optional.

Allowed selectors

  • input

  • #pan

  • #expiry

  • #cvv

  • #cvvOnly

  • .is-valid

  • .is-invalid

  • .is-empty

  • .is-onfocus

Note

All selectors can be combined in CSS to increase specificity. e.g input#pan.is-valid. #cvvOnly is used to target the CVC field in the CVC only flow.

Allowed CSS properties

  • color

  • font-family

  • font-size

  • font-style

  • line-height

  • text-align

  • font-weight

  • letter-spacing

  • text-transform

  • caret-color

Fonts (web safe only)

Example
Font-family

Georgia, serif

"Georgia, serif"

Palatino Linotype,Book Antiqua, Palatino, serif

"'Palatino Linotype','Book Antiqua', Palatino, serif"

Times New Roman, Times, serif

"Times New Roman, Times, serif"

Arial, Helvetica, sans-serif

"Arial,Helvetica, sans-serif"

Arial Black, Gadget, sans-serif

"'Arial Black', Gadget, sans-serif"

Comic Sans MS, Cursive, sans-serif

"'Comic Sans MS', Cursive, sans-serif"

Impact, Charcoal, sans-serif

"Impact, Charcoal, sans-serif"

Lucida Sans Unicode, sans-serif

"Lucida Sans Unicode"

Lucida Sans Unicode, Lucida Grande, sans-serif

"'Lucida Sans Unicode', 'Lucida Grande', sans-serif"

Tahoma, Geneva, sans-serif

"Tahoma, Geneva, sans-serif"

Trebuchet MS, Helvetica, sans-serif

"'Trebuchet MS', Helvetica, sans-serif

Verdana, Geneva, sans-serif

"Verdana, Geneva, sans-serif"

Here's an example of how you would set your styles configuration.

JavaScript

External styles

Our SDK exposes internal states by adding classes to your checkout form. Use these classes to style your form using your website CSS.

Form tag

  • .is-valid

  • .visa

  • .mastercard

  • .amex

  • .jcb

  • .diners

  • .maestro

  • .discover

CSS

Field tag

  • .is-onfocus

  • .is-empty

  • .is-invalid

  • .is-valid

CSS

Last updated