Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas metus nulla, commodo a sodales sed, dignissim pretium nunc. Nam et lacus neque. Ut enim massa, sodales tempor convallis et, iaculis ac massa.
The Material Design Lite (MDL) card component is a user interface element representing a virtual piece of paper that contains related data — such as a photo, some text, and a link — that are all about a single subject.
Cards are a convenient means of coherently displaying related content that is composed of different types of objects. They are also well-suited for presenting similar objects whose size or supported actions can vary considerably, like photos with captions of variable length. Cards have a constant width and a variable height, depending on their content.
MDL class | Effect | Remarks |
---|---|---|
mdl-card |
Defines div element as an MDL card container | Required on "outer" div |
mdl-card--border |
Adds a border to the card section that it's applied to | Used on the "inner" divs |
mdl-shadow--2dp through mdl-shadow--16dp |
Assigns variable shadow depths (2, 3, 4, 6, 8, or 16) to card | Optional, goes on "outer" div; if omitted, no shadow is present |
mdl-card__title |
Defines div as a card title container | Required on "inner" title div |
mdl-card__title-text |
Assigns appropriate text characteristics to card title | Required on head tag (H1 - H6) inside title div |
mdl-card__subtitle-text |
Assigns text characteristics to a card subtitle | Optional. Should be a child of the title element. |
mdl-card__media |
Defines div as a card media container | Required on "inner" media div |
mdl-card__supporting-text |
Defines div as a card body text container and assigns appropriate text characteristics to body text | Required on "inner" body text div; text goes directly inside the div with no intervening containers |
mdl-card__actions |
Defines div as a card actions container and assigns appropriate text characteristics to actions text | Required on "inner" actions div; content goes directly inside the div with no intervening containers |
mdl-card__menu |
Defines element as top right menu button | Optional. Should be a child of the mdl-card element. |