External JavaScript Libraries

Body

This documentation needs work. See "Help improve this page" in the sidebar.

 

Drupal 8 allows using external JavaScript libraries. A list of all external JavaScript libraries in core can be found in core.libraries.yml

LibraryVersion (used in core)Latest versionrelated IssueComment
backbone1.2.31.4.0 Adds Models, Views, Collections, and Events.
classList.js
2014-12-13
1.2.20180112 Cross-browser JavaScript shim that fully implements element.classList.
ckeditor
4.8.0
4.12.1 Enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
domready
1.0.8
1.0.8 Lets you know when the DOM is ready.
farbtastic1.21.3 Adds color picker widgets.
html5shiv3.7.33.7.3 Enables use of HTML5 sectioning elements in legacy Internet Explorer.
jquery-form3.514.2.2 jQuery Form Plugin. Easily and unobtrusively upgrade HTML forms to use AJAX. Main methods ajaxForm and ajaxSubmit.
jquery-joyride
2.1.0.1
2.1.0 Easy to configure site tour wizard.
jquery-once2.2.02.2.3 Ensure that a function is only applied once to an element.
jquery-ui-touch-punch0.2.30.2.3 A small hack that enables the use of touch events on sites using the jQuery UI user interface library.
jquery.cookie1.4.11.4.1 Simple, lightweight jQuery plugin for reading, writing and deleting cookies.
jquery.ui
1.12.1
1.12.1 Curated set of user interface interactions, effects, widgets, and themes built on top of jQuery.
jquery3.2.13.4.1 Fast, small, and feature-rich cross-browser JavaScript library.
matchMedia0.2.00.3.2 matchMedia polyfill for testing media queries in JavaScript.
modernizr3.3.13.7.1 JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
picturefill3.0.13.0.3 Responsive image polyfill for <picture>, srcset, sizes, and more.
sortable
1.15.0
1.15.0 A JavaScript library for reorderable drag-and-drop lists.
underscore
1.8.3
1.9.1 Utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter...) without extending any core JavaScript objects.

Note: All version details are related to the current core minor version (e.g. 8.5.x).

There is no automatic way to upgrade these libraries. Currently, manually downloaded and added to the assets/vendor directory and updated core.libraries.yml to upgrade. See CKEditor upgrade issue for an example.

Knowledge Category