purchases-capacitor icon indicating copy to clipboard operation
purchases-capacitor copied to clipboard

Feature Request: Add displayMode option to presentPaywall

Open Ermag opened this issue 4 months ago • 1 comments

Currently, when presenting a paywall using the RevenueCat UI library, its appearance (light or dark mode) is determined solely by the user's system-wide settings. There is no way for the application to override this and enforce a specific theme.

This is particularly problematic for applications that implement their own in-app theme switching. If a user has set the app to dark mode, but their OS is in light mode, the paywall will appear in a light theme, creating a jarring and inconsistent user experience.

I would like to propose adding an optional displayMode parameter to the presentPaywall and presentPaywallIfNeeded functions. This would allow developers to specify whether the paywall should be displayed in light, dark, or be left to the system default. Here's a suggested implementation for the Capacitor plugin's definitions.ts:

export enum PaywallDisplayMode {
  LIGHT = "light",
  DARK = "dark",
}

export interface PresentPaywallOptions {
  offering?: PurchasesOffering;
  displayCloseButton?: boolean;
  displayMode?: PaywallDisplayMode; // 'light', 'dark', or unset for system default
}

Ermag avatar Aug 07 '25 10:08 Ermag

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Aug 07 '25 10:08 RCGitBot