Angular Material Card


Angular Material โ€“ Card : The <md-card> directive is used to create Card in Angular Material. Various options are available to create cards. Here in this tutorial we are going to explain how you can create Angular Material card. You can also use our online editor to edit and run the code online.


Angular Material Card Example

Let us create basic Angular Material Card โ€“

Example:

<md-card>
	 <img src="card-image.png" class="md-card-image" alt="image caption">
	 <md-card-content>
	   <h2>Tutorialsplane.com</h2>
	   <p>The Simpleast way to learn everything.</p>
	 </md-card-content>
	 <md-card-footer>
	   visit : www.tutorialsplane.com
	 </md-card-footer>
</md-card>

Try it ยป

If you run the above example it will produce output something like this โ€“

Angular Material โ€“ Card Example

Following options are available โ€“

  • <md-card-header> โ€“ Header for the card, holds avatar, text and squared image
  • <md-card-avatar> โ€“ Card avatar
  • md-user-avatar โ€“ Class for user image
  • <md-icon> : Icon directive
  • <md-card-header-text> :โ€“ Contains elements for the card description
  • md-title :โ€“ Class for the card title
  • md-subhead โ€“ Class for the card sub header
  • <img>: โ€“ Image for the card
  • <md-card-title>:- Card content title
  • <md-card-title-text>:โ€“ Card Title Directive Text.
  • md-headline:-Class for the card content title
  • md-subhead: โ€“ Class for the card content sub header
  • <md-card-title-media>: โ€“ Squared image within the title
  • md-media-sm :โ€“ Class for small image
  • md-media-md :โ€“ Class for medium image
  • md-media-lg: โ€“ Class for large image
  • <md-card-content>: โ€“ Card content
  • md-media-xl : โ€“ Class for extra large image

Advertisements

Add Comment

๐Ÿ“– Read More