PayUI supports comprehensive visual customisation through CSS custom properties, allowing you to match the payment form to your brand identity.
Theme Options
PayUI supports two built-in themes:
ui: { theme: "light" } // Light theme (default)
ui: { theme: "dark" } // Dark theme
CSS Custom Properties
Customise the appearance using CSS variables in the ui.variables object. All variables support both light and dark themes automatically.
Layout note: PayUI uses an optimized, responsive layout for payment fields. Customisation is visual (colors, spacing, typography), not structural (field order or column layout).
Brand Colors
Variable
Default (Light)
Default (Dark)
Description
colorPrimary
#0074C7
#4f96ff
Primary brand color (buttons, links, focus)
colorPrimaryHover
#005C9E
#3b82f6
Primary hover state
colorPrimaryActive
#004A80
#2563eb
Primary active/pressed state
colorSecondary
#6E7087
#64748b
Secondary accent color
colorBackground
#FFFFFF
#0f172a
Main background
colorText
#242729
#f8fafc
Primary text
colorTextSecondary
#6E7087
#94a3b8
Secondary text
// Example: Orange brand theme
variables: {
colorPrimary: '#FF4500',
colorPrimaryHover: '#E13E00',
colorPrimaryActive: '#CC3700'
}
Typography
Variable
Default
Description
fontFamily
'Ideal Sans', system-ui, sans-serif
Primary font family
fontSizeBase
14.22px
Base font size
fontWeightMedium
500
Medium weight for labels
fontWeightNormal
400
Normal font weight
Important: Only use system fonts for fontFamily. Loading external web fonts from CDNs is not supported to maintain PCI compliance and iframe security.
You may specify brand fonts (for example, Inter) but they will only render if the font is already installed on the customer’s device.