Customizing the Embed
Customize the experience when embedding Docs Embed into your product or app by setting welcome messages, actions, and more
After adding Docs Embed to your website or app, you can further customize the experience by adding things like actionable buttons to the sidebar, suggestions to nudge your users with contextual questions, and more.
Customizing the button (standalone only)
When using the standalone script tag implementation, you can customize the label and icon of the button that launches the embed widget.
window.GitBook("configure", {
button: {
label: "Ask",
icon: "assistant", // 'assistant' | 'sparkle' | 'help' | 'book'
},
});Available icon options:
assistant- Assistant icon (default)sparkle- Sparkle iconhelp- Help/question iconbook- Book icon
Adding actions
Adding actions to the embed allows you to give users extra actions in the UI. Each action consists of a label, icon (from Font Awesome), and an onClick action that runs when the user clicks the action. Any actions you add will appear in the sidebar alongside tabs. Actions can control the Docs Embed itself or execute any code you'd like.
Adding suggestions
You can add suggestions to the Assistant tab, which will show up as clickable prompts for your users to use when the Assistant loads.
Adding a greeting
Customize the welcome message displayed in the Assistant tab:
Configuring tabs
Override which tabs are displayed. By default, the embed shows tabs based on your site's configuration.
Last updated
Was this helpful?