Skip to main content

Customization

Registry components become part of your application after installation. You can change their markup, styling, copy, routing, and composition without forking an npm package.

What to customize

  • Tailwind classes and responsive layout
  • Headings, helper text, empty states, and loading states
  • Routing in onManageLoan and onTrackLoan
  • Wallet connection and disconnection controls
  • Placement of the platform wallet address
  • Success callbacks and application notifications

Keep SDK operations centralized

Use BorrowProvider as the owner of the BorrowSDK instance. Components can access it through the installed context:
Keeping one provider prevents multiple SDK instances from starting overlapping sessions or wallet-signature requests.

Preserve workflow safeguards

When changing transaction components, retain:
  • Loading and duplicate-submission guards
  • Live loan-position refreshes
  • Minimum amount and maximum-withdrawable validation
  • Fully repaid loan checks
  • Workflow completion and error handling

Updating an installed component

Registry installation copies source code; it does not automatically update existing files when the registry changes. Review the new registry source before running the add command again, especially when you have local customizations. Use version control to compare and merge upstream changes instead of overwriting customized files blindly.