node package manager


Hudkit core library. You probably don't want to use this directly.


Provides base functionality for hudkit. Includes actions, widgets, root pane, styles, plus some housekeeping. You probably don't want to use this module directly - check out hudkit instead.

Register a module with hudkit is initialised. Hudkit modules are objects with two functions:

  • initialize(ctx): perform one-time module initialisation; this probably means registering a custom widget constructor by calling ctx.registerWidget(name, ctor). Check out lib/Widget/index.js and lib/RootPane/index.js for reference.

  • attach(instance): set this module up to work with the given hudkit instance; the most common operation performed here is to install any stylesheets by calling instance.appendCSS().

Initialise hudkit. Calls each registered module's initialize() function.

Create an instance of hudkit rooted on the given window. Returns an Instance object granting access to widget constructors, constants etc.

In addition to the following properties, every Instance also contains a proxy method to each registered widget constructor e.g. instance.Widget(), instance.RootPane().

Create an action function for the given callback. See hudkit-action for documentation.

Dictionary of defined constants. Aliased to i.k.

Append CSS to this instance's document.

var hudkit = require('hudkit-core');

var hk = hudkit.instance();