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="fa fa-heart"></i> With Icon
</button>
<button class="btn btn-primary btn-just-icon">
  <i class="fa fa-heart"></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

Bordered

Links

<h3> <small> Default </small> </h3>

<button class="btn btn-just-icon btn-twitter">
	<i class="fa fa-twitter" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-facebook">
	<i class="fa fa-facebook" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-google">
	<i class="fa fa-google-plus" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-linkedin">
	<i class="fa fa-linkedin" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-pinterest">
	<i class="fa fa-pinterest-p" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-youtube">
	<i class="fa fa-youtube" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-tumblr">
	<i class="fa fa-tumblr" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-github">
	<i class="fa fa-github-alt" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-dribbble">
	<i class="fa fa-dribbble" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-reddit">
	<i class="fa fa-reddit-alien" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-instagram">
	<i class="fa fa-instagram" aria-hidden="true"></i>
</button>

<h3> <small> Bordered </small> </h3>

<button class="btn btn-just-icon btn-border btn-twitter">
	<i class="fa fa-twitter" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-facebook">
	<i class="fa fa-facebook" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-google">
	<i class="fa fa-google-plus" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-linkedin">
	<i class="fa fa-linkedin" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-pinterest">
	<i class="fa fa-pinterest-p" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-youtube">
	<i class="fa fa-youtube" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-tumblr">
	<i class="fa fa-tumblr" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-github">
	<i class="fa fa-github-alt" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-dribbble">
	<i class="fa fa-dribbble" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-reddit">
	<i class="fa fa-reddit-alien" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-border btn-instagram">
	<i class="fa fa-instagram" aria-hidden="true"></i>
</button>

<h3><small> Links </small></h3>

<button class="btn btn-just-icon btn-link btn-twitter">
	<i class="fa fa-twitter" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-facebook">
	<i class="fa fa-facebook" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-google">
	<i class="fa fa-google-plus" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-linkedin">
	<i class="fa fa-linkedin" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-pinterest">
	<i class="fa fa-pinterest-p" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-youtube">
	<i class="fa fa-youtube" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-tumblr">
	<i class="fa fa-tumblr" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-github">
	<i class="fa fa-github-alt" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-dribbble">
	<i class="fa fa-dribbble" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-reddit">
	<i class="fa fa-reddit-alien" aria-hidden="true"></i>
</button>
<button class="btn btn-just-icon btn-link btn-instagram">
	<i class="fa fa-instagram" aria-hidden="true"></i>
</button>

Animated Buttons

<button class="btn btn-rotate btn-round">
	<i class="nc-icon nc-settings-gear-65"></i>
	Settings
</button>
<button class="btn btn-magnify btn-round">
	<i class="nc-icon nc-zoom-split"></i>
	Search
</button>
<button class="btn btn-move-left btn-round">
	<i class="nc-icon nc-minimal-left"></i>
	Back
</button>
<button class="btn btn-move-right btn-round">
	Next
	<i class="nc-icon nc-minimal-right"></i>
</button>

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 the disabled 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="javascript:;" class="btn btn-primary btn-lg disabled" role="button" aria-disabled="true">Primary link</a>
<a href="javascript:;" class="btn btn-secondary btn-lg disabled" role="button" aria-disabled="true">Link</a>

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