Skip to main content

Buttons in Bootstrap 5

Bootstrap Buttons

Bootstrap provides a variety of button styles and options that can be easily customized to fit your website's design.

Here are some of the most commonly used classes for creating buttons:

  • btn: This class is used to create a basic button.

  • btn-primary, btn-secondary, btn-success, btn-danger, btn-warning, btn-info, and btn-light: These classes are used to add different colors to the button.

  • btn-lg, btn-sm, and btn-block: These classes are used to change the size and display of the button. btn-lg creates a larger button, btn-sm creates a smaller button, and btn-block creates a block-level button that spans the full width of its parent.

  • btn-outline-primary, btn-outline-secondary, btn-outline-success, btn-outline-danger, btn-outline-warning, btn-outline-info, and btn-outline-light: These classes are used to create an outline button with a colored border.

  • btn-link: This class is used to create a button that looks like a link.

As an example:

Editor

Loading...