Support custom HTML as dropdown trigger
See original GitHub issueCurrently I’m using this normal bootstrap code to achieve a dropdown navbar brand:
<nav class="navbar navbar-expand-md fixed-top">
<div class="container">
<nav class="navbar-nav">
<li class="nav-item dropdown">
//!!! Not supported !!!
<a class="nav-link dropdown-toggle navbar-brand" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
<img src="../assets/img/org-image.svg"/>
<span class="headline">Some Org</span>
<font-awesome-icon :icon="['fas', 'chevron-down']" :fixed-width="true"/>
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
</div>
</li>
</nav>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar_collapse" aria-controls="navbar_collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbar_collapse">
<ul class="navbar-nav mr-auto">
<slot></slot>
</ul>
</div>
</div>
</nav>
This is not possible with bootstrap-vue since the dropdown only supports a text
option and not custom html to be the trigger.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Create a Custom Select Dropdown using HTML, CSS ...
A post on how to create a custom select dropdown using HTML, CSS and JavaScript. Should you build it from scratch or use...
Read more >Trigger Custom Dropdown w/ jQuery - Stack Overflow
Trigger Custom Dropdown w/ jQuery · First you lay out your HTML "select" (dropdown) markup · (After including all necessary project files) You...
Read more >Striking a Balance Between Native and Custom Select Elements
Clicking outside the component closes the listbox. The trigger contains a small triangle icon pointing downward to indicate there are options.
Read more >How To Create Custom Select Menus - W3Schools
Create a Custom Select Menu. Step 1) Add HTML: Example. <!-- Surround the select box within a "custom-select" ...
Read more >How to Create an HTML Dropdown Menu [+ Examples]
HTML Dropdown Menu ... A drop-down menu is a list of options that is revealed only when a user interacts with the menu,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you can place custom content in the dropdown trigger. the nav dropdown inherits from b-dropdown.
use the slot
button-content
Thank you, it worked perfectly!