TGAM Pattern Library Documentation

Browse the pattern library website

Importing pattern library JavaScript into your project

Once you’ve installed the tgam-patterns package, you should be able to require() or import JavaScript files from the node_modules/tgam-patterns/patterns/javascripts directory. However, you’ll need to install a bundler in order to make use of the JavaScript.

Install a JavaScript module bundler

You’ll need to setup an asset pipeline in order to transpile and bundle your JavaScript.

  1. Install a JavaScript module bundler, such as Webpack or Browserify, and configure it to transpile and bundle your JavaScript files (refer to your chosen bundler’s documentation for details).