SlideToPurchases
A composable that provides a "slide to unlock" UI to initiate a purchase for a StoreProduct. When the user slides the component to the end, it triggers the RevenueCat purchase flow.
On the Play Store, this function supports upgrading a subscription by providing oldProductId. The default SubscriptionOption is chosen automatically based on RevenueCat's logic, which prioritizes free trials and introductory offers.
Parameters
The StoreProduct the user intends to purchase.
The Modifier to be applied to this component.
The SlideToUnlockColors used to customize the appearance.
The HintTexts to display in the component's track.
A callback invoked immediately when the user completes the slide gesture, before the purchase flow begins.
A callback that reports the current PurchaseState of the transaction (Loading, Success, or Error).
(Google Play only) An optional boolean indicating personalized pricing. See Google's documentation for details.
(Google Play only) The product ID of a subscription to upgrade from.
(Google Play only) The GoogleReplacementMode to use for the subscription upgrade. This is ignored if oldProductId is null.
A composable that provides a "slide to unlock" UI to initiate a purchase for a Package. When the user slides the component to the end, it triggers the RevenueCat purchase flow.
On the Play Store, this function supports upgrading a subscription by providing oldProductId. The default SubscriptionOption is chosen automatically from the packageToPurchase.
Parameters
The Package the user intends to purchase.
The Modifier to be applied to this component.
The SlideToUnlockColors used to customize the appearance.
The HintTexts to display in the component's track.
A callback invoked immediately when the user completes the slide gesture, before the purchase flow begins.
A callback that reports the current PurchaseState of the transaction (Loading, Success, or Error).
(Google Play only) An optional boolean indicating personalized pricing.
(Google Play only) The product ID of a subscription to upgrade from.
(Google Play only) The GoogleReplacementMode to use for the subscription upgrade.
A composable that provides a "slide to unlock" UI to initiate a purchase for a specific SubscriptionOption. This is a Google Play-only function.
Parameters
The specific SubscriptionOption the user intends to purchase.
The Modifier to be applied to this component.
The SlideToUnlockColors used to customize the appearance.
The HintTexts to display in the component's track.
A callback invoked immediately when the user completes the slide gesture.
A callback that reports the current PurchaseState of the transaction.
An optional boolean indicating personalized pricing.
The product ID of a subscription to upgrade from.
The GoogleReplacementMode to use for the subscription upgrade.
A composable that provides a "slide to unlock" UI to initiate a purchase for a StoreProduct with an applied promotional offer. This is an App Store-only function.
Use this function if you are not using RevenueCat's Offerings system. If you are using Offerings, use the overload with a Package parameter instead.
Parameters
The StoreProduct the user intends to purchase.
The PromotionalOffer to apply to the purchase.
The Modifier to be applied to this component.
The SlideToUnlockColors used to customize the appearance.
The HintTexts to display in the component's track.
A callback invoked immediately when the user completes the slide gesture.
A callback that reports the current PurchaseState of the transaction.
See also
A composable that provides a "slide to unlock" UI to initiate a purchase for a Package with an applied promotional offer. This is an App Store-only function.
Only call this in direct response to user input.
Parameters
The Package the user intends to purchase.
The PromotionalOffer to apply to the purchase.
The Modifier to be applied to this component.
The SlideToUnlockColors used to customize the appearance.
The HintTexts to display in the component's track.
A callback invoked immediately when the user completes the slide gesture.
A callback that reports the current PurchaseState of the transaction.
See also
A composable that provides a "slide to unlock" UI to initiate a purchase for a StoreProduct with a given win-back offer. This is an iOS-only function and requires iOS 18.0+.
If you are using RevenueCat's Offerings system, use the overload with a Package parameter instead.
Parameters
The StoreProduct to purchase.
The WinBackOffer to apply to the purchase.
The Modifier to be applied to this component.
The SlideToUnlockColors used to customize the appearance.
The HintTexts to display in the component's track.
A callback invoked immediately when the user completes the slide gesture.
A callback that reports the current PurchaseState of the transaction.
See also
A composable that provides a "slide to unlock" UI to initiate a purchase for a Package with a given win-back offer. This is an iOS-only function and requires iOS 18.0+.
Parameters
The Package to purchase.
The WinBackOffer to apply to the purchase.
The Modifier to be applied to this component.
The SlideToUnlockColors used to customize the appearance.
The HintTexts to display in the component's track.
A callback invoked immediately when the user completes the slide gesture.
A callback that reports the current PurchaseState of the transaction.