Buttons
Use Bootstrap's custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.
Examples
Bootstrap includes several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control.
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-default">Default</button>
<button type="button" class="btn btn-neutral">Neutral</button>
Style buttons
<button class="btn btn-primary">Default</button>
<button class="btn btn-primary btn-round">Round</button>
<button class="btn btn-primary btn-round" type="button">
<i class="now-ui-icons ui-2_favourite-28"></i> With Icon
</button>
<button class="btn btn-primary btn-icon btn-round">
<i class="now-ui-icons ui-2_favourite-28"></i>
</button>
<button class="btn btn-primary btn-link">Simple</button>
Sizes
Fancy larger or smaller buttons? Add .btn-lg
or .btn-sm
for additional sizes.
<button class="btn btn-primary btn-sm">Small</button>
<button class="btn btn-primary">Regular</button>
<button class="btn btn-primary btn-lg">Large</button>
Social Buttons
Default
Neutral
<div class="row">
<div class="col-md-4 col-sm-5">
<p class="category">Default</p>
<button class="btn btn-twitter">
<i class="fab fa-twitter"></i> Connect with Twitter
</button>
</div>
<div class="col-md-1 col-sm-1">
<p class="category"> </p>
<button class="btn btn-icon btn-twitter">
<i class="fab fa-twitter"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<p class="category"> </p>
<button class="btn btn-icon btn-round btn-twitter">
<i class="fab fa-twitter"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<p class="category">Neutral</p>
<button class="btn btn-icon btn-neutral btn-twitter">
<i class="fab fa-twitter"></i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<p class="category"> </p>
<button class="btn btn-neutral btn-twitter">
<i class="fab fa-twitter"></i> Connect with Twitter
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-facebook">
<i class="fab fa-facebook-square"></i> Share · 2.2k
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-facebook">
<i class="fab fa-facebook"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-facebook">
<i class="fab fa-facebook"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-facebook">
<i class="fab fa-facebook-square"> </i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-facebook">
<i class="fab fa-facebook-square"></i> Share · 2.2k
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-google">
<i class="fab fa-google"></i> Share on Google+
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-google">
<i class="fab fa-google"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-google">
<i class="fab fa-google"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-google">
<i class="fab fa-google"> </i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-google">
<i class="fab fa-google"></i> Share on Google+
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-linkedin">
<i class="fab fa-linkedin"></i> Connect with Linkedin
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-linkedin">
<i class="fab fa-linkedin"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-linkedin">
<i class="fab fa-linkedin"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-linkedin">
<i class="fab fa-linkedin"></i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-linkedin">
<i class="fab fa-linkedin"></i> Connect with Linkedin
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-pinterest">
<i class="fab fa-pinterest"></i> Pint it · 212
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-pinterest">
<i class="fab fa-pinterest"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-pinterest">
<i class="fab fa-pinterest"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-pinterest">
<i class="fab fa-pinterest"></i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-pinterest">
<i class="fab fa-pinterest"></i> Pint it · 212
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-youtube">
<i class="fab fa-youtube"></i> View on Youtube
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-youtube">
<i class="fab fa-youtube"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-youtube">
<i class="fab fa-youtube"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-youtube">
<i class="fab fa-youtube"> </i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-youtube">
<i class="fab fa-youtube"></i> View on Youtube
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-tumblr">
<i class="fab fa-tumblr-square"></i> Repost
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-tumblr">
<i class="fab fa-tumblr"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-tumblr">
<i class="fab fa-tumblr"> </i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-tumblr">
<i class="fab fa-tumblr-square"> </i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-tumblr">
<i class="fab fa-tumblr-square"></i> Repost
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-github">
<i class="fab fa-github"></i> Connect with Github
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-github">
<i class="fab fa-github"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-github">
<i class="fab fa-github"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-github">
<i class="fab fa-github"></i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-github">
<i class="fab fa-github"></i> Connect with Github
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-behance">
<i class="fab fa-behance-square"></i> Follow us
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-behance">
<i class="fab fa-behance"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-behance">
<i class="fab fa-behance"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-behance">
<i class="fab fa-behance"></i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-behance">
<i class="fab fa-behance-square"></i> Follow us
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-dribbble">
<i class="fab fa-dribbble"></i> Find us on Dribble
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-dribbble">
<i class="fab fa-dribbble"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-dribbble">
<i class="fab fa-dribbble"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-dribbble">
<i class="fab fa-dribbble"></i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-dribbble">
<i class="fab fa-dribbble"></i> Find us on Dribble
</button>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-5">
<button class="btn btn-reddit">
<i class="fab fa-reddit"></i> Repost · 232
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-reddit">
<i class="fab fa-reddit"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-round btn-reddit">
<i class="fab fa-reddit"></i>
</button>
</div>
<div class="col-md-1 col-sm-1">
<button class="btn btn-icon btn-neutral btn-reddit">
<i class="fab fa-reddit"></i>
</button>
</div>
<div class="col-md-3 col-sm-4">
<button class="btn btn-neutral btn-reddit">
<i class="fab fa-reddit"></i> Repost · 232
</button>
</div>
</div>
Disabled state
Make buttons look inactive by adding the disabled
boolean attribute to any <button>
element.
<button type="button" class="btn btn-lg btn-primary" disabled>Primary button</button>
<button type="button" class="btn btn-secondary btn-lg" disabled>Button</button>
Disabled buttons using the <a>
element behave a bit different:
<a>
s don’t support thedisabled
attribute, so you must add the.disabled
class to make it visually appear disabled.- Some future-friendly styles are included to disable all
pointer-events
on anchor buttons. In browsers which support that property, you won’t see the disabled cursor at all. - Disabled buttons should include the
aria-disabled="true"
attribute to indicate the state of the element to assistive technologies.
<a href="#" class="btn btn-primary btn-lg disabled" role="button" aria-disabled="true">Primary link</a>
<a href="#" class="btn btn-secondary btn-lg disabled" role="button" aria-disabled="true">Link</a>
Link functionality caveat
The .disabled
class uses pointer-events: none
to try to disable the link functionality of <a>
s, but that CSS property is not yet standardized. In addition, even in browsers that do support pointer-events: none
, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, add a tabindex="-1"
attribute on these links (to prevent them from receiving keyboard focus) and use custom JavaScript to disable their functionality.
If you want to see more examples and properties please check the official Bootstrap Documentation