VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-input-group-segmented-buttons/

⇱ Bootstrap 5 Input group Segmented Buttons - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Input group Segmented Buttons

Last Updated : 29 Jul, 2024

Bootstrap 5 Input group Segmented buttons used to segment dropdowns in input groups, use the same general style as the dropdown button.

Bootstrap 5 Input group Segmented buttons used classes: There is no specific class used to group Segmented buttons. To create a button, we use the .btn class, and to create a dropdown-menu, we use the .dropdown-menu class.

Syntax:

<div class="input-group">
<button class="btn ">
...
</button>
<button type="button"
class="btn dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown">
</button>
</div>

Example 1: In this example illustrates how to show segments with a dropdown menu on the left side of the text input.

Output:

👁 1

Example 2: In this example illustrates how to show segments with a dropdown menu on the right side of the text input.

Output:

👁 2

Reference:https://getbootstrap.com/docs/5.0/forms/input-group/#segmented-buttons

Comment

Explore