Angular Bootstrap Flipping Cards

Angular Flipping Cards - Bootstrap 4 & Material Design

Note: This documentation is for an older version of Bootstrap (v.4). A newer version is available for Bootstrap 5. We recommend migrating to the latest version of our product - Material Design for Bootstrap 5.
Go to docs v.5

Angular Bootstrap flipping card is a card animation that gives an element effect of flipping to the other side upon the interaction.


Basic examples MDB Pro component

Image with a photo of clouds.
Sample avatar image.

Marie Johnson

Web developer

Click here to rotate

About me


Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat tenetur odio suscipit non commodi vel eius veniam maxime?


Click here to rotate back
        
            
            <!--Rotating card-->
            <div class="col-md-4">
              <mdb-flipping-card #cards>
                <!--Front Side-->
                <div class="face front tp-box_side tp-box_front">
                  <!-- Image-->
                  <div class="card-up">
                    <img src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/4-col/img%20%2859%29.webp" class="img-fluid">
                  </div>
                  <!--Avatar-->
                  <div class="avatar">
                    <img src="https://mdbootstrap.com/img/Photos/Avatars/img%20%289%29.webp" class="rounded-circle img-responsive">
                  </div>
                  <!--Content-->
                  <div class="card-body">
                    <h4>Jonathan Doe</h4>
                    <p>Web developer</p>
                    <!--Triggering button-->
                    <a class="rotate-btn" data-card="card-1" (click)="cards.toggle()">
                      <mdb-icon fas icon="redo"></mdb-icon> Click here to rotate</a>
                  </div>
                </div>
                <!--/.Front Side-->
                <!--Back Side-->
                <div class="back tp-box_side tp-box_back">
                  <!--Content-->
                  <h4>About me</h4>
                  <hr>
                  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem
                    amet repellat,
                    dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium
                    quaerat?</p>
                  <hr>
                  <!--Social Icons-->
                  <ul class="list-inline">
                    <li class="list-inline-item">
                      <a class="icons-sm fb-ic">
                        <mdb-icon fab icon="facebook-f"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm tw-ic">
                        <mdb-icon fab icon="twitter"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm gplus-ic">
                        <mdb-icon fab icon="google-plus"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm li-ic">
                        <mdb-icon fab icon="linkedin-in"></mdb-icon>
                      </a>
                    </li>
                  </ul>
                  <!--Triggering button-->
                  <a class="rotate-btn" data-card="card-1" (click)="cards.toggle()">
                    <mdb-icon fas icon="undo"></mdb-icon> Click here to rotate back</a>
                </div>
                <!--/.Back Side-->
              </mdb-flipping-card>
            </div>
            <!--/.Rotating card-->
          
        
    

Rotating card with button MDB Pro component

Click on the button to launch the animation.

Card title

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat tenetur odio suscipit non commodi vel eius veniam maxime.

Read more

Social shares


Join our community

        
            
            <!--Rotating card-->
            <div class="col-md-4">
              <mdb-flipping-card #card>
                <!--Front Side-->
                <div class="face front card tp-box_side tp-box_front">
                  <!-- Image-->
                  <div class="card-up">
                    <div class="view overlay hm-white-slight waves-light" mdbWavesEffect>
                      <img src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/4-col/img%20%28110%29.webp" class="img-fluid"
                        alt="">
                    </div>
                  </div>
                  <!--/.Image-->
                  <!--Content-->
                  <div class="content">
                    <a class="rotate-btn" data-card="card-2" (click)="card.toggle()">
                      <mdb-icon fas icon="share-alt"></mdb-icon>
                    </a>
                    <h4>Card title</h4>
                    <hr>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat tenetur odio suscipit non commodi
                      vel eius
                      veniam maxime.</p>
                    <a class="link-text">
                      <h5>Read more
                        <mdb-icon fas icon="chevron-right"></mdb-icon>
                      </h5>
                    </a>
                  </div>
                  <!--/.Content-->
                </div>
                <!--/.Front Side-->
                <!--Back Side-->
                <div class="face back tp-box_side tp-box_back">
                  <!--Title-->
                  <h4 class="card-title">Social shares
                    <mdb-icon fas icon="times" class="rotate-btn" (click)="card.toggle()"></mdb-icon>
                  </h4>
                  <hr>
                  <!--Social Icons-->
                  <ul class="list-inline">
                    <li class="list-inline-item">
                      <a class="icons-sm fb-ic">
                        <mdb-icon fab icon="facebook-f"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm tw-ic">
                        <mdb-icon fab icon="twitter"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm gplus-ic">
                        <mdb-icon fab icon="google-plus"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm li-ic">
                        <mdb-icon fab icon="linkedin-in"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" size="sm" color="git" class="waves-light" mdbWavesEffect>
                        <mdb-icon fab icon="github"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" size="sm" color="pin" class="waves-light" mdbWavesEffect>
                        <mdb-icon fab icon="pinterest"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" size="sm" color="ins" class="waves-light" mdbWavesEffect>
                        <mdb-icon fab icon="instagram"> </mdb-icon>
                      </a>
                    </li>
                  </ul>
                  <h5>Join our community</h5>
                  <hr>
                  <!--Social Icons-->
                  <ul class="list-inline">
                    <li class="list-inline-item">
                      <a class="icons-sm fb-ic">
                        <mdb-icon fab icon="facebook-f"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm tw-ic">
                        <mdb-icon fab icon="twitter"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm gplus-ic">
                        <mdb-icon fab icon="google-plus"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm li-ic">
                        <mdb-icon fab icon="linkedin-in"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn color="ins" class="waves-light" mdbWavesEffect>
                        <mdb-icon fab icon="instagram"> </mdb-icon>
                      </a>
                    </li>
                  </ul>
                </div>
                <!--/.Back Side-->
              </mdb-flipping-card>
            </div>
            <!--/.Rotating card-->
          
        
    

Using few cards of same type MDB Pro component

In order to use few cards of same type, it is necessary to provide unique identifiers for each card, and for each of it's toggle() methods.

        
            
            <div class="row">
              <!--Rotating card-->
              <div class="col-md-4">
                <mdb-flipping-card #cards>
                  <!--Front Side-->
                  <div class="face front tp-box_side tp-box_front">
                    <!-- Image-->
                    <div class="card-up">
                      <img src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/4-col/img%20%2859%29.webp" class="img-fluid">
                    </div>
                    <!--Avatar-->
                    <div class="avatar">
                      <img src="https://mdbootstrap.com/img/Photos/Avatars/img%20%289%29.webp" class="rounded-circle img-responsive">
                    </div>
                    <!--Content-->
                    <div class="card-body">
                      <h4>Jonathan Doe</h4>
                      <p>Web developer</p>
                      <!--Triggering button-->
                      <a class="rotate-btn" data-card="card-1" (click)="cards.toggle()">
                        <mdb-icon fas icon="redo"></mdb-icon> Click here to rotate</a>
                    </div>
                  </div>
                  <!--/.Front Side-->
                  <!--Back Side-->
                  <div class="back tp-box_side tp-box_back">
                    <!--Content-->
                    <h4>About me</h4>
                    <hr>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem
                      amet repellat,
                      dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium
                      quaerat?</p>
                    <hr>
                    <!--Social Icons-->
                    <ul class="list-inline">
                      <li class="list-inline-item">
                        <a class="icons-sm fb-ic">
                          <mdb-icon fab icon="facebook-f"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm tw-ic">
                          <mdb-icon fab icon="twitter"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm gplus-ic">
                          <mdb-icon fab icon="google-plus"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm li-ic">
                          <mdb-icon fab icon="linkedin-in"></mdb-icon>
                        </a>
                      </li>
                    </ul>
                    <!--Triggering button-->
                    <a class="rotate-btn" data-card="card-1" (click)="cards.toggle()">
                      <mdb-icon fas icon="undo"></mdb-icon> Click here to rotate back</a>
                  </div>
                  <!--/.Back Side-->
                </mdb-flipping-card>
              </div>
              <!--/.Rotating card-->
              <!--Rotating card-->
              <div class="col-md-4">
                <mdb-flipping-card #cards2>
                  <!--Front Side-->
                  <div class="face front tp-box_side tp-box_front">
                    <!-- Image-->
                    <div class="card-up">
                      <img src="https://mdbootstrap.com/img/Photos/Horizontal/Nature/4-col/img%20(41).webp" class="img-fluid">
                    </div>
                    <!--Avatar-->
                    <div class="avatar">
                      <img src="https://mdbootstrap.com/img/Photos/Avatars/img%20(11).webp" class="rounded-circle img-responsive">
                    </div>
                    <!--Content-->
                    <div class="card-body">
                      <h4>Marie Johnson</h4>
                      <p>Web developer</p>
                      <!--Triggering button-->
                      <a class="rotate-btn" data-card="card-1" (click)="cards2.toggle()">
                        <mdb-icon fas icon="redo"></mdb-icon> Click here to rotate</a>
                    </div>
                  </div>
                  <!--/.Front Side-->
                  <!--Back Side-->
                  <div class="back tp-box_side tp-box_back">
                    <!--Content-->
                    <h4>About me</h4>
                    <hr>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem
                      amet repellat,
                      dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium
                      quaerat?</p>
                    <hr>
                    <!--Social Icons-->
                    <ul class="list-inline">
                      <li class="list-inline-item">
                        <a class="icons-sm fb-ic">
                          <mdb-icon fab icon="facebook-f"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm tw-ic">
                          <mdb-icon fab icon="twitter"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm gplus-ic">
                          <mdb-icon fab icon="google-plus"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm li-ic">
                          <mdb-icon fab icon="linkedin-in"></mdb-icon>
                        </a>
                      </li>
                    </ul>
                    <!--Triggering button-->
                    <a class="rotate-btn" data-card="card-1" (click)="cards2.toggle()">
                      <mdb-icon fas icon="undo"></mdb-icon> Click here to rotate back</a>
                  </div>
                  <!--/.Back Side-->
                </mdb-flipping-card>
              </div>
              <!--/.Rotating card-->
              <!--Rotating card-->
              <div class="col-md-4">
                <mdb-flipping-card #cards3>
                  <!--Front Side-->
                  <div class="face front tp-box_side tp-box_front">
                    <!-- Image-->
                    <div class="card-up">
                      <img src="https://mdbootstrap.com/img/Photos/Others/photo7.webp" class="img-fluid">
                    </div>
                    <!--Avatar-->
                    <div class="avatar">
                      <img src="https://mdbootstrap.com/img/Photos/Avatars/img%20(20).webp" class="rounded-circle img-responsive">
                    </div>
                    <!--Content-->
                    <div class="card-body">
                      <h4>Amy Kill</h4>
                      <p>Content Specialist</p>
                      <!--Triggering button-->
                      <a class="rotate-btn" data-card="card-1" (click)="cards3.toggle()">
                        <mdb-icon fas icon="redo"></mdb-icon> Click here to rotate</a>
                    </div>
                  </div>
                  <!--/.Front Side-->
                  <!--Back Side-->
                  <div class="back tp-box_side tp-box_back">
                    <!--Content-->
                    <h4>About me</h4>
                    <hr>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem
                      amet repellat,
                      dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium
                      quaerat?</p>
                    <hr>
                    <!--Social Icons-->
                    <ul class="list-inline">
                      <li class="list-inline-item">
                        <a class="icons-sm fb-ic">
                          <mdb-icon fab icon="facebook-f"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm tw-ic">
                          <mdb-icon fab icon="twitter"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm gplus-ic">
                          <mdb-icon fab icon="google-plus"></mdb-icon>
                        </a>
                      </li>
                      <li class="list-inline-item">
                        <a class="icons-sm li-ic">
                          <mdb-icon fab icon="linkedin-in"></mdb-icon>
                        </a>
                      </li>
                    </ul>
                    <!--Triggering button-->
                    <a class="rotate-btn" data-card="card-1" (click)="cards3.toggle()">
                      <mdb-icon fas icon="undo"></mdb-icon> Click here to rotate back</a>
                  </div>
                  <!--/.Back Side-->
                </mdb-flipping-card>
              </div>
              <!--/.Rotating card-->
            </div>
          
        
    

Card Reveal MDB Pro component

Card Reveal can be used to reveal certain content. In this case, the .card-front and .card-reveal classes must be kept. Without them, animation will not work.

Click on the button to launch the animation.

Card title


Some quick example text to build on the card title and make up the bulk of the card's content.

Read more

Social shares


Join our community

        
            
            <mdb-card-reveal #cards>
              <!-- Card front -->
              <div class="card card-front">
                <!--Card image-->
                <div class="view overlay waves-light" mdbWavesEffect>
                  <img class="card-img-top" src="https://mdbootstrap.com/img/Photos/Others/photo11.webp" alt="Card image cap">
                  <a>
                    <div class="mask rgba-white-slight"></div>
                  </a>
                </div>
                <!--/.Card image-->
                <!--Card content-->
                <div class="card-body">
                  <!--Social shares button-->
                  <a class="activator mr-2">
                    <mdb-icon fas icon="share-alt" (click)="cards.toggle()"></mdb-icon>
                  </a>
                  <!--Title-->
                  <h4 class="card-title">Card title</h4>
                  <hr>
                  <!--Text-->
                  <p class="card-text">Some quick example text to build on the card title and make up the bulk of the
                    card's content.</p>
                  <a class="link-text">
                    <h5 class="waves-light" mdbWavesEffect>Read more
                      <mdb-icon fas icon="chevron-right" class="waves-light" mdbWavesEffect></mdb-icon>
                    </h5>
                  </a>
                </div>
                <!--/.Card content-->
              </div>
              <!--/.Card Front-->
              <!-- Card reveal -->
              <div class="card-reveal white">
                <!-- Content -->
                <div class="content text-center">
                  <h4 class="card-title font-weight-bold py-4">Social shares
                    <mdb-icon fas icon="times" class="text-muted" (click)="cards.toggle()"></mdb-icon>
                  </h4>
                  <hr>
                  <!-- Social Icons -->
                  <ul class="list-unstyled list-inline d-flex justify-content-center flex-wrap">
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" color="dribbble">
                        <mdb-icon fab icon="dribbble"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" color="slack">
                        <mdb-icon fab icon="slack"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" color="ins">
                        <mdb-icon fab icon="instagram"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" color="pin">
                        <mdb-icon fab icon="pinterest"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" color="tw">
                        <mdb-icon fab icon="twitter"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" color="gplus">
                        <mdb-icon fab icon="google-plus"> </mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a mdbBtn floating="true" color="git">
                        <mdb-icon fab icon="github"> </mdb-icon>
                      </a>
                    </li>
                  </ul>
                  <h5 class="font-weight-bold my-4">Join our community</h5>
                  <hr>
                  <!-- Social Icons -->
                  <ul class="list-unstyled list-inline d-flex justify-content-center flex-wrap mt-4">
                    <li class="list-inline-item">
                      <a class="icons-sm fb-ic">
                        <mdb-icon fab icon="facebook-f"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm tw-ic">
                        <mdb-icon fab icon="twitter"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm gplus-ic">
                        <mdb-icon fab icon="google-plus"></mdb-icon>
                      </a>
                    </li>
                    <li class="list-inline-item">
                      <a class="icons-sm li-ic">
                        <mdb-icon fab icon="linkedin-in"></mdb-icon>
                      </a>
                    </li>
                  </ul>
                </div>
              </div>
              <!-- Card reveal -->
            </mdb-card-reveal>
          
        
    

Angular Flipping Cards - API

In this section you will find informations about required modules and available inputs, outputs, methods and events of Angular Flipping Cards.


Modules used

In order to speed up your application, you can choose to import only the modules you actually need, instead of importing the entire MDB Angular library. Remember that importing the entire library, and immediately afterwards a specific module, is bad practice, and can cause application errors.

        
            
          import { CardsModule, WavesModule, ButtonsModule } from 'ng-uikit-pro-standard';
          import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
        
        
    

Components

CardRotatingComponent

Selector: mdb-card-rotating

Type: CardRotatingComponent

CardRevealComponent

Selector: mdb-card-reveal

Type: CardRevealComponent


Outputs

Name Type Description Example
animationEnd EventEmitter<null> Event fired on animation end (animationEnd)="onAnimationEnd()"
animationStart EventEmitter<null> Event fired on animation start (animationStart)="onAnimationStart()"

Methods

CardRotatingComponent
Name Description
toggle() Toggle the flipping card animation.
CardRevealComponent
Name Description
toggle() Toggle the card reveal animation.