Frank Mortgage Widgets

Served from widgets.frankmortgage.com — embed in any page with a single <script> tag. Shadow DOM ensures zero CSS conflicts with your site.

👇 The Frankie chat bubble is live in the bottom-right corner — click it to try the new capabilities home screen.

Chat Widget frank-chat

Floating AI mortgage assistant chat bubble. Authenticates via Frank's session or a partner-supplied token.

<!-- Step 1: load the widget script once -->
<script src="https://widgets.frankmortgage.com/v1/frank-chat-widget.js"></script>

<!-- Step 2: place the element anywhere in your HTML -->
<frank-chat
  api-endpoint="https://api.frankmortgage.com/api/ai/chat"
  primary-color="#2465F2"
  position="bottom-right"
></frank-chat>

Attributes

AttributeDefaultDescription
api-endpoint/api/ai/chatChat streaming endpoint
primary-color#2465F2Brand accent colour
positionbottom-rightbottom-right or bottom-left
initial-messageHi! I'm Frank 🏡…Greeting shown on first open
auth-tokennonePartner auth token (bypasses Frank session check)
enable-persistencetruePersist conversation in sessionStorage

Explain Widget frank-explain

Inline AI-generated explanation for a mortgage application, streamed word-by-word via SSE.

<!-- Step 1: load the widget script once -->
<script src="https://widgets.frankmortgage.com/v1/frank-explain-widget.js"></script>

<!-- Step 2: place in your layout. Use application-id for GET or application-data for POST -->
<frank-explain
  api-endpoint="https://api.frankmortgage.com/api/explain"
  application-id="YOUR_APP_ID"
  auto-start="true"
></frank-explain>

Attributes

AttributeDefaultDescription
api-endpoint/api/explainExplain streaming endpoint
application-idnoneApp ID for GET mode
application-datanoneJSON string payload for POST mode
auto-starttrueBegin streaming on mount
titleAI Insight:Header label
default-textnonePlaceholder shown before streaming starts

Events

widget.addEventListener('explanation-complete', (e) => {
  console.log(e.detail.explanation); // full plain-text
  console.log(e.detail.fullText);    // alias
});

Versioning

Widget URLs follow semver major versioning. Breaking changes get a new path (/v2/). Pinning to /v1/ gives you all patch and minor updates automatically, with Cache-Control: immutable so browsers never re-fetch the same build twice.

<!-- Always stable, auto-updated with non-breaking improvements -->
<script src="https://widgets.frankmortgage.com/v1/frank-chat-widget.js"></script>