Any chance of making the controls built on top of Bootstrap? #9754
Replies: 8 comments 14 replies
-
@SunnysGlimpse Thanks for contacting us, we appreciate your kind words about our product. One of our main goals in developing this library was (and still is) to support different design systems other than the default FluentUI one. That's why we have the Theme infrastructure baked into our code base. So fundamentally we are already supporting the ability to add a new design system, but since we have a limit on our resources to develop new features, this part is still incomplete. although you can update the default Theme variables to achieve some level of customization, it still needs a lot of work to be a full-featured Theme system. |
Beta Was this translation helpful? Give feedback.
-
I was also interested in Tailwind, but after investigating I can see why that might be more than I can handle. That said, is there any guidance for at least updating the colors using the current approach? I did see in the docs:
Override where? There are import statements in a lot of places, including for each control. What, exactly, would I have to include in my project to make this work? I presume I would still load: <link href="_content/Bit.BlazorUI/styles/bit.blazorui.css" rel="stylesheet" /> in my code so that I can pick up all the other supported items. And I see how I can name my own theme using:
Do I just create another Would I just have to ensure that the theme names are unique? I'm not so familiar with SCSS processing. I've looked at a lot of these packages (at least a dozen) and the way you allow overriding of the classes and styles at least makes this approachable. My team are not fans of the Fluent look, so I'm being forced to look at other things. They really like Flowbite and TailwindUI kits, so I'm aiming for that look. I know it's work, but at least your controls seem to function. Anyway, congratulations on a cool library. I started to work on my own controls, so I know what sort of effort is involved. Well done. |
Beta Was this translation helpful? Give feedback.
-
But now I have a follow up question. If I define my own "light" and "dark" themes, they don't replace the fluent-light and fluent-dark themes, correct? And since they don't, I can't use the I'll have to manually switch. And that means the Is there any documentation/guidance on using the JS BitTheme object properly? Because to effectively make this work, I have to replace the dark/light that comes with bitUi with my own variations - or - override the toggle/use system functions to use my own theme names. Thanks in advance for your help. |
Beta Was this translation helpful? Give feedback.
-
I think can understand - mostly - what's happening here: :root[bit-theme="custom-dark"] {
color-scheme: dark;
//primary
--bit-clr-pri: oklch(0.627 0.265 303.9);
--bit-clr-pri-hover: oklch(0.714 0.203 305.504);
--bit-clr-pri-active: #457FCC;
--bit-clr-pri-dark: #367FE0;
--bit-clr-pri-dark-hover: #3379D5;
--bit-clr-pri-dark-active: #3172CA;
--bit-clr-pri-light: #89BCFF;
--bit-clr-pri-light-hover: #78B2FF;
--bit-clr-pri-light-active: #67A9FF;
--bit-clr-pri-text: #212121; the I'm not sure what and I think the variable naming is:
But I don't understand why there are also When you switch themes, are you changing at the root level, or only changing the variable name? |
Beta Was this translation helpful? Give feedback.
-
This has been such a great discussion that I thought I should ask one more question. :) I want to toggle the I know I can catch a JS function on screen resize, but I thought I would ask to see if the capability is already in the library. I can't seem to find it. I know that I can control lots of presentation with CSS, I was just hoping to hook into Is there a control or other built-in way to break on screen sizes? I can see that it's happening in Thanks, again. |
Beta Was this translation helpful? Give feedback.
-
I am having a great experience with this library. I have a simple question. I'd like to override the background colors for main, main-content, navpanel and other areas. Right now, they are controlled by the browser and the "color-scheme: dark;" CSS variable. If you were me, would you create a new CSS value and assign it to those areas or would you use one of the existing Which existing value would I pick, if that's what I decide to do? TIA |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what you mean by in the <body class="@BitCss.Class.Color.Background.Primary @BitCss.Class.Color.Foreground.Primary"> in the <body class="bit-css-clr-bg-pri bit-css-clr-fg-pri"> these predefined C# and CSS classes have been added to BlazorUI for ease of use. |
Beta Was this translation helpful? Give feedback.
-
Oh, sorry. Looks like I missed the nested nature of the theme design, especially when it comes to modifying it. I'll have to study it more. Thanks. |
Beta Was this translation helpful? Give feedback.
-
So I love your platform and have come to thoroughly understand it. I also love all the functionality and features that you are building into your components, as you continue to work on improving them. However, at the end of the day, I am not at all a fan of the Fluent Design, and thus the look and feel of the BlazorUI library.
I had brought in the BlazorUI project and started to convert the SCSS one-by-one for each component to be utilizing the latest Bootstrap classes and honestly was running into no issues. It's my belief it would be good to make Bit's UI components work with different foundations, e.g. Bootstrap, Material, Fluent, and maybe even Tailwind down the road.
For me, I'm most familiar with Bootstrap, believe it looks good, and know it is still the most widely used.
Anyways, I started to customize each control, starting with the most basic, into being built on Bootstrap. In the end, I just don't have the time for it at the moment because I need to focus on other development, so I ended up completely switching over to use Havit's components, specifically because they are built on Bootstrap, but also lightweight like yours (which I truly appreciate). So many commercial libraries (Telerik and others) are literally 4+ MB in size via JS and/or CSS and people overlook that.
So I wanted to at least throw the idea out there to perhaps one day make your component library built on Bootstrap. While I don't use Material or Tailwind, either of those would probably be great to have as well. I think if you did this, and made the controls have a nicer UI, you will see greater adoption. Not to mention, more people are familiar with the Bootstrap framework than any CSS framework.
I know this is no small endeavor in the least, which is why I went back and forth even offering the suggestion, but in the end, I would like to help you make Bit more well known to the masses. So that's my 2 cents.
Beta Was this translation helpful? Give feedback.
All reactions