Libraries included in Drupal 7 core

There're many JavaScript libraries included in the Drupal 7 core. Many of them are rarely used in custom modules (I haven't used many of them) but they're helpful in some situations and it's nice to kwow what are inside the core as baseline knowledge for Drupal development.

Here is a list of the libraries. Each library comprises of a machine name, title, website and description in the following format.

  • machine name
    • title
    • website
    • description

Drupal 7 core JavaScript libraries

These can be used in the following ways.

$render_array['#attached']['library'][] = [$module_name, $library_name]; // e.g. render_array['#attached']['library'][] = ['system', 'jquery.cookie'];

drupal_add_library($module_name, $library_name); // e.g. drupal_add_library('system', 'jquery.cookie');