Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Bootstrap Library

Security covered Maintenance fixes only 8,266 sites

Part of the Bootstrap ecosystem · 46 projects

This module provides a way to easily manage and load Bootstrap CSS and JavaScript libraries on your Drupal site. It allows you to use local or CDN versions of Bootstrap, supporting different development and production needs, and can be configured to load on specific pages or for particular themes.

Drupal 8 is here!!

Drupal 8 version includes local libraries as well as external CDN libraries.
Drupal 8 version of the module does not depend on libraries module.

This module loads via libraries , regardless of the theme you are using. It does nothing else.

When using Bootstrap themes is particularly helpful to:

  1. Correct Browser Support issues, installing respond.js.
  2. Update your Bootstrap version over your current theme options.
  3. Advanced CDN files loading.

This module does not depend on a specific version of Bootstrap, it just load the version you install, with the components you install on it, either complete or customize.

Installation Drupal 8

  1. Download Boostrap files on /libraries/bootstrap.
  2. Configure on which pages you want to load the libraries (by default everything but admin/*).
  3. Configure on which themes you want to load the libraries.

or

  1. On your theme root run composer require drupal/bootstrap_library
  2. Choose load libraries "locally composer"
  3. Advanced

    Code snipped for Drupal 8, to activate the library version directly on your module (hook_page_attachments()) or theme (hook_preprocess_page()):

    <?php
      if (\Drupal::moduleHandler()->moduleExists('bootstrap_library')) {
        $library = theme_get_setting('bootstrap_barrio_library');
        switch ($library) {
          case 'cdn' :
            $variables['#attached']['library'][] = 'bootstrap_library/bootstrap-cdn';
            break;
          case 'production':
            $variables['#attached']['library'][] = 'bootstrap_library/bootstrap';
            break;
          case 'development':
            $variables['#attached']['library'][] = 'bootstrap_library/bootstrap-dev';
            break;
        }
      }
    ?>

    Installation Drupal 7

    1. Download Boostrap files on /sites/all/libraries/bootstrap.
    2. Install and enable Boostrap Library Module.
    3. Configure on which pages you want to load the libraries (by default everything but admin/*).
    4. Configure on which themes you want to load the libraries.

    Compatibility with Bootstrap Theme

    This module is fully compatible with the Bootstrap Theme.

    Mantainers of this distribution:

Sponsored by:

Drupal 9–10 · not 11

Ask your assistant about Bootstrap Library

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jan 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
2.0.2 Stable 9–10 Jan 18, 2023
2.0.x-dev Dev 11 Jan 18, 2023