Calm motion: animations on this site only fade, with no movement
Paywall
The end of a free preview, with the plans and a sign-in link
Stops a reader at the end of the free part of an article, and offers a subscription. For a full page of plans, use the pricing table.
Basic
Most home studios fail for one reason: the room. Before you spend on a new microphone, listen to how your voice comes back from the walls. Clap once and count the echo. Then try the same clap in front of an open wardrobe.
Read the rest of this article
Subscribe to read every article, with no limit.
Already a subscriber? Sign in- Put the free part of the text in the default slot. Its end fades into the box below.
plansis a list of plans. Each plan has anid, aname, and apriceas text, and an optionalnote.- The plans are native radio buttons.
picksets the plan that is picked at first. "Subscribe" emitssubscribewith the id of the plan. signInHrefadds a link for readers who already pay.- Plans can load after the box shows.
pickchooses the plan at first, and if that plan is not in the list, the first plan is chosen. - The box is a section named by its title.
- Show only the free part on the page. Do not send the rest of the article to the browser and hide it, because anyone can read hidden text.
- Change the words with
labelsor a label pack:title,body,subscribe,signIn, andplans.
Usage
ts
import { BlessPaywall } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
plans* | BlessPaywallPlan[] | — | |
pick | string | — | the id of the plan that is picked at first |
signInHref | string | — | the sign-in page, for readers who already pay |
labels | Partial<{ title: string; body: string; subscribe: string; signIn: string; plans: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
subscribe | [planId: string] |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |