Cards - 图1

Card Vue Component

Cards, along with List View, is a one more great way to contain and orginize your information. Cards contains unique related data, for example, a photo, text, and link all about a single subject. Cards are typically an entry point to more complex and detailed information.

Card Vue component represents Cards component.

Card Components

There are following components included:

  • **f7-card**
  • **f7-card-header**
  • **f7-card-content**
  • **f7-card-footer**

Card Properties

PropTypeDefaultDescription
<f7-card> properties
titlestringCard header content
contentstringCard content
footerstringCard footer content
paddingbooleantrueAdds additional inner padding on card content
outlinebooleanfalseMakes Card outline
<f7-card-content> properties
paddingbooleantrueAdds additional inner padding

Examples

  1. <f7-block-title>Simple Cards</f7-block-title>
  2. <f7-card
  3. content="This is a simple card with plain text, but cards can also contain their own header, footer, list view, image, or any other element."
  4. ></f7-card>
  5. <f7-card
  6. title="Card header"
  7. content="Card with header and footer. Card headers are used to display card titles and footers for additional information or just for custom actions."
  8. footer="Card footer"
  9. ></f7-card>
  10. <f7-card
  11. content="Another card. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse feugiat sem est, non tincidunt ligula volutpat sit amet. Mauris aliquet magna justo. "
  12. ></f7-card>
  13. <f7-block-title>Outline Cards</f7-block-title>
  14. <f7-card
  15. outline
  16. content="This is a simple card with plain text, but cards can also contain their own header, footer, list view, image, or any other element."
  17. ></f7-card>
  18. <f7-card
  19. outline
  20. title="Card header"
  21. content="Card with header and footer. Card headers are used to display card titles and footers for additional information or just for custom actions."
  22. footer="Card footer"
  23. ></f7-card>
  24. <f7-card
  25. outline
  26. content="Another card. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse feugiat sem est, non tincidunt ligula volutpat sit amet. Mauris aliquet magna justo. "
  27. ></f7-card>
  28. <f7-block-title>Styled Cards</f7-block-title>
  29. <f7-card class="demo-card-header-pic">
  30. <f7-card-header
  31. class="no-border"
  32. valign="bottom"
  33. style="background-image:url(http://lorempixel.com/1000/600/nature/3/)"
  34. >Journey To Mountains</f7-card-header>
  35. <f7-card-content>
  36. <p class="date">Posted on January 21, 2015</p>
  37. <p>Quisque eget vestibulum nulla. Quisque quis dui quis ex ultricies efficitur vitae non felis. Phasellus quis nibh hendrerit...</p>
  38. </f7-card-content>
  39. <f7-card-footer>
  40. <f7-link>Like</f7-link>
  41. <f7-link>Read more</f7-link>
  42. </f7-card-footer>
  43. </f7-card>
  44. <f7-card class="demo-card-header-pic">
  45. <f7-card-header
  46. class="no-border"
  47. valign="bottom"
  48. style="background-image:url(http://lorempixel.com/1000/600/people/6/)"
  49. >Journey To Mountains</f7-card-header>
  50. <f7-card-content>
  51. <p class="date">Posted on January 21, 2015</p>
  52. <p>Quisque eget vestibulum nulla. Quisque quis dui quis ex ultricies efficitur vitae non felis. Phasellus quis nibh hendrerit...</p>
  53. </f7-card-content>
  54. <f7-card-footer>
  55. <f7-link>Like</f7-link>
  56. <f7-link>Read more</f7-link>
  57. </f7-card-footer>
  58. </f7-card>
  59. <f7-block-title>Facebook Cards</f7-block-title>
  60. <f7-card class="demo-facebook-card">
  61. <f7-card-header class="no-border">
  62. <div class="demo-facebook-avatar"><img src="http://lorempixel.com/68/68/people/1/" width="34" height="34"/></div>
  63. <div class="demo-facebook-name">John Doe</div>
  64. <div class="demo-facebook-date">Monday at 3:47 PM</div>
  65. </f7-card-header>
  66. <f7-card-content :padding="false">
  67. <img src="http://lorempixel.com/1000/700/nature/8/" width="100%"/>
  68. </f7-card-content>
  69. <f7-card-footer class="no-border">
  70. <f7-link>Like</f7-link>
  71. <f7-link>Comment</f7-link>
  72. <f7-link>Share</f7-link>
  73. </f7-card-footer>
  74. </f7-card>
  75. <f7-card class="demo-facebook-card">
  76. <f7-card-header class="no-border">
  77. <div class="demo-facebook-avatar"><img src="http://lorempixel.com/68/68/people/1/" width="34" height="34"/></div>
  78. <div class="demo-facebook-name">John Doe</div>
  79. <div class="demo-facebook-date">Monday at 2:15 PM</div>
  80. </f7-card-header>
  81. <f7-card-content>
  82. <p>What a nice photo i took yesterday!</p><img src="http://lorempixel.com/1000/700/nature/8/" width="100%"/>
  83. <p class="likes">Likes: 112 &nbsp;&nbsp; Comments: 43</p>
  84. </f7-card-content>
  85. <f7-card-footer class="no-border">
  86. <f7-link>Like</f7-link>
  87. <f7-link>Comment</f7-link>
  88. <f7-link>Share</f7-link>
  89. </f7-card-footer>
  90. </f7-card>
  91. <f7-block-title>Cards With List View</f7-block-title>
  92. <f7-card>
  93. <f7-card-content :padding="false">
  94. <f7-list>
  95. <f7-list-item link="#">Link 1</f7-list-item>
  96. <f7-list-item link="#">Link 2</f7-list-item>
  97. <f7-list-item link="#">Link 3</f7-list-item>
  98. <f7-list-item link="#">Link 4</f7-list-item>
  99. <f7-list-item link="#">Link 5</f7-list-item>
  100. </f7-list>
  101. </f7-card-content>
  102. </f7-card>
  103. <f7-card title="New Reelases">
  104. <f7-card-content :padding="false">
  105. <f7-list medial-list>
  106. <f7-list-item
  107. title="Yellow Submarine"
  108. subtitle="Beatles"
  109. >
  110. <img slot="media" src="http://lorempixel.com/88/88/fashion/4" width="44"/>
  111. </f7-list-item>
  112. <f7-list-item
  113. title="Don't Stop Me Now"
  114. subtitle="Queen"
  115. >
  116. <img slot="media" src="http://lorempixel.com/88/88/fashion/5" width="44"/>
  117. </f7-list-item>
  118. <f7-list-item
  119. title="Billie Jean"
  120. subtitle="Michael Jackson"
  121. >
  122. <img slot="media" src="http://lorempixel.com/88/88/fashion/6" width="44"/>
  123. </f7-list-item>
  124. </f7-list>
  125. </f7-card-content>
  126. <f7-card-footer>
  127. <span>January 20, 2015</span>
  128. <span>5 comments</span>
  129. </f7-card-footer>
  130. </f7-card>