Home

btnsuccess

btn-success is a contextual CSS class used in the Bootstrap framework to style a button or button-like element with a green color to indicate a successful action. It is part of Bootstrap’s set of contextual button styles and is typically used alongside the base btn class, as in class="btn btn-success". The class applies a green background, a slightly darker green border, and white text, and is commonly used for actions such as Save, Submit, or Done, signaling a positive outcome.

Usage examples include a button element or a link used as a button. For example: <button type="button"

In Bootstrap 4 and 3, a full-width variant could be achieved with btn-block, while in Bootstrap 5

Accessibility considerations include ensuring adequate color contrast and not relying on color alone to convey meaning;

Notes: btn-success requires Bootstrap CSS to have an effect; without the framework, it will not apply the

---

class="btn
btn-success">Success</button>
or
<a
class="btn
btn-success"
href="#"
role="button">Success</a>.
The
class
also
supports
variations
found
in
Bootstrap,
such
as
btn-outline-success
for
a
green-outline
style,
and
standard
sizing
with
btn-lg
or
btn-sm.
the
btn-block
class
was
removed
and
full-width
behavior
is
typically
achieved
using
the
w-100
utility
or
other
layout
utilities.
combine
the
style
with
clear
text
labels
and,
if
appropriate,
ARIA
attributes.
intended
styling
and
may
be
overridden
by
other
styles.