Examples
Custom Theme
Customize the appearance of FloPay payment elements using themes and CSS variables.
FloPay supports three built-in themes and fully customizable appearance variables. Pass a FloPayAppearance object to the FloPayProvider options to style all payment elements.
Built-in Themes
FloPay ships with three themes you can use as starting points:
Custom Appearance
Create your own FloPayAppearance with custom variables and rules:
Theme Variables Reference
| Variable | Description | Default |
|---|---|---|
colorPrimary | Buttons, links, focus rings | #4A49FF |
colorBackground | Element backgrounds | #FFFFFF |
colorText | Labels and input text | #262833 |
colorDanger | Error messages and invalid states | #DF1B41 |
borderRadius | Corner rounding for inputs and buttons | 8px |
fontFamily | Font stack for all elements | Poppins, system-ui, sans-serif |
fontSizeBase | Base font size | 16px |
spacingUnit | Base spacing multiplier | 4px |
The rules object lets you target specific CSS classes within the payment elements (.Input, .Label, .Error, .Tab, etc.) for fine-grained styling control.