diff --git a/dev/js/src/buttongroup.js b/dev/js/src/buttongroup.js
new file mode 100644
index 0000000..b33c13a
--- /dev/null
+++ b/dev/js/src/buttongroup.js
@@ -0,0 +1,61 @@
+define(['util'], function () {
+  return {
+    /**
+     * Create button group
+     */
+    create : function (classes) {
+      return Object.create(this)._init(classes);
+    },
+    
+    // Initialize button group
+    _init : function (classes) {
+      var e = document.createElement('div');
+      var cl = e.classList;
+      if (classes !== undefined) {
+        cl.add.apply(cl,classes);
+      };
+      cl.add('button-group');
+      this._element = e;
+      return this;
+    },
+
+    /**
+     * Return main element
+     */
+    element : function () {
+      return this._element;
+    },
+
+    /**
+     * Add button in order
+     */
+    add : function (title, classes, cb) {
+      var b = this._element.addE('span');
+      b.addT(title);
+      b.setAttribute('title',title);
+      if (classes !== undefined) {
+        b.classList.add.apply(b.classList, classes);
+      };
+
+      var that = this;
+      b.addEventListener('click', function (e) {
+
+        // Do not bubble
+        e.halt();
+        
+        // Call callback
+        cb.apply(that._bind || this, e)
+      });
+    },
+
+    /**
+     * Bind an object to all callbacks of the button group
+     */
+    bind : function (obj) {
+      if (obj !== undefined) {
+        this._bind = obj;
+      };
+      return this._bind || this;
+    }
+  }
+});
