2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								title: Buttons
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								---
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								## Buttons
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The Bootstrap framework provides you with various styling options for buttons. These styles help you provide a visual representation to the user of what the button may do.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#### How To Use:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								To use bootstrap buttons you follow the same steps that you would to create a button in HTML except you also apply the applicable CSS class to the button. A code example has been provided below.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								**Code Example:**
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-primary">Primary</button>` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								You can also use bootstrap buttons with the `<a>`  and `<input>`  elements as shown in the examples below.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`<a class="btn btn-primary" href="#" role="button">This button is a link</a>` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`<input class="btn btn-primary" type="submit" value="Submit">` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#### Bootstrap Button Class List:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This is a list of the CSS classes that bootstrap provides for buttons.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn`  Bootstrap's basic button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn">Basic</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-default`  Bootstrap's default button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-default">Default</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-primary`  Bootstrap's primary button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-primary">Primary</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-success`  Bootstrap's success button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-success">Success</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-info`  Bootstrap's info button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-info">Info</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-warning`  Bootstrap's warning button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-warning">Warning</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-danger`  Bootstrap's danger button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-danger">Danger</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-link`  Bootstrap's link button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-link">Link</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-light`  Bootstrap's light button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-light">Light</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#### Bootstrap Button Sizes:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This is a list of the CSS classes for different size of the buttons.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-lg`  Bootstrap's large button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-lg">Large</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-01 03:44:55 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-md`  This is bootstrap's medium button.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-md">Medium</button>` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-sm`  Bootstrap's small button.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-sm">Small</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`.btn-xs`  This is bootstrap's extra small button.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-23 07:27:34 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-xs">Extra Small</button>` 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-31 17:10:20 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								`.btn-block`  This is bootstrap's full width button.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< button  type = "button"  class = "btn btn-block" > Block< / button > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#### Bootstrap Outlined Buttons:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								It is possible to also have outlined buttons rather than fully colored in ones. This is achieved by placing the mid fix `outline`  between the button class you want. A sample usage would be as follows:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								`<button type="button" class="btn btn-outline-primary">Primary</button>` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-25 10:38:56 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Outlined buttons are a part of Bootstrap since version 4, please be sure that you are using the right version if you are unable to get them to work.
							 
						 
					
						
							
								
									
										
										
										
											2018-10-12 15:37:13 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								_Note: Do not include the dot in the HTML Class Attribute, referring to the classes with a dot is only used when adjusting the classes in CSS._
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#### More Information: 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*  < a  href = 'https://getbootstrap.com/docs/4.0/components/buttons/'  target = '_blank'  rel = 'nofollow' > Bootstrap Buttons documentation</ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*  < a  href = 'http://getbootstrap.com/docs/4.0/components/button-group/'  target = '_blank'  rel = 'nofollow' > Bootstrap Button Group documentation</ a > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								*  [Bootstrap Get Started ](/articles/bootstrap/bootstrap-get-started )