Bulma - Card



Card component displays the content in a box for better appearance. It consists of following inner elements inside main container −

  • card − It is a main container, that contains all the elements.

  • card-header − It represents a horizontal bar.

  • card-header-title − In this class, text is left-aligned with bold font.

  • card-header-icon − It is used for displaying header icon

  • card-image − It specifies fullwidth container for making responsive image.

  • card-content − It is used for displaying content for the card.

  • card-footer − It defines footer of the card with horizontal list of controls.

  • card-footer-item − It is used within card-footer class and has repeatable list item.

The below example demonstrates usage of above classes to display a card −

<!DOCTYPE html>
      <meta charset = "utf-8">
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
      <script defer src = "https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>
      <script defer src = "https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>

      <div class = "container">
         <h1 class = "is-size-2">Card</h1><br>
         <div class = "card">
            <div class = "card-image">
               <figure class = "image is-3by1">
                  <img src = "http://3.bp.blogspot.com/-B8jn4_pTmko/Vi3zmDIhnII/AAAAAAAACBY/5EEv6Ep_z6w/s1600/tutorialpoint.png" alt="Placeholder image">
            <div class = "card-content">
               <div class = "media">
                  <div class = "media-left">
                     <figure class = "image is-48x48">
                        <img src = "https://lh3.ggpht.com/FnKKlX-4e6SZjODG0_9TMd5FZ7zuO_OOh7lbRgqB8DxWTZVUiALW6qh3YUT6xARYdZQ=w720-h310" alt="Placeholder image">
                  <div class = "media-content">
                     <p class = "title is-4">Tutorialspoint</p>
                     <p class = "subtitle is-6">https://www.tutorialspoint.com/</p>
                     <time datetime = "2016-1-1">11:09 PM - 1 Jan 2016</time>

Execute the above code and you will get the below output −