diff --git a/dev/js/spec/buttongroupSpec.js b/dev/js/spec/buttongroupSpec.js
index 9183759..a386c1f 100644
--- a/dev/js/spec/buttongroupSpec.js
+++ b/dev/js/spec/buttongroupSpec.js
@@ -106,6 +106,20 @@
       expect(fun.count).toEqual(1);
     });
 
+    it('should add icon', function () {
+      var group = buttonGroupClass.create();
+      expect(group.element().classList.contains('button-group')).toBeTruthy();
+
+      group.add('Meta', ['meta'], function (e) {}, 'metaicon');
+
+      var btn = group.element().firstChild;
+      expect(btn.tagName).toEqual('SPAN');
+      expect(btn.getAttribute('data-icon')).toEqual('metaicon');
+      expect(btn.classList.contains('meta')).toBeTruthy();
+      expect(btn.innerText).toEqual('Meta');
+    });
+
+    
     it('should open lists', function () {
       
     });
diff --git a/dev/js/src/buttongroup.js b/dev/js/src/buttongroup.js
index 01e5a1c..f7acfb7 100644
--- a/dev/js/src/buttongroup.js
+++ b/dev/js/src/buttongroup.js
@@ -31,9 +31,9 @@
 
     
     /**
-     * Upgrade this object to another object,
+     * Upgrade this object to another object, 
      * while private data stays intact.
-     *
+     * 
      * @param {Object} An object with properties.
      */
     upgradeTo : function (props) {
@@ -46,15 +46,21 @@
     
     /**
      * Add button in order
-     *
+     * 
      * Returns the button element
      */
-    add : function (title, classes, cb) {
+    // TODO: Accept an object instead of a list
+    add : function (title, classes, cb, icon) {
       var b = this._element.addE('span');
       b.setAttribute('title',title);
       if (classes !== undefined) {
         b.classList.add.apply(b.classList, classes);
       };
+     
+      if (icon !== undefined){ 
+        b.setAttribute('data-icon', icon);
+      };
+     
       b.addE('span').addT(title);
 
       var that = this;
@@ -75,7 +81,7 @@
     
     /**
      * Add button that spawns a list in order.
-     *
+     * 
      * Returns the list object.
      */
     addList : function (title, classes, itemClass = defaultItemClass) {
@@ -136,8 +142,8 @@
     },
 
     /**
-     * Bind an object to all callbacks of the button group.
-     * To get the button element inside the callback,
+     * Bind an object to all callbacks of the button group. 
+     * To get the button element inside the callback, 
      * use this.button
      */
     bind : function (obj) {
diff --git a/dev/js/src/plugin/server.js b/dev/js/src/plugin/server.js
index 7a2d305..90dcd7c 100644
--- a/dev/js/src/plugin/server.js
+++ b/dev/js/src/plugin/server.js
@@ -133,8 +133,8 @@
         let title = embed["title"];        
         let panel = embed["panel"];
         let onClick = embed["onClick"];
-
-
+        let icon = embed["icon"];
+        
         if (!panel || !(buttons[panel] || buttonsSingle[panel]))
           throw new Error("Panel for plugin is invalid");        
 
@@ -160,20 +160,20 @@
 
           // Add to dynamic button list (e.g. for matches)
           if (buttons[panel]) {
-            buttons[panel].push([title, embed["classes"], cb]);
+            buttons[panel].push([title, embed["classes"], cb, icon]);
           }
 
           // Add to static button list (e.g. for query) already loaded
           else if (KorAP.Panel[panel]) {
-            KorAP.Panel[panel].actions.add(title, embed["classes"], cb);
+            KorAP.Panel[panel].actions.add(title, embed["classes"], cb, icon);
           }
 
           // Add to static button list (e.g. for query) not yet loaded
           else {
-            buttonsSingle[panel].push([title, embed["classes"], cb]);
+            buttonsSingle[panel].push([title, embed["classes"], cb, icon]);
           }
         }
-
+        //TODO There is no possibility to add icons to an plugin toggle button right now. 
         else if (onClick["action"] == "toggle") {
 
           // Todo: Initially false
