Components
Use custom components in paywalls, from your project or your organization.
A component is a piece of a paywall with its own behavior: a plan picker, a countdown, a scratch card. Components render natively on iOS and Android, the same way the rest of the paywall does, so they cost your app no web view.
Custom components are in early access. Ask us on Discord, or email support@voidhash.com on a paid plan, to turn them on for your team.
The paywall designer lists components in four groups:
- Core: the building blocks every paywall has, such as text, views, scroll views and screens.
- Local: new components that your running
voidhash devsession builds and that aren't published yet. Only you see them, and they render from your local build. See Develop a component. - Project: components written for one project. You write them on your computer with the CLI, or let an AI agent write them over the MCP server.
- Installed: components your organization published and the project installed. One team builds a component once, and every project of the organization can use it. On the Components page and in the CLI, your team is called an organization.
Each component describes itself with a definition: its traits, props, events, preview states and the capabilities it asks for. The designer, the agent and publishing all read the same definition.
Write a component
Components are small Rust crates built with the voidhash-ui library. Its
README covers the builder
API, state, actions and drawing. In your app's root, start the dev loop and create a component:
voidhash dev
voidhash new plan-pickerThe CLI isn't published to a package registry yet; Install the CLI explains how to build it.
Develop a component covers the rest of the loop: seeing each change in the paywall editor, merging changes from the Voidhash agent, testing, and publishing new versions. A component can also bring its own section of the designer's right panel; see Editor panels.
Share it with your organization
Publish a component to your organization once it is ready, then install it in any project of the organization. See Publishing and Installing and capabilities.
Deployed paywalls keep working
A paywall build carries every component it uses. Deleting, deprecating or yanking a component later, or uninstalling it, never changes builds that are already deployed. It only stops new builds of a paywall from using it. See Build and deploy.
Next steps
Something wrong or missing on this page? Tell us by email or on Discord.