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, subtle animation on hovering, or charming waves effect triggered by clicking.

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 -->
<Button color="primary">Primary</Button>

<!-- Default button -->

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Gradient buttons MDB Pro component

<Button rounded gradient="peach">Peach</Button>
<Button rounded gradient="purple">Purple</Button>
<Button rounded gradient="blue">Blue</Button>
<Button rounded gradient="aqua">Aqua</Button>

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.

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

Rounded buttons MDB Pro component

<Button color="primary" rounded>Primary</Button>
<Button rounded>Default</Button>
<Button color="secondary" rounded>Secondary</Button>
<Button color="success" rounded>Success</Button>
<Button color="info" rounded>Info</Button>
<Button color="warning" rounded>Warning</Button>
<Button color="danger" rounded>Danger</Button>

Rounded outline buttons MDB Pro component

<Button color="primary" rounded outline>Primary</Button>
<Button rounded outline>Default</Button>
<Button color="secondary" rounded outline>Secondary</Button>
<Button color="success" rounded outline>Success</Button>
<Button color="info" rounded outline>Info</Button>
<Button color="warning" rounded outline>Warning</Button>
<Button color="danger" rounded outline>Danger</Button>

Floating buttons MDB Pro component

<Button tag="a" floating gradient="purple"><Fa icon="bolt" /></Button>
<Button tag="a" floating gradient="peach"><Fa icon="leaf" /></Button>
<Button tag="a" floating gradient="blue"><Fa icon="star" /></Button>

See the full list of available icons and colors for your buttons.

Fixed buttons MDB Pro component

See the live example of fixed button in the bottom right corner of this page.

class ButtonPage extends React.Component {
 constructor(props) {
    this.state = {
      buttonStyle: {transform: 'scaleY(0.4) scaleX(0.4) translateY(40px) translateX(0)', opacity: '0' }
    this.onHover = this.onHover.bind(this);
    this.onMouseLeave = this.onMouseLeave.bind(this);

  onHover() {
    this.setState({buttonStyle: {transform: 'scaleY(1) scaleX(1) translateY(0) translateX(0)', opacity: '1' }})

  onMouseLeave() {
    this.setState({buttonStyle: {transform: 'scaleY(0.4) scaleX(0.4) translateY(40px) translateX(0)', opacity: '0' }})

  render() {
        <ButtonFixed onMouseEnter={this.onHover} onMouseLeave={this.onMouseLeave} floating size="lg" color="red" icon="pencil" style={{bottom: '45px', right: '24px'}}>
            <ButtonFixedItem buttonStyle={this.state.buttonStyle} color="red" icon="star"></ButtonFixedItem>
            <ButtonFixedItem buttonStyle={this.state.buttonStyle} color="yellow" icon="user"></ButtonFixedItem>
            <ButtonFixedItem buttonStyle={this.state.buttonStyle} color="green" icon="envelope"></ButtonFixedItem>
            <ButtonFixedItem buttonStyle={this.state.buttonStyle} color="blue" icon="shopping-cart"></ButtonFixedItem>

"Back to the top" button

"Back to the top" button is very useful with the long pages, especially on the mobile devices.

Click the button below to see the live example.

Live example

Usage: To make it work, you have to set an ID #top-section to any element on the top of the page.

<ButtonFixed topSection="#top-section" floating size="lg" color="red" icon="arrow-up" style={{bottom: '45px', right: '24px'}}></ButtonFixed>

Flat button MDB Pro component

<Button flat>Click me</Button>

Buttons with icons

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

<Button color="primary"><Fa icon="magic" className="mr-1"/> Left</Button>
<Button >Right <Fa icon="magic" className="ml-1"/></Button>

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.

<Button color="primary" href="#">Link</Button>
<Button color="primary" type="submit">Button</Button>


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

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

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

<Button block >Block level button</Button>
<Button block color="primary">Block level button</Button>

Button states

Active state

Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. There’s no need to add a class to <button>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
<Button active size="lg" color="primary">Button active</Button>
<Button active size="lg" href="#" >Button active</Button>

Disabled state

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

<Button disabled size="lg" color="primary">Primary button</Button>
<Button disabled size="lg" >Button</Button>
Primary link Link
<Button disabled size="lg" color="primary" href="#" >Primary link</Button>
<Button disabled size="lg" color="secondary" href="#" >Link</Button>

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.