Grounded answers from
your own content.
Lähde delivers AI-powered answers drawn directly from your site's content — embeddable on any website (Webflow, Drupal, plain HTML) as a single script tag.
Embed
One script tag registers all five Lähde boxes — they
load from the same bundle. Add <lahde-ask> for a one-shot
Q&A box, <lahde-chat> for a multi-turn conversation,
<lahde-search-summary> on your search page for an AI
summary, <lahde-recommend> on a content page for
related links, and <lahde-popular-searches> on your
search page for visitor-query pills.
Chat — multi-turn conversation
<lahde-chat> keeps a running transcript: the visitor
types a message (or taps a suggested follow-up), the box appends a user
turn, asks the relay, and appends the assistant reply with its source
chips and follow-up chips. Every turn carries the conversation so far as
history, so answers stay contextual. Same one script tag as
above — no extra include.
The shared attributes (relay, client,
token, lang, timeout-ms) work the
same on every box; lahde-chat adds none of its own.
Restyle any element from your page CSS via ::part() —
parts: panel, log, turn,
role, bubble, sources,
followups/followup, form,
input, submit.
React app? The same five ship as React components in
@digitalist/lahde-widget-react:
<LahdeAsk />, <LahdeChat />,
<LahdeSearchSummary />, <LahdeRecommend />,
and <LahdePopularSearches /> — identical props
(relay, client, token,
lang, timeoutMs).
Popular searches — pills from real visitor queries
<lahde-popular-searches> shows a row of pill links
derived from your visitors' actual queries (answered queries only,
language-scoped, count ≥ 2). No LLM call — a fast aggregation over the
own-stream analytics. Place it on your search page under the search bar.
Clicking a pill navigates to your search page with that query pre-filled.
The element collapses silently when no data is available yet, so you can
deploy it immediately — the pills appear as queries accumulate.
search-url (required) — the base URL for
pill hrefs. Use {query} as a placeholder and it will be
substituted with the percent-encoded query; omit it and the encoded query
is appended directly. Examples: /search?keys= (Drupal Search
API), /haku?q={query}&lang=fi (custom form).
Add sort="rising" to show what visitors are
searching right now instead of all-time favorites — new terms chart within
hours of appearing in the data.
Shadow parts: card, heading, list,
pill. A cancellable
lahde:popular-search-select CustomEvent fires on pill click
(detail: {query, url}) — call event.preventDefault()
in your listener to stop anchor navigation and handle the query yourself
(e.g. fill a search input in a SPA).
React: <LahdePopularSearches relay client searchUrl />
from @digitalist/lahde-widget-react. The onSelect
prop fires with {query, url}; return false to
prevent navigation.
Theme
The theme comes from your page: the widget inherits your font, size,
and text color automatically. Tune the rest with CSS variables, or
restyle any element with ::part() — both from your own
stylesheet, no widget changes.
Versions
lahde.js always serves the latest
release — embed it and you get every improvement automatically. Prefer
stability? Pin a version: versioned URLs never change
and never go away, so you upgrade on your own schedule.
All available versions:
- lahde-1.0.2.js latest
- lahde-1.0.1.js
- lahde-1.0.0.js
- lahde-0.9.0.js
- lahde-0.8.2.js
- lahde-0.8.1.js
- lahde-0.8.0.js
- lahde-0.7.0.js
- lahde-0.6.0.js
- lahde-0.5.1.js
- lahde-0.5.0.js
- lahde-0.4.0.js
- lahde-0.3.5.js
- lahde-0.3.4.js
- lahde-0.3.3.js
- lahde-0.3.2.js
- lahde-0.3.1.js
- lahde-0.3.0.js
- lahde-0.2.1.js
- lahde-0.2.0.js
- lahde-0.1.0.js
Machine-readable manifest
/versions.json publishes the same list as a small JSON
document, so integrations (Drupal rag_widgets and others)
can discover available bundle versions and the stable pointer
without shipping a code update per release. Poll it
periodically and offer an admin version picker.