Skip to main content

Borrow UI quickstart

Want to see this custom-composition approach in a complete application? The official Borrow SDK Example integrates the SDK with the individual registry components shown below. It does not use the all-in-one BorrowApp.
This provides built-in UniSat connection plus the complete borrowing and loan-management experience. Pass an external wallet only when your application already manages wallet connectivity. Continue below only when you want to compose the atomic components into a custom layout.

Custom composition

Install the flow

Registry dependencies such as borrow-provider, borrow-core, and the required shadcn primitives are installed automatically.

Compose the page

walletProvider, openLoan, and openWorkflow are application integrations. Connect them to your wallet adapter and router.

What happens

  1. BorrowProvider restores or starts the SDK session.
  2. LoanComposer calculates collateral and requests quotes.
  3. AvailableOffers executes the selected quote.
  4. ActiveBorrowFlow shows the Bitcoin deposit and workflow status.
  5. UserLoans loads active, pending, and historical loans for the connected wallet.
  6. WalletWithdrawal moves supported platform-wallet assets to an EVM address.
For repayment and collateral actions, install the management components described in the Component reference.