Current state: default implementation in documents
Currently, the documentation here uses the standard version of input + a drop-down list (search on drop-down lists of buttons). I leave the original recording solution for those who cannot use the solution that is now included in the documentation.
Original solution
Yes it is possible. There is actually one example from the Twitter Bootstrap documentation (follow the link and search for “Examples” for the drop-down buttons):
<div class="btn-group"> <a class="btn btn-primary" href="#"> <i class="icon-user icon-white"></i> User </a> <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"> <span class="caret"></span> </a> <ul class="dropdown-menu"> <li><a href="#"><i class="icon-pencil"></i> Edit</a></li> <li><a href="#"><i class="icon-trash"></i> Delete</a></li> <li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li> <li class="divider"></li> <li><a href="#"><i class="i"></i> Make admin</a></li> </ul> </div>
If it is enclosed in text, it may look like this (the text on the button has been changed, nothing more):

EDIT:
If you are trying to reach <input> with dropdown menu added, as in dropdown menus, this is one solution:
- Add the
btn-group class to the element with the input-append class, - Add elements with classes
dropdown-toggle and dropdown-menu at the end of the element with class input-append , - The override style to match the
.input-append .btn.dropdown-menu element, so it does not have float: left (otherwise it will fall into the next line).
The resulting code may look like this:
<div class="input-append btn-group"> <input class="span2" id="appendedInputButton" size="16" type="text"> <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"> <span class="caret"></span> </a> <ul class="dropdown-menu"> <li><a href="#"><i class="icon-pencil"></i> Edit</a></li> <li><a href="#"><i class="icon-trash"></i> Delete</a></li> <li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li> <li class="divider"></li> <li><a href="#"><i class="i"></i> Make admin</a></li> </ul> </div>
with little support for this style override:
.input-append .btn.dropdown-toggle { float: none; }
and get the same result:

EDIT 2: Updated CSS selector (was .dropdown-menu , is .dropdown-toggle ).
Tadeck Aug 16 '12 at 2:11 2012-08-16 02:11
source share