Skip to content

Commit 4cb6cb9

Browse files
authored
Add instructions for using custom package IDs on Tabs & Switch (#1042)
* Add instructions for using custom package IDs * Reframe switch instructions
1 parent bfc3f88 commit 4cb6cb9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/tools/paywalls/creating-paywalls/components.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,18 @@ Each tab acts as a parent component which can contain any other components withi
269269
Each tab can have its own package selected by default. This is the package which will be selected when the user first navigates to that tab.
270270
:::
271271

272+
### Adding packages for each tab
273+
274+
The packages that you want to include on your paywall must all be included in the offering being used by the paywall. Instead of using RevenueCat's standard package identifiers (e.g. `$rc_annual`) when creating these packages, you may instead want to use custom package identifiers since (1) each package identifier must be unique and (2) you can then easily differentiate what's being offered by the identifier.
275+
276+
For example, your package structure may look like this:
277+
- `basic_monthly`
278+
- `basic_annual`
279+
- `pro_monthly`
280+
- `pro_annual`
281+
282+
Then, you can create tabs either for each entitlement (Basic and Pro), or for each period (monthly and annual), depending on how you want to present the options to your customers.
283+
272284
## Switch component
273285

274286
The switch component allows you to add a toggle to your paywall that can be used to let customers choose between two different sets of options. Switches are frequently used to offer a set of packages that do/don't offer a free trial, do/don't offer family sharing, etc.
@@ -285,6 +297,18 @@ The switch component will be displayed as a native switch element on both iOS an
285297

286298
![Switch properties](/docs_images/paywalls/paywalls-switch.png)
287299

300+
### Adding packages for switch state
301+
302+
The packages that you want to include on your paywall must all be included in the offering being used by the paywall. Instead of using RevenueCat's standard package identifiers (e.g. `$rc_annual`) when creating these packages, you may instead want to use custom package identifiers since (1) each package identifier must be unique and (2) you can then easily differentiate what's being offered by the identifier.
303+
304+
For example, your package structure may look like this for a paywall using the switch component to offer a free trial toggle:
305+
- `monthly_no_trial`
306+
- `annual_no_trial`
307+
- `monthly_with_trial`
308+
- `annual_with_trial`
309+
310+
The `_no_trial` packages would represent the packages without a free trial, and the `_with_trial` packages would represent the packages with a free trial; so that you could place the first set in the switch's OFF content and the second set in the switch's ON content.
311+
288312
## Social proof, feature list, and awards
289313

290314
These component categories are pre-styled components from RevenueCat that can be used as starting points or inspiration to add this type of content to your paywall. Fundamentally, they are no different than any other stacks, and therefore can be customized and configured to your liking.

0 commit comments

Comments
 (0)