Dropdowns

Simple Dropdowns

<div class="dropdown d-inline-block">

    <!-- Dropdown Button -->
    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        Dropdown button
    </button>
    <!-- /dropdown button -->

    <!-- Dropdown Menu -->
    <div class="dropdown-menu">
        <a class="dropdown-item" href="javascript:void(0)">Action</a>
        <a class="dropdown-item" href="javascript:void(0)">Another action</a>
        <a class="dropdown-item" href="javascript:void(0)">Something else here</a>
    </div>
    <!-- /dropdown menu -->

</div>

Various Color Dropdowns

<div class="btn-group dropdown">

    <!-- Dropdown Button -->
    <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        Primary
    </button>
    <!-- /dropdown button -->

    <!-- Dropdown Menu -->
    <div class="dropdown-menu">
        <a class="dropdown-item" href="javascript:void(0)">Action</a>
        <a class="dropdown-item" href="javascript:void(0)">Another action</a>
        <a class="dropdown-item" href="javascript:void(0)">Something else here</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="javascript:void(0)">Separated link</a>
    </div>
    <!-- /dropdown menu -->

</div>

Sizes

<div class="btn-group dropdown">

    <!-- Dropdown Button -->
    <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        Primary
    </button>
    <!-- /dropdown button -->

    <!-- Dropdown Menu -->
    <div class="dropdown-menu">
        <a class="dropdown-item" href="javascript:void(0)">Action</a>
        <a class="dropdown-item" href="javascript:void(0)">Another action</a>
        <a class="dropdown-item" href="javascript:void(0)">Something else here</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="javascript:void(0)">Separated link</a>
    </div>
    <!-- /dropdown menu -->

</div>

Directions

<div class="btn-group dropup">

    <!-- Dropdown Button -->
    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        Dropup button
    </button>
    <!-- /dropdown button -->

    <!-- Dropdown Menu -->
    <div class="dropdown-menu">
        <a class="dropdown-item" href="javascript:void(0)">Action</a>
        <a class="dropdown-item" href="javascript:void(0)">Another action</a>
        <a class="dropdown-item" href="javascript:void(0)">Something else here</a>
    </div>
    <!-- /dropdown menu -->

</div>

Last updated