<div class="btn-group" role="group">
    <button type="button" class="btn btn-primary">Left</button>
    <button type="button" class="btn btn-primary">Middle</button>
    <button type="button" class="btn btn-primary">Right</button>
</div>


<div class="btn-toolbar" role="toolbar">
    <div class="btn-group mr-2" role="group">
        <button type="button" class="btn btn-secondary">1</button>
        <button type="button" class="btn btn-secondary">2</button>
        <button type="button" class="btn btn-secondary">3</button>
        <button type="button" class="btn btn-secondary">4</button>
    </div>

    <div class="btn-group mr-2" role="group">
        <button type="button" class="btn btn-secondary">5</button>
        <button type="button" class="btn btn-secondary">6</button>
        <button type="button" class="btn btn-secondary">7</button>
    </div>

    <div class="btn-group" role="group">
        <button type="button" class="btn btn-secondary">8</button>
    </div>
</div>


<div class="btn-group btn-group-lg" role="group">
    <button type="button" class="btn btn-primary">Left</button>
        <button type="button" class="btn btn-primary">Middle</button>
        <button type="button" class="btn btn-primary">Right</button>
    </div>

    <div class="btn-group" role="group">
        <button type="button" class="btn btn-primary">Left</button>
        <button type="button" class="btn btn-primary">Middle</button>
        <button type="button" class="btn btn-primary">Right</button>
    </div>

    <div class="btn-group btn-group-sm" role="group">
        <button type="button" class="btn btn-primary">Left</button>
        <button type="button" class="btn btn-primary">Middle</button>
        <button type="button" class="btn btn-primary">Right</button>
    </div>
</div>


<div class="btn-group" role="group">
    <button type="button" class="btn btn-secondary">1</button>
    <button type="button" class="btn btn-secondary">2</button>

    <div class="btn-group" role="group">
        <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Dropdown
        </button>
        <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Dropdown link</a>
            <a class="dropdown-item" href="#">Dropdown link</a>
        </div>
    </div>
</div>


<div class="btn-group-vertical" role="group">
    <button type="button" class="btn btn-secondary">Button 1</button>
    <button type="button" class="btn btn-secondary">Button 2</button>
    <button type="button" class="btn btn-secondary">Button 3</button>
    <button type="button" class="btn btn-secondary">Button 4</button>
    <button type="button" class="btn btn-secondary">Button 5</button>
    <button type="button" class="btn btn-secondary">Button 6</button>
</div>


<div class="btn-group-vertical" role="group">
    <button type="button" class="btn btn-primary">Button 1</button>
    <button type="button" class="btn btn-secondary">Button 2</button>
    <button type="button" class="btn btn-success">Button 3</button>
    <button type="button" class="btn btn-dark">Button 4</button>
    <button type="button" class="btn btn-info">Button 5</button>
    <button type="button" class="btn btn-light">Button 6</button>
</div>

<div class="btn-group-vertical" role="group">
    <button type="button" class="btn btn-secondary">Button</button>
    <button type="button" class="btn btn-secondary">Button</button>
    <div class="btn-group" role="group">
        <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Dropdown
        </button>
        <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Dropdown link</a>
            <a class="dropdown-item" href="#">Dropdown link</a>
        </div>
    </div>

    <button type="button" class="btn btn-secondary">Button</button>
    <button type="button" class="btn btn-secondary">Button</button>
    <div class="btn-group" role="group">
        <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Dropdown
        </button>
        <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Dropdown link</a>
            <a class="dropdown-item" href="#">Dropdown link</a>
        </div>
    </div>

    <div class="btn-group" role="group">
        <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Dropdown
        </button>
        <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Dropdown link</a>
            <a class="dropdown-item" href="#">Dropdown link</a>
        </div>
    </div>

    <div class="btn-group" role="group">
        <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Dropdown
        </button>
        <div class="dropdown-menu">
            <a class="dropdown-item" href="#">Dropdown link</a>
            <a class="dropdown-item" href="#">Dropdown link</a>
        </div>
    </div>
</div>

Vertical Outlines Button Group

<div class="btn-group-vertical" role="group">
    <button type="button" class="btn btn-outline-primary">Button 1</button>
    <button type="button" class="btn btn-outline-secondary">Button 2</button>
    <button type="button" class="btn btn-outline-success">Button 3</button>
    <button type="button" class="btn btn-outline-dark">Button 4</button>
    <button type="button" class="btn btn-outline-info">Button 5</button>
</div>