MCPcopy
hub / github.com/thomaspark/bootswatch

github.com/thomaspark/bootswatch @v5.3.8 sqlite

repository ↗ · DeepWiki ↗ · release v5.3.8 ↗
1,069 symbols 2,616 edges 257 files 26 documented · 2%
README

Bootswatch

A collection of open source themes for Bootstrap

View Bootswatch themes »

Report bug · Request feature · Blog

Usage

There are a few different ways you can integrate Bootswatch into your project.

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.

Via CDN

You can use the themes via CDN at jsDelivr.

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.

// 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!

Via npm

You can install as a package with the command npm install bootswatch.

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.

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

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

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.)

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:

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

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

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

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

And thus be able to import themes via Sass like so:

@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.

Customization

Bootswatch is open source and you’re welcome to modify the themes.

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.

Check out the Help page for more details on building your own theme.

Contributing

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

  • Issues: Provide a detailed report of any bugs you encounter and open an issue on GitHub.

  • 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.

  • 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.

  • Donation: Donations are gratefully accepted via GitHub and PayPal.

Author

Thomas Park

Thanks

Copyright and License

Copyright 2014-2023 Thomas Park

Code released under the MIT License.

Core symbols most depended-on inside this repo

$
called by 649
docs/2/bower_components/bootstrap/docs/assets/js/jquery.js
e
called by 200
docs/2/bower_components/bootstrap/docs/assets/js/google-code-prettify/prettify.js
callback
called by 54
docs/3/bower_components/bootstrap/js/transition.js
jQuery
called by 52
docs/2/bower_components/jquery/jquery.js
b
called by 51
docs/2/bower_components/bootstrap/docs/assets/js/jquery.js
jQuery
called by 50
docs/3/bower_components/font-awesome/src/assets/js/jquery-1.10.2.js
jQuery
called by 39
docs/3/bower_components/jquery/src/core.js
p
called by 28
docs/3/bower_components/font-awesome/src/assets/js/html5shiv.js

Shape

Function 1,069

Languages

TypeScript100%

Modules by API surface

docs/3/bower_components/font-awesome/src/assets/js/jquery-1.10.2.js83 symbols
docs/2/bower_components/jquery/jquery.js77 symbols
docs/3/bower_components/font-awesome/src/assets/js/jquery-1.10.2.min.js74 symbols
docs/2/bower_components/bootstrap/docs/assets/js/jquery.js71 symbols
docs/2/bower_components/jquery/jquery.min.js64 symbols
docs/3/bower_components/font-awesome/src/assets/js/jquery-1.7.1.min.js42 symbols
docs/3/bower_components/font-awesome/src/3.2.1/assets/js/jquery-1.7.1.min.js42 symbols
docs/3/bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js24 symbols
docs/3/bower_components/bootstrap-sass/assets/javascripts/bootstrap.js22 symbols
docs/3/bower_components/font-awesome/src/assets/js/bootstrap-222.min.js18 symbols
docs/3/bower_components/font-awesome/src/3.2.1/assets/js/bootstrap-222.min.js18 symbols
docs/2/js/bootstrap.js18 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

robloach/component-installer* · 1×
@lodder/grunt-postcss3.1.1 · 1×
autoprefixer10.4.17 · 1×
bootstrap5.3.8 · 1×
bootstrap-icons1.13.1 · 1×
btoa1.2.1 · 1×
connect2.1.3 · 1×
cross-env5.2.0 · 1×
ejs2.6.1 · 1×
glob7.1.3 · 1×
grunt1.6.1 · 1×
grunt-bytesize>=0.1.0 · 1×

For agents

$ claude mcp add bootswatch \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact