Styling Guide
How to customize the appearance of the Paysight Widget using supported theme and CSS options.
Styling Guide
The Paysight Widget supports straightforward customization so you can match your checkout to your brand. This guide covers all currently supported styling options and best practices.
Advanced/custom CSS targeting outside the documented classes is not supported. Use only the options and classes listed here for reliable results.
Theme Configuration
You can customize the widget’s appearance using the theme option in your widget config by:
- Setting a Google Font.
- Choosing a pre-defined theme (light or dark).
- Overriding specific styles using supported CSS classes.
Supported CSS classes
Class | What it Controls |
---|---|
.ps-widget | Widget root container |
.ps-container | Main widget container |
.ps-field-block | Each form field’s wrapper |
.ps-field-label | Field label text |
.ps-field-input | Input fields |
.ps-field-select | Dropdown/select fields |
.ps-submit | Submit (payment) button |
.ps-submit-disabled | Disabled submit button |
.ps-submit-success | Success state for submit button |
.ps-error | General error messages |
.ps-field-error | Field-level error indicator |
.ps-field-error-message | Field-level error message text |
.ps-divider | Divider lines between sections |
.ps-divider-label | Divider label text |
Only the classes above are guaranteed to be supported. Avoid targeting internal widget markup or using unsupported selectors.
Example: Customizing Widget Colors and Fonts
Example: Customizing Widget Colors and Fonts
Pre-defined Themes
Paysight supports two built-in themes:
Switch between them by updating the themeName
property.
Best Practices
- Use CSS variables for colors and spacing if you want consistency across multiple elements.
- Keep overrides minimal for easier upgrades and troubleshooting.
- Always test your widget in both light and dark themes if you support both.
Accessibility
Ensure your color choices provide enough contrast for readability and accessibility. All focus states and error messages should remain clearly visible after customization.
Next Steps
- Event Handling Guide - Learn how to handle widget events
- Advanced Usage - Explore advanced features
- Examples - View styling examples
- API Reference - Complete API documentation