This reference is verified against the published
@spicenet-io/spiceflow-ui package by
tools/check-sdk-drift.mjs on every change. If a component or prop below is wrong, that check fails.SpiceFlowProvider
The root provider for chain configuration, theming, and execution mode. It reads wallet state from Privy, wagmi, and react-query — mount those above it in your app (see Quick Start Step 2).Usage
Props
Examples
SpiceDeposit
The main deposit flow. Handles everything: Privy login, external wallet connection, token selection, escrow deposit, 7702 signing, and solver execution. This is the primary component most apps will use.Usage
Props
To restrict which tokens appear, set
allowedTokens on SpiceFlowProvider (lowercase symbols), not on
SpiceDeposit.With
swapper={{ enabled: true }} on SpiceFlowProvider, the modal opens with a Wallet / Card / Exchange
chooser so users can fund by debit card or from an exchange. Off by default. See
Card and Exchange Deposits for where the funds land in each
wallet mode.depositBatches
ThedepositBatches prop defines what happens on the destination chain after the deposit. It can be a static array or an async function that returns batches based on the deposit amount:
SpiceSupply
Runs a deposit / supply / stake action end to end: token selection, funding, fee quoting, and gasless execution, driven by abuildActionCalls callback that returns your destination-chain calls. This is
the highest-leverage component for a “fund then act” flow (live production integrations build their pay
and supply surfaces on it), and it is far less code than wiring useSpiceExecution by hand.
Usage
buildActionCalls takes (amount, ctx) in that order. ctx (BuildActionCallsContext) carries
userAddress, chainId, destinationToken, and the fee fields. Read the current prop and context
shapes from the installed package (SpiceSupplyProps, BuildActionCallsContext).SpiceWithdraw
Withdraw assets from the user’s Spice balance back to their wallet.Usage
Props
SpiceLock
Lock tokens for a duration (veToken style), with cross-chain deposits into the lock. The amount and duration inputs are driven by hooks you create withuseAssetInput and useLockDuration and pass in,
so you can read the live selection for your own preview UI.
Usage
Props
SpiceLock also accepts hoistable input hooks (sourceAssetInputHook, lockDurationHook) and
escrowAddress. See SpiceLockModalProps in the installed package for the full, current shape.AccountDisplay
A popover that shows the user’s Spice balance breakdown, pending deposits, and quick actions for deposit/withdraw. Great for header navigation.Usage
Props
SelectChainModal
The source-chain picker on its own, for when you want the chain-selection step outside the full deposit flow. SeeSelectChainModal in the installed package for its current props.
ProviderLogin
Wallet connection button for the configured provider (Privy).Usage
Props
Next Steps
Hooks
Build custom UIs with React hooks
Styling
Customize component appearance
Configuration
Configure chains and providers
Examples
See complete examples
