{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"c6900529b1ded3cdbccec26aa0760eafb4d1ba2a","tarball":"https://registry.npmjs.org/@material/card/-/card-9.0.0-canary.eaeb78ce3.0.tgz","fileCount":19,"integrity":"sha512-UEsVXcmriarG5s9PORAW3dTepVWKBki26cyXRfYmJ8mlAMQVi1pmTCuDHBz0fW55CfqkF3V5269vcd/wqC9l1A==","signatures":[{"sig":"MEUCIQD4o19rSsgnlRiD4w55piFRH2PnKFjES2e6W1OZPsH01AIgdY4HpmNIwmV6vFSRmGR9qDmCo5sWZFFWtDQ6a2HU4GM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyRn2CRA9TVsSAnZWagAAVVsP/jLtvX+KWCFVQrC2hcdY\nJxuq6m/01QforFHo8RWCllxwpgB7pppP4NzE0ELYY9EunwTi2l0bGLqaY/LY\ne7iVK5hbvf3AUzMBqJvaMDFQq+Rwh6a8OhbhLIEBgJ3K4tCLYT5yiGvD+DTd\n8EhY2hXd6BB6zoF8WuQa3mR4QqCFsfyQFCyqSRCUf4kaxYdKbInIYHjXNFzQ\nDItRC8vrZxrHVHwSOIJpBY1eyBgVkskM0OHERqO6QAHkSg3e/WM2x0V4glFS\nt2GhH+0PrxOhPjsUUqEiDbEaxlTsd4oCGnDUXRAjUq6KCW6lB0A5n82X29RO\n69JYM8ogNNhGtNBEoDknMVLVSD/zV8qc5mfCt0i2wD/fJ+iwRmwC0RA3wr8y\nSwitVX+o4/e2vdvUreyODfqJ85qguTdcZLJM6GFncNRcoR4MOlFXYIg4XJbV\nDnaJbgGlB0d8XJRX9NMRwwIdp8JUP2mOaHufFlybgAUxINFRgOQJLmM2+Na/\nFyEPszjTegaU8qITOeph4QTE4M/wMjsQk6solWxBQf6AtlWB1Sn7IdQsipEM\n+sD3T9VNxH7tuAIx1AthlVUcl5UgDeOJASi3q1hU18LLtnX+/7E4MzN2oVia\np8DyQ4kb0e83IN9WYmnmabqCHBUnhjC6KuAi1FHe+dAEQSczJmwcy1ngDHLe\netzR\r\n=AiHS\r\n-----END PGP SIGNATURE-----\r\n"},"name":"@material/card","readme":"<!--docs:\ntitle: \"Cards\"\nlayout: detail\nsection: components\nexcerpt: \"Cards contain content and actions about a single subject.\"\niconId: card\npath: /catalog/cards/\n-->\n\n# Cards\n\n[Cards](https://material.io/components/cards/) contain content and actions about a single subject.\n\nFor additional information, see the [API](#api).\n\n![Elevated card with a secondary title and two actions: Action 1 and Action 2 in purple](images/card-elevated.png)\n\n## Using cards\n\n### Installation\n\n```\nnpm install @material/card\n```\n\n### Styles\n\n```css\n@use \"@material/card\";\n\n@include card.core-styles;\n```\n\nIn order to remain general-purpose and support e.g. images spanning the full width of the card, MDC Card does not\ninclude padding styles on the root element. When adding free-form text content to cards, padding should be set to\n`16px`:\n\n```css\n.my-card-content {\n  padding: 16px;\n}\n```\n\n**Note: MDC Card's predefined classes for content areas (e.g. `mdc-card__actions`) take care of their own padding.**\n\nBy default, cards expand horizontally to fill all available space, and vertically to fit their contents.\nIf you'd like to maintain a consistent width and height across cards, you'll need to set it in your styles:\n\n```css\n.my-card {\n  height: 350px;\n  width: 350px;\n}\n```\n\nYou can also place cards within layout containers, such as [MDC Layout Grid](../mdc-layout-grid)\nor CSS Flexbox or Grid.\n\n### JavaScript\n\nMDC Card itself does not require JavaScript. However, if you place interactive components inside your cards,\nyou may want to instantiate ripples or other components. For example:\n\n```js\nimport {MDCRipple} from '@material/ripple';\n\nconst selector = '.mdc-button, .mdc-icon-button, .mdc-card__primary-action';\nconst ripples = [].map.call(document.querySelectorAll(selector), function(el) {\n  return new MDCRipple(el);\n});\n```\n\n**Note: If your card includes any [icon button toggles](../mdc-icon-button#icon-button-toggle), you will want to\ninstantiate `MDCIconButtonToggle` instead of `MDCRipple`.**\n\n## Card\n\n### Card example\n\n```html\n<div class=\"mdc-card\">\n  <!-- ... content ... -->\n</div>\n```\n\n**Note: MDC Card is designed to accommodate a wide variety of use cases. See the [Card Contents](#card-contents) section for information on helpers for specific types of content within cards.**\n\n## Other variants\n\n### Outlined card\n\n![Outlined card with a secondary title and two actions: Action 1 and Action 2 in purple](images/card-outlined.png)\n\nBy default, cards are elevated with no outline. You can render unelevated, outlined cards instead by adding the\n`mdc-card--outlined` modifier class.\n\n```html\n<div class=\"mdc-card mdc-card--outlined\">\n  <!-- ... content ... -->\n</div>\n```\n\n### Card contents\n\nMDC Card can be used for a wide variety of use cases, but it includes styles for a few common ones.\n\n#### Primary action\n\nIf a majority of the card (or even the entire card) should be actionable, you can add the `mdc-card__primary-action`\nclass to the region to give it MDC Ripple styles. You should also assign `tabindex=\"0\"` to ensure it can also be\ninteracted with via keyboard.\n\n```html\n<div class=\"mdc-card\">\n  <div class=\"mdc-card__primary-action\" tabindex=\"0\">\n    <!-- content within actionable area -->\n  </div>\n  <!-- ... content ... -->\n</div>\n```\n\n**Note: We recommend avoiding adding other actionable items within `mdc-card__primary-action`, due to the overlapping\neffect of multiple nested elements with ripple and states applied at once.**\n\n#### Rich media\n\nThis area is used for showing rich media in cards, and optionally as a container. Use the `mdc-card__media` CSS class\nand the [optional modifier classes](#css-classes).\n\n```html\n<div class=\"my-card__media mdc-card__media mdc-card__media--16-9\">\n  <div class=\"mdc-card__media-content\">Title</div>\n</div>\n```\n\n```css\n.my-card__media {\n  background-image: url(\"pretty.jpg\");\n}\n```\n\n#### Actions\n\nThis area is used to show different actions the user can take, typically at the bottom of a card.\nIt's often used with [buttons](../mdc-button):\n\n```html\n<div class=\"mdc-card__actions\">\n  <button class=\"mdc-button mdc-card__action mdc-card__action--button\">\n    <div class=\"mdc-button__ripple\"></div>\n    <span class=\"mdc-button__label\">Action 1</span>\n  </button>\n  <button class=\"mdc-button mdc-card__action mdc-card__action--button\">\n    <div class=\"mdc-button__ripple\"></div>\n    <span class=\"mdc-button__label\">Action 2</span>\n  </button>\n</div>\n```\n\nIt can also be used with [icon buttons](../mdc-icon-button):\n\n```html\n<div class=\"mdc-card__actions\">\n  <button class=\"mdc-icon-button mdc-card__action mdc-card__action--icon\"\n     aria-pressed=\"false\"\n     aria-label=\"Add to favorites\"\n     title=\"Add to favorites\">\n   <i class=\"material-icons mdc-icon-button__icon mdc-icon-button__icon--on\">favorite</i>\n   <i class=\"material-icons mdc-icon-button__icon\">favorite_border</i>\n  </button>\n  <button class=\"material-icons mdc-icon-button mdc-card__action mdc-card__action--icon\" title=\"Share\">share</button>\n  <button class=\"material-icons mdc-icon-button mdc-card__action mdc-card__action--icon\" title=\"More options\">more_vert</button>\n</div>\n```\n\nBe sure to include the `mdc-card__action` class on every action for correct positioning. In addition, _button_ icons\nshould use the `mdc-card__action--button` class, and _icon_ actions should use the `mdc-card__action--icon` class.\n\nTo have a single action button take up the entire width of the action row, use the `--full-bleed` modifier on the row:\n\n```html\n<div class=\"mdc-card__actions mdc-card__actions--full-bleed\">\n  <a class=\"mdc-button mdc-card__action mdc-card__action--button\" href=\"#\">\n    <div class=\"mdc-button__ripple\"></div>\n    <span class=\"mdc-button__label\">All Business Headlines</span>\n    <i class=\"material-icons mdc-button__icon\" aria-hidden=\"true\">arrow_forward</i>\n  </a>\n</div>\n```\n\nTo display buttons _and_ icons in the same row, wrap them in `mdc-card__action-buttons` and `mdc-card__action-icons`\nelements:\n\n```html\n<div class=\"mdc-card__actions\">\n  <div class=\"mdc-card__action-buttons\">\n    <button class=\"mdc-button mdc-card__action mdc-card__action--button\">\n      <div class=\"mdc-button__ripple\"></div>\n      <span class=\"mdc-button__label\">Read</span>\n    </button>\n    <button class=\"mdc-button mdc-card__action mdc-card__action--button\">\n      <div class=\"mdc-button__ripple\"></div>\n      <span class=\"mdc-button__label\">Bookmark</span>\n    </button>\n  </div>\n  <div class=\"mdc-card__action-icons\">\n   <button class=\"material-icons mdc-icon-button mdc-card__action mdc-card__action--icon\" title=\"Share\">share</button>\n    <button class=\"material-icons mdc-icon-button mdc-card__action mdc-card__action--icon\" title=\"More options\">more_vert</button>\n  </div>\n</div>\n```\n\n##### Icons\n\nWe recommend using [Material Icons](https://material.io/tools/icons/) from Google Fonts:\n\n```html\n<head>\n  <link rel=\"stylesheet\" href=\"https://fonts.googleapis.com/icon?family=Material+Icons\">\n</head>\n```\n\nHowever, you can also use SVG, [Font Awesome](https://fontawesome.com/), or any other icon library you wish.\n\n#### Combined example\n\nThe following is an example incorporating all of the above elements:\n\n```html\n<div class=\"mdc-card\">\n  <div class=\"mdc-card__primary-action\">\n    <div class=\"mdc-card__media mdc-card__media--square\">\n      <div class=\"mdc-card__media-content\">Title</div>\n    </div>\n    <!-- ... additional primary action content ... -->\n  </div>\n  <div class=\"mdc-card__actions\">\n    <div class=\"mdc-card__action-buttons\">\n      <button class=\"mdc-button mdc-card__action mdc-card__action--button\">\n        <div class=\"mdc-button__ripple\"></div>\n        <span class=\"mdc-button__label\">Action 1</span>\n      </button>\n      <button class=\"mdc-button mdc-card__action mdc-card__action--button\">\n        <div class=\"mdc-button__ripple\"></div>\n        <span class=\"mdc-button__label\">Action 2</span>\n      </button>\n    </div>\n    <div class=\"mdc-card__action-icons\">\n      <button class=\"material-icons mdc-icon-button mdc-card__action mdc-card__action--icon\" title=\"Share\">share</button>\n      <button class=\"material-icons mdc-icon-button mdc-card__action mdc-card__action--icon\" title=\"More options\">more_vert</button>\n    </div>\n  </div>\n</div>\n```\n\n#### Non-semantic content\n\nIt can occasionally be useful to add non-semantic elements to a card. For instance, some implementations might do this to add an overlay layer.\n\nIn this case, it's important to delineate between semantic (real) content and non-semantic content added by the implementation. To achieve this, simply wrap the semantic content in an `mdc-card__content` element. The non-semantic content can remain at the card's top level:\n\n```html\n<div class=\"mdc-card\">\n  <div class=\"mdc-card__content\">\n    <!-- ... semantic content ... -->\n  </div>\n  <!-- ... non-semantic content ... -->\n</div>\n```\n\n## API\n\n### CSS classes\n\nCSS Class | Description\n--- | ---\n`mdc-card` | Mandatory. The main card element.\n`mdc-card--outlined` | Optional. Removes the shadow and displays a hairline outline instead.\n`mdc-card__primary-action` | Optional. The main tappable area of the card. Typically contains most (or all) card content _except_ `mdc-card__actions`. Only applicable to cards that have a primary action that the main surface should trigger.\n`mdc-card__media` | Optional. Media area that displays a custom `background-image` with `background-size: cover`.\n`mdc-card__media--square` | Optional. Automatically scales the media area's height to equal its width.\n`mdc-card__media--16-9` | Optional. Automatically scales the media area's height according to its width, maintaining a 16:9 aspect ratio.\n`mdc-card__media-content` | Optional. An absolutely-positioned box the same size as the media area, for displaying a title or icon on top of the `background-image`.\n`mdc-card__actions` | Optional. Row containing action buttons and/or icons.\n`mdc-card__actions--full-bleed` | Optional. Removes the action area's padding and causes its only child (an `mdc-card__action` element) to consume 100% of the action area's width.\n`mdc-card__action-buttons` | Optional. A group of action buttons, displayed on the left side of the card (in LTR), adjacent to `mdc-card__action-icons`.\n`mdc-card__action-icons` | Optional. A group of supplemental action icons, displayed on the right side of the card (in LTR), adjacent to `__action-buttons`.\n`mdc-card__action` | Optional. An individual action button or icon.\n`mdc-card__action--button` | Optional. An action button with text.\n`mdc-card__action--icon` | Optional. An action icon with no text. We recommend using [Material Icons](https://material.io/tools/icons/) from Google Fonts.\n`mdc-card__content` | Optional. Used to delineate the card's semantic contents from any non-semantic elements (e.g., those used to implement an overlay).\n\n### Sass mixins\n\nMixin | Description\n--- | ---\n`fill-color($color)` | Sets the fill color of a card.\n`outline($color, $thickness)` | Sets the color and thickness of a card's outline (but does _not_ remove its shadow).\n`shape-radius($radius, $rtl-reflexive)` | Sets the rounded shape to card with given radius size. Set `$rtl-reflexive` to true to flip radius values in RTL context, defaults to false.\n`media-aspect-ratio($x, $y)` | Maintains the given aspect ratio on a `mdc-card__media` subelement by dynamically scaling its height relative to its width.\n","gitHead":"9902fe5ed18fabe2d289f92e75dbf17abebe5a80","license":"MIT","_npmUser":{"name":"abhiomkar","email":"abhiomkar@gmail.com"},"homepage":"https://github.com/material-components/material-components-web#readme","keywords":["material components","material design","card"],"repository":{"url":"git+https://github.com/material-components/material-components-web.git","type":"git","directory":"packages/mdc-card"},"_npmVersion":"lerna/3.20.2/node@v10.23.0+x64 (linux)","description":"The Material Components for the web card component","directories":{},"maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"bwobrien","email":"obrien.test@gmail.com"},{"name":"lynnjepsen","email":"lynnjepsen@google.com"},{"name":"acdvorak","email":"acdvorak@gmail.com"},{"name":"kfranqueiro","email":"kenneth.franqueiro@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"bonniez","email":"bonniez@google.com"},{"name":"moog16","email":"mattgoo@gmail.com"},{"name":"williamernest","email":"williamernest@google.com"}],"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"@material/dom":"9.0.0-canary.eaeb78ce3.0","@material/rtl":"9.0.0-canary.eaeb78ce3.0","@material/shape":"9.0.0-canary.eaeb78ce3.0","@material/theme":"9.0.0-canary.eaeb78ce3.0","@material/ripple":"9.0.0-canary.eaeb78ce3.0","@material/elevation":"9.0.0-canary.eaeb78ce3.0","@material/feature-targeting":"9.0.0-canary.eaeb78ce3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/card_9.0.0-canary.eaeb78ce3.0_1607014901896_0.28522672353880707","host":"s3://npm-registry-packages"},"_id":"@material/card@9.0.0-canary.eaeb78ce3.0","version":"9.0.0-canary.eaeb78ce3.0"}