npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@material-git/card

v2.0.0-git.20160919

Published

Angular 2 Material card

Downloads

4

Readme

md-card

md-card is a content container component that conforms to the spec of a Material Design card.

See plunker example here.

Usage

Simply add your content between md-card tags to consume basic card styles like box-shadow and default padding.

<md-card>
   Basic card.
</md-card>

Output:

Preset sections

We also provide a number of preset sections that you can mix and match within the md-card tags.

  • <md-card-title>: adds styles for a title
  • <md-card-subtitle>: adds styles for a subtitle
  • <md-card-content>: main content section, intended for blocks of text
  • <img md-card-image>: stretches image to container width
  • <md-card-actions>: wraps and styles buttons
  • <md-card-footer>: anchors section to bottom of card

Example markup for a card with section presets:

<md-card>
   <md-card-subtitle>Subtitle first</md-card-subtitle>
   <md-card-title>Card with title</md-card-title>   
   <md-card-content>
        <p>This is supporting text.</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do 
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad</p>
   </md-card-content>
   <md-card-actions>
        <button md-button>LIKE</button>
        <button md-button>SHARE</button>
   </md-card-actions>
</md-card>

Output:

Preset shortcuts

md-card-actions has a few layout shortcuts. You can add align="end" to align the buttons at the end of the main axis (flex-end). The default is align="start" (flex-start).

Preset layouts

You can also leverage preset layouts that format some of the sections together.

<md-card-header>

Formats the following sections into a header:

  • <md-card-title>: title to format within header
  • <md-card-subtitle>: subtitle to format within header
  • <img md-card-avatar>: image to use for avatar

Example markup for a card with a header:

<md-card>
   <md-card-header>
      <img md-card-avatar src="path/to/img.png">
      <md-card-title>Header title</md-card-title>
      <md-card-subtitle>Header subtitle</md-card-subtitle>
   </md-card-header>
   <img md-card-image src="path/to/img.png">
   <md-card-content>
      <p>Here is some more content</p>
   </md-card-content>
</md-card>

Output:

<md-card-title-group>

Groups the following sections together:

  • <md-card-title>: title to format within group
  • <md-card-subtitle>: subtitle to format within group
  • One of the following image sizes:
    • <img md-card-sm-image>
    • <img md-card-md-image>
    • <img md-card-lg-image>

Example markup for a card with title-group layout:

<md-card>
   <md-card-title-group>
      <img md-card-sm-image src="path/to/img.png">
      <md-card-title>Card with title</md-card-title>
      <md-card-subtitle>Subtitle</md-card-subtitle>
   </md-card-title-group>
</md-card>

Output: