Embedding

Preview Mode

If you want to embed Widgetbook in your documentation, but you want to hide Widgetbook's UI, you can do so by adding the preview query parameter to the URL of your hosted Widgetbook.

url
https://widgetbook.acme.com/#/?path=my/use-case/path/default&preview

For example here's an embedding of our demo app:

diff
https://demo.widgetbook.io/#/?path=features/about/aboutscreen/default // [!code --]
https://demo.widgetbook.io/#/?path=features/about/aboutscreen/default&preview // [!code ++]

Customizing Panels

You may want to show or hide certain panels in the embedded Widgetbook. You can do this by adding the panels query parameter to the URL of your hosted Widgetbook.

url
# Knobs panel only
https://widgetbook.acme.com/#/?path=my/use-case/path/default&panels=knobs
url
# Knobs and Addons panels
https://widgetbook.acme.com/#/?path=my/use-case/path/default&panels=knobs,addons
url
# Navigation panel only
https://widgetbook.acme.com/#/?path=my/use-case/path/default&panels=navigation