how to add a search box to a bootstrap navbar code example

Example 1: bootstrap nav search form

<nav class="navbar navbar-light bg-light">
  <form class="form-inline">
    <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
    <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
  </form>
</nav>

Example 2: search bar bootstrap

<div class="input-group">
	<input id="search-input" type="search" class="form-control" placeholder="Search anything...">  
  	<button id="search-button" type="button" class="btn btn-primary">
    <i class="fa fa-search"></i>
  	</button>
</div>

Tags:

Html Example