Choose an embed
The Ridge Embed SDK supports two ways to put a dashboard in your product. Choose based on the integration boundary you want, not on how the dashboard looks: both surfaces render the same published dashboard.
| Iframe embed | Inline embed | |
|---|---|---|
| Best for | Fast integration and strong isolation | Deep product integration and richer control |
| Browser receives | A signed Ridge URL | A short-lived JWT from your server |
| Credential lifecycle | Valid until revoked in Ridge | Expires after 24 hours; cannot be revoked individually |
| Rendering boundary | Separate iframe document | Shadow root in your page |
| Initial state | state in the iframe URL | state passed when mounting |
| Runtime control | postMessage state protocol | Typed state, filter, event, settlement, and export APIs |
| Theming | Dashboard's published theme | Per-mount theme overrides |
| Host setup | An <iframe> | A backend token endpoint plus browser loader |
Choose the iframe when
- you want the smallest integration surface;
- document-level isolation is useful;
- a long-lived URL that can be revoked in Ridge fits your access model; or
- setting and reading state over
postMessageis enough.
Choose the inline embed when
- the dashboard should participate closely in your application's lifecycle;
- you need filter-specific events, settlement, image export, or per-mount theming;
- your backend can mint a dashboard-scoped JWT for each viewer; or
- you prefer a direct JavaScript handle over a cross-document message protocol.
The inline embed still authenticates through your server, but it renders in the browser and mounts directly into your page's shadow root.
What both surfaces share
Both use the same component ids, state value shapes, events, themes, and row-level partitions. Continue with the shared concepts in Dashboard state, Filters, and Partitioning.