Skip to content

Conversation

@toi500
Copy link
Contributor

@toi500 toi500 commented Nov 21, 2024

Added a new customCSS property to the BubbleTheme type to allow users to inject custom CSS styles directly through the theme configuration. This enables advanced styling capabilities without modifying the core components.

Implementation Details

  • Added customCSS to BubbleTheme type
  • Implemented style injection in both Bubble and Full components

Example

<script type="module">
  import Chatbot from 'https://cdn.jsdelivr.net/gh/toi500/FlowiseChatEmbed@feat/add-customCSS-feature/dist/web.js';
  Chatbot.init({
    chatflowid: 'your-chatflow-id',
    apiHost: 'http://localhost:3000',
    theme: {
      customCSS: `
        * {
          border-radius: 0 !important;
        }
      `
    }
  });
</script>

Result

image

Additional Note

Very useful when used with the new dev mode feature at http://localhost:5678

image

@saatchi-david
Copy link
Contributor

This is super helpful and perfect timing!

@toi500
Copy link
Contributor Author

toi500 commented Nov 21, 2024

This is super helpful and perfect timing!

This mixes very well with the Proxy Server feature since now we can:

  • Use just 1 deployment to serve multiple secured embed flows (your idea); and
  • Customize the chatbots professionally and individually on the fly using the same default web.js
@toi500
Copy link
Contributor Author

toi500 commented Nov 23, 2024

@HenryHengZJ, I have resolved the conflicts, tested and it is now ready for review.

@HenryHengZJ
Copy link
Contributor

thanks!

@HenryHengZJ HenryHengZJ merged commit 5b4433f into FlowiseAI:main Nov 23, 2024
@toi500 toi500 deleted the feat/add-customCSS-feature branch November 25, 2024 11:22
mandpd pushed a commit to mandpd/FlowiseChatEmbed that referenced this pull request Jul 24, 2025
Add customCSS theme option for advanced styling
mandpd pushed a commit to mandpd/FlowiseChatEmbed that referenced this pull request Jul 24, 2025
Add customCSS theme option for advanced styling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants