ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 5 Button Group size
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Bootstrap 5 Button Group size</title> </head> <body> <div class="container"> <h1 class="text-center">Bootstrap 5 Button Group size</h1> <p class="text-center"> In this example, you will learn how to control the size of the button in the button group. To control bootstrap 4 button group size, use .btn-group-* classes. </p> <h2>Large Button Group</h2> <div class="btn-group btn-group-lg " role="group" aria-label="Basic example"> <button type="button" class="btn btn-secondary">Left</button> <button type="button" class="btn btn-secondary">Middle</button> <button type="button" class="btn btn-secondary">Right</button> </div> <h2>Small Button Group</h2> <div class="btn-group btn-group-sm " role="group" aria-label="Basic example"> <a href="#" class="btn btn-info" role="button">Link Button</a> <button type="button" class="btn btn-info">Button</button> <input type="button" class="btn btn-info" value="Input Button"> <input type="submit" class="btn btn-info" value="Submit Button"> </div> </div><!--/container--> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
Output :
Running