I am just starting out in the world of web development and I have been experimenting with creating a dropdown list that includes a static, slightly faded placeholder, along with a custom icon. My goal is to have the selected item's text displayed on the dropdown once it has been chosen by the user. Despite trying various methods, the code snippet below brings me close to what I want, but not quite there yet. Additionally, I am unsure if this is the most effective approach to achieve the desired outcome.
Is there a feasible way to design a bootstrap (or non-bootstrap) dropdown that features a fixed placeholder, custom icon, and updates its display text based on user selection?
<div>
<label type = "button">Fruit</label>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Apple</a>
<a class="dropdown-item" href="#">Blueberry</a>
<a class="dropdown-item" href="#">Pear</a>
</div>
</div>
</div>