2014-07-11 02:54:06 +02:00
---
2015-08-15 07:45:55 +02:00
layout: docs
2014-07-11 02:54:06 +02:00
title: Download
2017-09-05 00:29:05 +02:00
description: Download Bootstrap to get the compiled CSS and JavaScript, source code, or include it with your favorite package managers like npm, RubyGems, and more.
2015-08-06 02:47:45 +02:00
group: getting-started
2017-05-28 07:03:48 +02:00
toc: true
2014-07-11 02:54:06 +02:00
---
2017-08-08 06:57:08 +02:00
## Compiled CSS and JS
2016-10-10 23:18:16 +02:00
2019-01-08 17:33:28 +01:00
Download ready-to-use compiled code for **Bootstrap v{{< param current_version >}}** to easily drop into your project, which includes:
2016-10-10 23:18:16 +02:00
2019-02-04 11:22:02 +01:00
- Compiled and minified CSS bundles (see [CSS files comparison ]({{< docsref "/getting-started/contents#css-files" >}} ))
2020-11-08 19:33:04 +01:00
- Compiled and minified JavaScript plugins (see [JS files comparison ]({{< docsref "/getting-started/contents#js-files" >}} ))
2017-05-28 07:03:48 +02:00
2020-11-21 15:22:08 +01:00
This doesn't include documentation, source files, or any optional JavaScript dependencies like Popper.
2017-08-08 06:57:08 +02:00
2019-01-08 17:33:28 +01:00
< a href = "{{< param " download . dist " > }}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">Download< / a >
2016-10-10 23:18:16 +02:00
2016-10-25 01:05:59 +02:00
## Source files
2017-08-08 06:57:08 +02:00
Compile Bootstrap with your own asset pipeline by downloading our source Sass, JavaScript, and documentation files. This option requires some additional tooling:
- Sass compiler (Libsass or Ruby Sass is supported) for compiling your CSS.
- [Autoprefixer ](https://github.com/postcss/autoprefixer ) for CSS vendor prefixing
2019-02-04 11:22:02 +01:00
Should you require [build tools ]({{< docsref "/getting-started/build-tools#tooling-setup" >}} ), they are included for developing Bootstrap and its docs, but they're likely unsuitable for your own purposes.
2015-08-10 07:49:03 +02:00
2019-01-08 17:33:28 +01:00
< a href = "{{< param " download . source " > }}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source< / a >
2014-12-10 23:12:20 +01:00
2020-04-29 20:03:26 +02:00
## Examples
If you want to download and examine our [examples ]({{< docsref "/examples" >}} ), you can grab the already built examples:
< a href = "{{< param " download . dist_examples " > }}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Examples');">Download Examples< / a >
2020-10-19 10:25:31 +02:00
## CDN via jsDelivr
2016-10-10 23:18:16 +02:00
2020-10-19 10:25:31 +02:00
Skip the download with [jsDelivr ](https://www.jsdelivr.com/ ) to deliver cached version of Bootstrap's compiled CSS and JS to your project.
2016-10-10 23:18:16 +02:00
2020-10-19 11:56:49 +02:00
```html
2020-10-22 08:38:15 +02:00
< link href = "{{< param " cdn . css " > }}" rel="stylesheet" integrity="{{< param " cdn . css_hash " > }}" crossorigin="anonymous">
2020-07-14 18:21:39 +02:00
< script src = "{{< param " cdn . js_bundle " > } } " integrity=" { { < param "cdn.js_bundle_hash" > } } " crossorigin=" anonymous " > < / script >
2020-10-19 11:56:49 +02:00
```
2016-10-10 23:18:16 +02:00
2020-11-21 15:22:08 +01:00
If you're using our compiled JavaScript and prefer to include Popper separately, add Popper before our JS, via a CDN preferably.
2017-08-08 06:57:08 +02:00
2020-10-19 11:56:49 +02:00
```html
2019-01-08 17:33:28 +01:00
< script src = "{{< param " cdn . popper " > } } " integrity=" { { < param "cdn.popper_hash" > } } " crossorigin=" anonymous " > < / script >
2020-07-14 18:21:39 +02:00
< script src = "{{< param " cdn . js " > } } " integrity=" { { < param "cdn.js_hash" > } } " crossorigin=" anonymous " > < / script >
2020-10-19 11:56:49 +02:00
```
2017-08-08 06:57:08 +02:00
2015-06-10 01:09:33 +02:00
## Package managers
2017-06-18 10:33:42 +02:00
Pull in Bootstrap's **source files** into nearly any project with some of the most popular package managers. No matter the package manager, Bootstrap will **require a Sass compiler and [Autoprefixer](https://github.com/postcss/autoprefixer)** for a setup that matches our official compiled versions.
2015-08-10 07:49:03 +02:00
2015-06-10 01:09:33 +02:00
### npm
2014-07-11 02:54:06 +02:00
2017-09-27 15:47:38 +02:00
Install Bootstrap in your Node.js powered apps with [the npm package ](https://www.npmjs.com/package/bootstrap ):
2014-07-11 02:54:06 +02:00
2020-10-19 11:56:49 +02:00
```sh
2020-06-16 20:17:28 +02:00
npm install bootstrap@next
2020-10-19 11:56:49 +02:00
```
2015-01-04 05:08:58 +01:00
2019-02-20 09:34:43 +01:00
`const bootstrap = require('bootstrap')` or `import bootstrap from 'bootstrap'` will load all of Bootstrap's plugins onto a `bootstrap` object.
The `bootstrap` module itself exports all of our plugins. You can manually load Bootstrap's plugins individually by loading the `/js/dist/*.js` files under the package's top-level directory.
2015-01-04 05:08:58 +01:00
2015-01-19 23:48:12 +01:00
Bootstrap's `package.json` contains some additional metadata under the following keys:
2018-04-01 09:35:51 +02:00
- `sass` - path to Bootstrap's main [Sass ](https://sass-lang.com/ ) source file
2015-01-19 23:48:12 +01:00
- `style` - path to Bootstrap's non-minified CSS that's been precompiled using the default settings (no customization)
2018-10-30 10:27:13 +01:00
### yarn
2019-05-16 20:47:26 +02:00
Install Bootstrap in your Node.js powered apps with [the yarn package ](https://yarnpkg.com/en/package/bootstrap ):
2018-10-30 10:27:13 +01:00
2020-10-19 11:56:49 +02:00
```sh
2020-06-19 19:55:04 +02:00
yarn add bootstrap@next
2020-10-19 11:56:49 +02:00
```
2018-10-30 10:27:13 +01:00
2015-12-17 22:29:58 +01:00
### RubyGems
2016-10-03 18:55:59 +02:00
Install Bootstrap in your Ruby apps using [Bundler ](https://bundler.io/ ) (**recommended**) and [RubyGems ](https://rubygems.org/ ) by adding the following line to your [`Gemfile` ](https://bundler.io/gemfile.html ):
2015-12-17 22:29:58 +01:00
2020-10-19 11:56:49 +02:00
```ruby
2019-01-08 17:33:28 +01:00
gem 'bootstrap', '~> {{< param current_ruby_version > }}'
2020-10-19 11:56:49 +02:00
```
2015-12-17 22:29:58 +01:00
Alternatively, if you're not using Bundler, you can install the gem by running this command:
2020-10-19 11:56:49 +02:00
```sh
2019-01-08 17:33:28 +01:00
gem install bootstrap -v {{< param current_ruby_version > }}
2020-10-19 11:56:49 +02:00
```
2015-12-17 22:29:58 +01:00
[See the gem's README ](https://github.com/twbs/bootstrap-rubygem/blob/master/README.md ) for further details.
2015-06-10 01:09:33 +02:00
### Composer
2015-03-29 09:08:54 +02:00
2017-09-26 14:24:14 +02:00
You can also install and manage Bootstrap's Sass and JavaScript using [Composer ](https://getcomposer.org/ ):
2015-06-19 08:56:43 +02:00
2020-10-19 11:56:49 +02:00
```sh
2019-01-08 17:33:28 +01:00
composer require twbs/bootstrap:{{< param current_version > }}
2020-10-19 11:56:49 +02:00
```
2015-03-29 09:08:54 +02:00
2015-08-20 20:31:48 +02:00
### NuGet
2017-09-26 14:24:14 +02:00
If you develop in .NET, you can also install and manage Bootstrap's [CSS ](https://www.nuget.org/packages/bootstrap/ ) or [Sass ](https://www.nuget.org/packages/bootstrap.sass/ ) and JavaScript using [NuGet ](https://www.nuget.org/ ):
2015-08-20 20:31:48 +02:00
2020-10-19 11:56:49 +02:00
```powershell
2018-01-18 19:29:48 +01:00
Install-Package bootstrap
2020-10-19 11:56:49 +02:00
```
2016-10-06 03:02:52 +02:00
2020-10-19 11:56:49 +02:00
```powershell
2018-01-18 19:29:48 +01:00
Install-Package bootstrap.sass
2020-10-19 11:56:49 +02:00
```