Examples

        <%= buttongroup
            buttons => [
                ['Button 1'],
                ['Button 2'],
                ['Button 3'],
            ]
        %>

        <div class="btn-group">
            <button class="btn btn-default" type="button">Button 1</button>
            <button class="btn btn-default" type="button">Button 2</button>
            <button class="btn btn-default" type="button">Button 3</button>
        </div>

A basic button group.

        <%= buttongroup small,
            buttons => [
                ['Button 1'],
                { button => ['Dropdown 1', caret],
                  items => [
                      ['Item 1', ['item1'] ],
                      ['Item 2', ['item2'] ],
                      [],
                      ['Item 3', ['item3'] ],
                  ],
                },
                ['Button 2'],
                ['Button 3'],
            ],
        %>

        <div class="btn-group btn-group-sm">
            <button class="btn btn-default" type="button">Button 1</button>
            <div class="btn-group btn-group-sm">
                <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Dropdown 1 <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                    <li><a class="menuitem" href="item1" tabindex="-1">Item 1</a></li>
                    <li><a class="menuitem" href="item2" tabindex="-1">Item 2</a></li>
                    <li class="divider"></li>
                    <li><a class="menuitem" href="item3" tabindex="-1">Item 3</a></li>
                </ul>
            </div>
            <button class="btn btn-default" type="button">Button 2</button>
            <button class="btn btn-default" type="button">Button 3</button>
        </div>

Nested button group. Note that the `small` strapping is only necessary once. The same classes are automatically applied to the nested `.btn-group`.