2017 © Pedro Peláez
 

component bootswatch

Themes for Bootstrap

image

thomaspark/bootswatch

Themes for Bootstrap

  • Saturday, July 28, 2018
  • by electblake
  • Repository
  • 535 Watchers
  • 10459 Stars
  • 31,406 Installations
  • JavaScript
  • 6 Dependents
  • 0 Suggesters
  • 2984 Forks
  • 9 Open issues
  • 38 Versions
  • 7 % Grown

The README.md

, (*1)

Bootswatch

A collection of open source themes for Bootstrap
View Bootswatch themes »

Report bug · Request feature · Blog , (*2)

Usage

There are a few different ways you can integrate Bootswatch into your project., (*3)

Via Pre-compiled Asset

Download the bootstrap.min.css file associated with a theme and replace Bootstrap's default stylesheet. You must still include Bootstrap's JavaScript file to have functional dropdowns, modals, etc., (*4)

Via CDN

You can use the themes via CDN at jsDelivr., (*5)

Via Sass Imports

If you're using Sass (SCSS) in your project, you can import the _variables.scss and _bootswatch.scss files for a given theme. This method allows you to override theme variables., (*6)

// Your variable overrides go here, e.g.:
// $h1-font-size: 3rem;

@import "~bootswatch/dist/[theme]/variables";
@import "~bootstrap/scss/bootstrap";
@import "~bootswatch/dist/[theme]/bootswatch";

Make sure to import Bootstrap's bootstrap.scss in between _variables.scss and _bootswatch.scss!, (*7)

Via npm

You can install as a package with the command npm install bootswatch., (*8)

React Users (create-react-app, or similar bundler)

Modern JavaScript bundlers (webpack, parcel, rollup) support importing CSS from JS files. This can make it easier to deploy various 1st and 3rd party assets predictably. Note: There are tradeoffs to the following method, research your tooling before deploying to production., (*9)

Before continuing, ensure you've run npm install bootswatch in your local project folder. (Use either npm or yarn.), (*10)

Add the following import to your top-level index.js (or App.js) file. Add it before any other .css imports., (*11)

import "bootswatch/dist/[theme]/bootstrap.min.css";
// TODO: Note: Replace ^[theme]^ (examples: darkly, slate, cosmo, spacelab, and superhero. See https://bootswatch.com for current theme names.)

Here's an example of updated imports in App.js to use "slate" theme (using a create-react-app fresh project.), (*12)

import React from 'react';
import logo from './logo.svg';
import 'bootswatch/dist/slate/bootstrap.min.css'; // Added this :boom:
import './App.css';

function App() {
...

Via Ruby Gem

In your Ruby project, you can access the latest version of each theme by adding the following to your Gemfile and running bundle install:, (*13)

gem "bootswatch", github: "thomaspark/bootswatch"

Each theme directory is then accessible via the path "#{Gem.loaded_specs["bootswatch"].load_paths.first}/[theme]"., (*14)

Ruby on Rails users can add the following to an initializer (e.g. config/initializers/bootswatch.rb):, (*15)

Rails.application.config.assets.paths += Gem.loaded_specs["bootswatch"].load_paths

And thus be able to import themes via Sass like so:, (*16)

@import "[theme]/variables";
@import "~bootstrap/scss/bootstrap";
@import "[theme]/bootswatch";

Via API

A simple JSON API is available for integrating your platform with Bootswatch. More info can be found on the Help page., (*17)

Customization

Bootswatch is open source and you’re welcome to modify the themes., (*18)

Each theme consists of two SASS files. _variables.scss, which is included by default in Bootstrap, allows you to customize the settings. _bootswatch.scss introduces more extensive structural changes., (*19)

Check out the Help page for more details on building your own theme., (*20)

Contributing

It's through your contributions that Bootswatch will continue to improve. You can contribute in several ways:, (*21)

  • Issues: Provide a detailed report of any bugs you encounter and open an issue on GitHub., (*22)

  • Documentation: If you'd like to fix a typo or beef up the docs, you can fork the project, make your changes, and submit a pull request., (*23)

  • Code: Make a fix and submit it as a pull request. When making changes, it's important to keep the CSS and SASS versions in sync. To do this, be sure to edit the SASS source files for the particular theme first, then run the tasks grunt swatch to build the CSS., (*24)

  • Donation: Donations are gratefully accepted via GitHub and PayPal., (*25)

Author

Thomas Park, (*26)

Thanks

Copyright 2014-2023 Thomas Park, (*27)

Code released under the MIT License., (*28)

The Versions

28/07 2018

dev-master

9999999-dev

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

26/07 2018

v4.1.3

4.1.3.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

13/07 2018

v4.1.2

4.1.2.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

30/04 2018

v4.1.1

4.1.1.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

24/04 2018

v4.1.0+1

4.1.0.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

30/03 2018

v4.0.0+1

4.0.0.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

19/01 2018

v4.0.0

4.0.0.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

03/01 2018

v4.0.0-beta.3

4.0.0.0-beta3

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

04/11 2017

v4.0.0-beta.2

4.0.0.0-beta2

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

26/10 2017

v4.x-dev

4.9999999.9999999.9999999-dev

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

13/06 2017

v4.0.0-alpha.6

4.0.0.0-alpha6

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

30/07 2016

v3.3.7

3.3.7.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

03/06 2016

v3.3.6+2

3.3.6.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

25/11 2015

v3.3.6

3.3.6.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

24/09 2015

v3.3.5+4

3.3.5.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

17/06 2015

v3.3.5

3.3.5.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

23/03 2015

v3.3.4+1

3.3.4.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

17/03 2015

v3.3.4

3.3.4.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

23/01 2015

v3.3.2

3.3.2.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

23/01 2015

v3.3.1+3

3.3.1.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

12/11 2014

v3.3.1

3.3.1.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

02/11 2014

v3.3.0

3.3.0.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

03/09 2014

v3.2.0+4

3.2.0.0

Themes for Bootstrap

  Sources   Download

MIT

by Avatar thomaspark

27/06 2014

v3.2.0

3.2.0.0

Themes for Bootstrap

  Sources   Download

MIT

The Requires

 

by Avatar thomaspark

01/04 2014

v3.1.1+1

3.1.1.0

Themes for Bootstrap

  Sources   Download

MIT

The Requires

 

by Avatar thomaspark

13/02 2014

v3.1.1

3.1.1.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

06/02 2014

v3.1.0+1

3.1.0.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

03/02 2014

v3.1.0

3.1.0.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

11/12 2013

v3.0.3+1

3.0.3.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

05/12 2013

v3.0.3

3.0.3.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

22/11 2013

v3.0.2+2

3.0.2.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

07/11 2013

v3.0.2

3.0.2.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

30/10 2013

v3.0.1

3.0.1.0

Themes for Bootstrap

  Sources   Download

by Avatar thomaspark

20/08 2013

v3.0.0

3.0.0.0

Themes for Twitter Bootstrap

  Sources   Download

by Avatar thomaspark

17/08 2013

v3.0.0-rc2

3.0.0.0-RC2

Themes for Twitter Bootstrap

  Sources   Download

by Avatar thomaspark

07/08 2013

v3.0.0-rc1

3.0.0.0-RC1

Themes for Twitter Bootstrap

  Sources   Download

by Avatar thomaspark

20/05 2013

v2.3.2

2.3.2.0

Themes for Twitter Bootstrap

  Sources   Download

by Avatar thomaspark

15/05 2013

v2.3.1+1

2.3.1.0

Themes for Twitter Bootstrap

  Sources   Download

by Avatar thomaspark