Jamdesk Documentation logo

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

PropTypeDefaultPurpose
pagestring/changelogDocs path the modal opens.
labelstringWhat's newTrigger button text.
themeauto | light | darkautoModal color scheme.
triggerCSS selector(none)Bind to your own element instead of rendering a button.
width / heightCSS length560px / 680pxModal size.
radiusCSS length12pxModal corner radius.
unreadbooleantrueShow the unread dot. Set false to hide it.
unreadColorhex / CSS color#e5484dUnread dot color.
projectstringderivedOverride 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.

What's Next?

Embed in your app

The <script> snippet for putting the widget in your own product

Update Component

Write the changelog entries the widget reads

Widget Source

Pin a version, self-host, or read the source on GitHub