Sign in

Sign up

Vue Bootstrap buttons

Use MDB’s custom button styles for actions in forms, dialogs, and more. Includes support for a handful of contextual variations, sizes, states, and more.

All the visually attractive and highly functional buttons we provided you with are fully customizable and easily adjustable to your needs.

Each of them contains characteristic Material Design elements, such as shadows, living colors or subtle animation on hovering.

Basic buttons

MDB includes 7 predefined button styles, each serving its own semantic purpose.

<!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
<btn color="primary">Primary</btn>

<!-- Default button -->
<btn color="default">Default</btn>

<!-- Secondary button -->
<btn color="secondary">Secondary</btn>

<!-- Indicates a successful or positive action -->
<btn color="success">Success</btn>

<!-- Contextual button for informational alert messages -->
<btn color="info">Info</btn>

<!-- Indicates caution should be taken with this action -->
<btn color="warning">Warning</btn>

<!-- Indicates a dangerous or potentially negative action -->
<btn color="danger">Danger</btn>

Conveying meaning to assistive technologies

Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the .sr-only class.

Additional buttons

<btn color="elegant">Elegant</btn>

<btn color="unique">Unique</btn>

<btn color="pink">Pink</btn>

<btn color="purple">Purple</btn>

<btn color="deep-purple">Deep-purple</btn>

<btn color="indigo">Indigo</btn>

<!--Light blue-->
<btn color="light-blue">Light blue</btn>

<btn color="cyan">Cyan</btn>

<btn color="dark-green">Dark-green</btn>

<btn color="light-green">Light-green</btn>

<btn color="yellow">Yellow</btn>

<btn color="amber">Amber</btn>

<btn color="deep-orange">Deep-orange</btn>

<btn color="brown">Brown</btn>

<btn color="blue-grey">Blue-grey</btn>

<btn color="mdb-color">MDB</btn>

Outline buttons

In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the outline ones to remove all background images and colors on any button.

<btn outline="primary">Primary</btn>
<btn outline="default">Default</btn>
<btn outline="secondary">Secondary</btn>
<btn outline="success">Success</btn>
<btn outline="info">Info</btn>
<btn outline="warning">Warning</btn>
<btn outline="danger">Danger</btn>

Buttons with icons

Note: To set the desired distance between icon and text use spacing utilities (for example .ml-1, .mr-2).

<btn color="primary"><fa icon="magic" class="mr-1"/> Left</btn>
<btn color="default">Right <fa icon="magic" class="ml-1"/></btn>

See the full list of available icons for your buttons.

Button tags

The .btn classes are designed to be used with the <button> element. However, you can also use these classes on <a> elements (though some browsers may apply a slightly different rendering).

When using button classes on <a> elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a role="button" to appropriately convey their purpose to assistive technologies such as screen readers.

<btn tag="a" role="button" color="primary" href="#">Link</btn>
<btn color="primary" type="submit">Button</btn>


Fancy larger or smaller buttons? Add size="lg" or size="sm" for additional sizes.

<btn size="lg" color="primary">Large button</btn>
<btn size="lg" color="default">Large button</btn>
<btn size="sm" color="primary">Small button</btn>
<btn size="sm" color="default">Small button</btn>

Create block level buttons—those that span the full width of a parent—by adding block.

<btn block color="default">Block level button</btn>
<btn block color="primary">Block level button</btn>

Button states

Active state

btns will appear pressed (with a darker background, darker border, and inset shadow) when active. There’s no need to add a class to <btn>s as they use a pseudo-class. However, you can still force the same active appearance with active should you need to replicate the state programmatically.

Link active
<btn active size="lg" color="primary">btn active</btn>
<btn tag="a" role="button" active size="lg" href="#">btn active</btn>

Disabled state

Make buttons look inactive by adding the disabled boolean attribute to any <btn> element.

<btn disabled size="lg" color="primary">Primary button</btn>
<btn disabled size="lg" color="default">Button</btn>

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.