Widget
Embed a live What's New widget demo in your docs with the Widget MDX component: a trigger button that opens your changelog in a modal, no script tag needed.
<Widget> drops a live What's New trigger straight into a docs page. Click it and your Jamdesk changelog opens in the same modal your customers see when you embed the widget in your app. Here you write one MDX tag instead of a <script>. The page resolves your site automatically.
Quick Start
<Widget />
That renders a button that opens /changelog (the default path) in a modal. Set page to your changelog's route if it lives somewhere else. A wrong path opens a 404 in the modal. (Jamdesk's own changelog is at /reference/changelog, for example.)
<Widget page="/reference/changelog" label="What's new" />
<Widget> resolves your canonical *.jamdesk.app origin on its own. It works the same on a jamdesk.app subdomain or a custom domain. The modal always loads from the subdomain. That is the only origin that can render the embedded view.
Props
| Prop | Type | Default | Purpose |
|---|---|---|---|
page | string | /changelog | Docs path the modal opens. |
label | string | What's new | Trigger button text. |
theme | auto | light | dark | auto | Modal color scheme. |
trigger | CSS selector | (none) | Bind to your own element instead of rendering a button. |
width / height | CSS length | 560px / 680px | Modal size. |
radius | CSS length | 12px | Modal corner radius. |
unread | boolean | true | Show the unread dot. Set false to hide it. |
unreadColor | hex / CSS color | #e5484d | Unread dot color. |
project | string | derived | Override the stored "seen" key. |
Point trigger at an element already on the page. A selector that matches nothing makes the widget fall back to its own floating launcher in the corner.
The unread dot's "seen" state is stored per browser and per origin (the page the widget runs on). A visitor's seen-state on your docs and in your app is tracked separately. They don't sync. Set unread={false} on a demo button to skip the dot.
Live example
This button opens the modal on the deployed docs site. There, <Widget> binds to your canonical *.jamdesk.app origin. Local jamdesk dev preview has no published origin to load the modal from. The trigger can't open there and shows a "Live preview" caption beside the button instead. Deploy the page (or open it on your live site) to try it.
