{% extends "partials/base.html" %} {% load static %} {% block title %}Buttons{% endblock title %} {% block extra_css %} {% endblock extra_css %} {% block pagetitle %} {% include "partials/page-title.html" with pagetitle="Base UI" title="Buttons" %} {% endblock pagetitle %} {% block content %}
Use the button classes on an <a>
,
<button>
, or <input>
element.
Use a classes .btn-outline-**
to quickly create a bordered
buttons.
Add .rounded-pill
to default button to get rounded corners.
Use a classes .btn-outline-**
to quickly create a bordered
buttons.
Use a classes .btn-soft-**
to quickly create a soft background
color buttons.
Use a classes .btn-soft-**
.rounded-pill
to
quickly create a soft background color buttons with rounded.
Add .btn-lg
, .btn-sm
for additional sizes.
Add the disabled
attribute to <button>
buttons.
Icon only button.
Create block level buttons by adding class .d-grid
to parent div.
Wrap a series of buttons with .btn
in .btn-group
.
Add data-bs-toggle="button"
to toggle a button’s
active
state. If you’re pre-toggling a button, you must manually add the
.active
class and aria-pressed="true"
to ensure
that it is conveyed appropriately to assistive technologies.
The .btn
classes are designed to be used with the
<button>
element. However, you can also use these classes on
<a>
or <input>
elements (though some browsers may
apply a slightly different rendering).