Widgets are in early access. Sample mode is open to everyone. Live mode is enabled for approved partners in stages.
YOUR_WIDGET_ID and use real asset IDs from Find IDs. To try a recipe without an account, set mode: 'sample', remove widgetId, and use assets 900001 and 900002 in place of 1 and 10.
When you combine recipes, load the SDK once. Call destroy() from your page or component teardown so the widget stops its requests.
Mount a widget
Mount a feed and a positioning card. Each mount returns its own handle.- Sample
- Live
Follow your page’s asset
CallonAssetPageChange from your router with the Centaur asset ID of the page the visitor opened. The widget switches assets without remounting and ignores responses for the old asset. Call onLeaveAssetPages when the visitor leaves your asset pages.
update replaces the whole selection, so pass everything you want to keep. To go back to the general feed, call widget.update({ selection: {} }).
Style it and link to your pages
Setappearance to match your page. theme: 'system' follows the visitor’s operating system. assetUrls sends asset links to your own asset pages. A positioning card takes a single viewActivityUrl instead and has no height option.
Use it in React
Copy this component into your app. It loads the SDK once, followsassetId, and cleans up on unmount, including under StrictMode.
Save this as load-centaur.js: