Styling methods
- Web
- Android
- iOS
On the web, Primer Checkout uses CSS variables for theming. You can apply styling in two ways - directly in your CSS or through component attributes.
- CSS
- HTML
styles.css
Using styling variables in practice
- Web
- Android
- iOS
- With CSS Variables
- With customStyles property
Theme support
Primer Checkout supports both light and dark themes.- Web
- Android
- iOS
The default option is light. To use a dark theme, pass a You can toggle between themes using JavaScript:
primer-dark-theme CSS class:Try it out
Select a preset or adjust individual tokens to see how styling variables affect the checkout appearance.This preview shows a subset of styling variables. Interactive states (hover, focus) are not displayed. See Styling Variables for a complete reference.
Try it live in StackBlitz
See styling in action with these interactive examples:| Example | Description | |
|---|---|---|
| Theme variations | Explore light, dark and more | |
| Custom form styling | See custom CSS styling applied to a reordered payment form layout |