How to install and set up hexagon
Installing with npm (recommended)
npm install --save hexagon-js
The library will be stored in node_modules/hexagon-js/dist
Installing with bower
bower install hexagon-js
The bower builds contain all the modules - in order to create more slimline builds see the installing with npm section below.
The library will be stored in bower_components/hexagon-js
Using the builder api
Hexagon has a builder api for creating custom builds. This is included in the hexagon-js npm module. To install it run the following:
npm install --save hexagon-js
To build a custom version of the library some javascript must be written:
const hexagon = require('hexagon-js')

  // the directory to output the library to
  dest: 'libs/hexagonjs',
  // include just the modules you are interested in, or leave as undefined to get all the modules
  modules: ['plot', 'titlebar', 'base']
There are two themes available by default, hexagon.light and hexagon.dark with a third, more basic theme available called hexagon.base. Save this in a file, then run it with node to generate your build. This api can be easily integrated with gulp or grunt, or can even be run as an npm task.
Builder API
Builds a copy of the hexagon library into the provided dest
  • hexagon.base.build: Builds a basic theme with minimal styles
  • hexagon.dark.build: Builds the dark hexagon theme
  • hexagon.light.build: Builds the light hexagon theme
The target directory for the hexagon build
Whether to embed assets in the CSS using base64 encoding
It is not always possible to embed all assets so some may still be output to the assets directory
Default: false
Whether to output minified JS/CSS alongside the usual build files
Default: false
The array of hexagon modules to build
This can be used to create a subset of Hexagon modules for cases where only specific modules are required
The list of modules provided (and any dependencies) will be included in the bundle
Default: All Modules
The hexagon prefix to use for the CSS. (e.g. the hx of .hx-form )
Default: "hx"
A promise that resolves when hexagon has finished building or rejects when there is an error