Configure a create-LOC form
Outcome: a create-LOC form shaped to your business, previewed live as you edit, and three small files to copy into your React app.
The configurator keeps SDK policy (LOCConfig) separate from page copy (CreateLOCFlow props).
Each edit passes through the SDK’s public config validator before the preview or the generated code
updates. If a draft becomes invalid, the issue appears on its field and the last valid preview stays
on screen.
Use the generated files
Open Code in the configurator, then use Copy all for one annotated bundle or copy each file from its tab:
loc-config.tscontains only the SDK’s typed LOC policy and usessatisfies LOCConfig.anvil-sdk.tsaccepts your RPC URL at runtime and selects the public testnet profile. It contains no API key or hosted-provider secret.CreateLOCPage.tsxrenders the create form on its own (createOnly), as the preview shows it. It owns presentation copy, provides the SDK to React, and imports the component stylesheet once.
Pass your RPC URL to the generated page from your app’s environment configuration, and keep a private provider URL or token out of the generated SDK file.
For a full production integration, including wallet connection and transaction execution, follow Add a create-LOC form to your app.