Skip to main content
Primer Checkout provides a set of components that work together to create a complete payment experience. This page gives you an overview of all available components and how they relate to each other.

Component Hierarchy

The components follow a hierarchical structure where parent components provide context to their children. Each parent literally contains its children. The spatial nesting mirrors the DOM nesting.

Core Components

Card Form Components

Utility Components

Basic Usage

How Components Communicate

Components communicate through:
  1. Context inheritance - Child components receive context from their parents (e.g., card inputs receive form context from their parent card form)
  2. Events - Components emit events that you can listen to for state changes
  3. Customization points (Slots on Web, Composable lambdas on Android, @ViewBuilder slot closures on iOS) - Allow you to inject custom content at specific points
For details on events, see the Events guide.

Customization at Each Level

  • <primer-checkout> - SDK options, theming, global configuration
  • <primer-main> - Layout structure through customization points
  • <primer-payment-method> - Payment method-specific options
  • <primer-card-form> - Complete control over card form layout and styling

See also

Using Slots

Learn how to customize layout with slots

Build a custom card form

Step-by-step tutorial for card form customization

Styles

Customize appearance with CSS variables

SDK Reference

Detailed API documentation for all components