Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stackblitz: How to import Bootstrap CSS framework

Tags:

angular

I just found the amazing Stackblitz online VS Code editor. I created an Angular project and under dependencies installed the Bootstrap CSS framework but how should I import Bootstrap in to my project? Usually I do it by adding this line of code to angular-cli.json:

"../node_modules/bootstrap/dist/css/bootstrap.min.css"

But how does it work on Stackblitz?

Thanks

like image 964
user1941537 Avatar asked Nov 01 '17 11:11

user1941537


People also ask

Can we use bootstrap in StackBlitz?

Stackblitz has an in-browser NPM client that consists in a simple input where we can add NPM packages just by typing in the NPM package name. Finally, we include bootstrap. min.

How do I add dependencies to StackBlitz?

Under the "Files" tree is a "Dependencies" section. You can add your dependencies there. If you just want the latest version you can just use the package name (ex: ngx-bootstrap ) or you can target a specific version (ex: [email protected] ).


1 Answers

In dependencies add "bootstrap" then click enter.

then write following line in styles.css in src folder

@import '~bootstrap/dist/css/bootstrap.min.css';
like image 154
Chandru Avatar answered Sep 28 '22 23:09

Chandru