Skip to main content

Using Slots in Your Code

Slots are the primary mechanism for customizing layout in Primer Checkout. Each slot is a named placeholder where you can insert your own content.
If you don’t provide content for a slot, the component uses its default content. This lets you customize only the parts you need.

Slot Reference

A complete reference of all named slots available in Primer Checkout components.

Code Examples

Common patterns for customizing slots in Primer Checkout.
Override the entire checkout content with your own UI:
Rearrange the card form fields with your own layout:
Replace the default vault submit button:
Show a custom message after successful payment:

See also

Using slots

Learn how to use slots to customize layout

Layout with event handling

Build fully custom checkout experiences

Design tokens explorer

Explore CSS variables and styling