I am working on creating an expandable search box for a navbar. The goal is to have the search box expand when the user clicks on it, revealing another input box with a different name input. I would like to have two search boxes, stacked one under the other.
Here is my current implementation:
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c1a3aeaeb5b2b5b3a0b181f4eff1eff3">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9ffdf0f0ebecebedfeefdfaab1afb1ad">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"/>
<nav class="navbar navbar-expand-lg py-2 fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="">
<h7 id="nick"><strong class="d-none d-lg-inline">myLogo</strong></h7></a>
<form class="my-auto w-75" method="get" action="">
<div class="input-group">
<input type="text" class="form-control border border-right-0 ui-autocomplete-input" id="search"
name="search" placeholder="Search..." autocomplete="off">
<span class="input-group-append">
<button class="btn btn-outline-light border border-left-0 p-3" style="border-bottom-left-radius: 0%; border-top-left-radius: 0%; background-color: #f18918;" type="submit">
Search
</button>
</span>
</div>
</form>
<a class="navbar-icon" data-bs-toggle="offcanvas" href="#sidebar" role="button" aria-controls="sidebar"><i class="bi bi-person-circle"></i></a>
</div>
</nav>
Do you have any suggestions or ideas?