Embedding In Websites
Customizing the Dify Chatbot Bubble Button
window.difyChatbotConfig = {
// Required, automatically generated by Dify
token: 'YOUR_TOKEN',
// Optional, default is false
isDev: false,
// Optional, when isDev is true, default is 'https://dev.udify.app', otherwise default is 'https://udify.app'
baseUrl: 'YOUR_BASE_URL',
// Optional, It can accept any valid HTMLElement attribute other than `id`, such as `style`, `className`, etc
containerProps: {},
// Optional, If or not the button is allowed to be dragged, default is `false`
draggable: false,
// Optional, The axis along which the button is allowed to be dragged, default is `both`, can be `x`, `y`, `both`
dragAxis: 'both',
// Optional, An object of system variables that set in the dify chatbot
systemVariables: {
// key is the system variable name
// e.g.
// user_id: "YOU CAN DEFINE USER ID HERE",
// conversation_id: "YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID"
},
// Optional, An object of inputs that set in the dify chatbot
inputs: {
// key is the variable name
// e.g.
// name: "NAME"
}
}Overriding Default Button Styles
1.Modifying CSS Variables
2.Using containerProps
containerProps3. Passing inputs
inputsLast updated