Is it possible to build an Electron app with just Bootstrap as the front-end library?


#1

I’m trying to build a desktop app with Electron and I’m not sure if bootstrap alone is enough, my app will have several different views and will deal with a MySQL database. My knowldge on Angular and React are virtually non-existent that’s why I’m asking about Bootstrap.


#2

Yep! Should be just fine. I make mine on my own


#3

Thanks! What is the best way to use Bootstrap with Electron? I mean do you have to install it? I got the example templates from bootstrap’s official website and it renders (used CDN) but I don’t think the JavaScript work because the drop-down button doesn’t do anything when I click it.


#4

Just do what you do to make a website using Bootstrap.[quote=“k0sar, post:3, topic:41842”]
I mean do you have to install it?
[/quote]
Well probably not but take a look at this[quote=“k0sar, post:3, topic:41842”]
but I don’t think the JavaScript work because the drop-down button doesn’t do anything when I click it.
[/quote]
Check the console if there’s any error, also don’t forget to include the bootstrap js files.


#5

There are no errors in the console but still the buttons don’t work.


#6

Bootstrap is only a CSS framework it doesn’t give you a way to manipulate the DOM for example.

You could in principle do everything with vanilla JS, or jQuery, but I’d recommend you to take some time and learn a modern library to avoid micro managing the DOM.

Vue is super easy and is excellent for beginners. You just need to import Vue with a <script> tag, write your templates directly in your index.html and finally write your JS somewhere (either another <script> or some .js file). You can of course get it running with Webpack, ES6, the whole enchilada, but it’s not needed.