Buttons

Buttons can be created by adding .btn class to a link or button element. By it's self the .btn class does not do much besides create some basic structure. To apply styles to the button we need to add an extender class like .btn-default or .btn-primary

Links as Buttons

Buttons as Buttons

Source Code:

Links as Buttons

Buttons as Buttons


For webmasters needing to add application behavior there are a few additional classes that might be useful. .active will make buttons appear pressed.

Links as Active Buttons

Buttons as Active Buttons

Source Code:

Links as Active Buttons

Buttons as Active Buttons


Add the .disabled class to make buttons appear unclickable by fading them back 50%. Add the disabled="disabled" attribute to <button> buttons instead of the class.

Links as Disabled Buttons

NOTE: This class will only change the <a>'s appearance, not its functionality. Use custom JavaScript to disable links.

Buttons as Disabled Buttons

NOTE: If you add the disabled attribute to a <button>, Internet Explorer 9 and below will render text gray with a not so pretty text-shadow that cannot be fixed.

Source Code:

Links as Disabled Buttons

NOTE: This class will only change the <a>'s appearance, not its functionality. Use custom JavaScript to disable links.

Buttons as Disabled Buttons

NOTE: If you add the disabled attribute to a <button>, Internet Explorer 9 and below will render text gray with a not so pretty text-shadow that cannot be fixed.


Other Button Variations

Outline buttons:

Use .btn-outline-light for outline button on dark backgrounds. Use .rounded-0 class to remove rounded corners.

Add a class .rounded-50 to make pill buttons.

Source Code:

Outline buttons:

Use .btn-outline-light for outline button on dark backgrounds. Use .rounded-0 class to remove rounded corners.

Add a class .rounded-50 to make pill buttons.


Add classes .btn-next, .btn-prev to add previous and next icons hover effect. Also button's content needs to be inclosed in the span tag.

Source Code: