Easy learning with example program codes

Bootstrap 4 Dropdown Disable and Active items

Bootstrap provides the following classes to disable and active dropdown items.
.active: class is used to highlight a specific dropdown item.
.disabled: class is used to disable a specific dropdown item.

Bootstrap 4 Dropdowns Header Example:

<!DOCTYPE html>
  <title>Bootstrap 4 Example</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
<div class="container">
  <h2>Bootstrap 4 Dropdowns Example</h2>
  <div class="dropdown">
    <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
      Dropdown button
    <div class="dropdown-menu">
      <a class="dropdown-item" href="#">Normal</a>
      <a class="dropdown-item active" href="#">Active</a>
      <a class="dropdown-item disabled" href="#">Disabled</a>

Try it:

Bootstrap 4 Example on

Please follow and like us:

Copyright © 2020 CodesJava Protection Status