@extends('layouts.master') @section('title') @lang('translation.Buttons') @endsection @section('content') @component('components.breadcrumb') @slot('li_1') UI Elements @endslot @slot('title') Buttons @endslot @endcomponent
Bootstrap includes six predefined button styles, each serving its own semantic purpose.
Replace the default modifier classes with the .btn-outline-*
ones to remove all background images and colors
on any button.
Use class .btn-soft*
for soft buttons.
Use class .btn-rounded
for button round border.
Add icon in button.
Add .btn-lg
or .btn-sm
for additional sizes.
Add .w-xs
, .w-sm
, .w-md
and
.w-lg
class for additional buttons width.
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).
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 the
<button>
.
Create block level buttons—those that
span the full width of a parent—by adding .btn-block
.
Create button-like checkboxes and radio buttons by using .btn
styles rather than .form-check-label
on the <label>
elements.
Combine sets of button groups into button toolbars for more complex components. Use utility classes as needed to space out groups, buttons, and more.
Instead of applying button sizing
classes to every button in a group, just add .btn-group-*
to
each .btn-group
, including each one
when nesting multiple groups.
Make a set of buttons appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.
Bootstrap has a base .btn
class that sets up basic styles such
as padding and content alignment. By default, .btn
controls have a transparent border
and background color, and lack any explicit focus and hover styles.
You can even roll your own custom sizing with CSS variables:
Click directly on the link below to see the focus ring in action, or into the example below and then press Tab.
Modify the --bs-focus-ring-*
CSS variables as needed to change
the default appearance.
In addition to .focus-ring
, we have several
.focus-ring-*
utilities to modify the helper class defaults. Modify the color with any
of our theme colors.
Note that the light and dark variants may not be visible on all background colors given current
color mode support.