Guides
Theming
Customize the appearance of FloPay payment elements with themes and CSS variables.
Theming
FloPay provides a FloPayAppearance configuration that controls the visual style of payment elements. Three built-in themes are available, and you can customize individual variables.
Built-in Themes
DEFAULT_APPEARANCE
FLAT_APPEARANCE
Minimal borders and shadows with tighter border radius:
NIGHT_APPEARANCE
Dark background with adjusted colors:
Applying a Theme
Pass the appearance to FloPayProvider options or to loadFloPay:
Custom Appearance
Create your own appearance by defining the variables you want to override:
Variable Reference
| Variable | Type | Description |
|---|---|---|
colorPrimary | CSS color | Primary/accent color for buttons and focus states |
colorBackground | CSS color | Background color of input fields |
colorText | CSS color | Text color for labels and input values |
colorDanger | CSS color | Error message and validation state color |
borderRadius | CSS length | Border radius for inputs and buttons |
fontFamily | CSS font-family | Font stack for all text |
fontSizeBase | CSS length | Base font size |
spacingUnit | CSS length | Base spacing unit for padding and margins |
The appearance is passed through to the underlying Stripe Elements configuration. Stripe maps these variables to its own theming system.