{"bugs":{"url":"https://github.com/material-components/material-components-web/issues"},"dist":{"shasum":"88b59cfa6f66277ec30f3fa4ecd7dea8ca2a72d0","tarball":"https://registry.npmjs.org/@material/card/-/card-15.0.0-canary.697fbdebd.0.tgz","fileCount":23,"integrity":"sha512-TIFJQxQb3dawmjsQpDnh95ONT3PC5BThNBnAQ0KDYr6hdz9Rrpcvkrz0PxDjpTYACRy67I9ghrD3LzHRX2ND1g==","signatures":[{"sig":"MEQCIB3xHn4acnxkszNNEYXHPmK71+dpg59nBZp4cr4kXmB5AiAQNtYDl4bEewPBQ3uMQcWef8T0kjebHZHuaCste3tQ0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd7pLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnrhAAl7qEW8duMbsrEDcP6VMBLn32mRhVjvhtlIL0NleEYnvtrYvl\r\nZ1NTs2ODv1McUdIkAACJnZABH5uGkLSYz7ryHF2F16mgkOT/Cjmhlm4InffN\r\nDRaYDtbJdP5C8s5CY7zFp9zkwTjQD0QDVgEEtGRlR1GI8BWxezRi62hsNerw\r\nMcT8qThnybb4Q5CxGShBX1xSULTJIif8hD6f9MYRvMBTivK28F+t3hngG4pP\r\n5nIAwRQb3J1W2zsZ4P1YAzxk+ffk+4SjWncy2EvmP/u8GoPcQ1OGn4jDj1vu\r\nELp5rX+Jb7XcTQTyfdH4iuKEEXPgbG9FG0Q2zPduy4CJgNN8Y1QoDyQsr8Jm\r\n4JGCNFdgtUr3k+A2Fu38MnrWcOMEJe3p4U4f1PjoKI8cLKOb+GLoE28fAL7T\r\ngEG1XommKLgN7fzud25hhHa0mk6ldOly1fOUTmPG95a8VJUqZRTjwmmxE+ik\r\noG26EctKG2OEJjLqwYU1JT1aiRRUyKxIpOxRj9yQl/mZGUyAppg+R7cVeY8P\r\n6hzlTB18nD0EdGlvxSg3QxHc5hK5nAc/GogMMrttSHJFniQmVYzoJqMXs4yO\r\nuxBM1sb8pRkWfYa8gEbnurpxcxN2vcT6zlb7khsj1uiQMUCW8/zk8YZ5Ewnq\r\nIs/JLf8r1uR3tIqcESdL+wUVr+UKeF7oNTA=\r\n=fx6Z\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 class=\"mdc-card__ripple\"></div>\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 class=\"mdc-card__ripple\"></div>\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__ripple` | Optional. The element that shows the ripple styling. This is mandatory if `mdc-card__primary-action` is used. 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":"633705dd01d68334d80bad5e354eb7e71d9fa30b","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@v14.20.1+x64 (linux)","description":"The Material Components for the web card component","directories":{},"maintainers":[{"name":"material-admin","email":"aprigogin+npm@google.com"},{"name":"yefim","email":"hi@yef.im"},{"name":"abhiomkar","email":"abhiomkar@gmail.com"},{"name":"azakus","email":"dfreedm2@gmail.com"},{"name":"bicknellr","email":"bicknellr@gmail.com"},{"name":"aprigogin","email":"andrey.prigogin@gmail.com"},{"name":"patrickrodee","email":"prodee@google.com"},{"name":"aomarks","email":"aomarks@gmail.com"},{"name":"emarquez","email":"emarquez@google.com"},{"name":"allanchen","email":"allanchen@google.com"},{"name":"esgonzalez","email":"esgonzalez@google.com"},{"name":"asyncliz","email":"asyncliz@gmail.com"},{"name":"candysonya","email":"wangchan518@gmail.com"},{"name":"ssuarez","email":"sayrisuarez@google.com"},{"name":"taylorv","email":"brian.t.vann@gmail.com"}],"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"tslib":"^2.1.0","@material/dom":"15.0.0-canary.697fbdebd.0","@material/rtl":"15.0.0-canary.697fbdebd.0","@material/shape":"15.0.0-canary.697fbdebd.0","@material/theme":"15.0.0-canary.697fbdebd.0","@material/ripple":"15.0.0-canary.697fbdebd.0","@material/tokens":"15.0.0-canary.697fbdebd.0","@material/elevation":"15.0.0-canary.697fbdebd.0","@material/feature-targeting":"15.0.0-canary.697fbdebd.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/card_15.0.0-canary.697fbdebd.0_1668790859335_0.022490057210158287","host":"s3://npm-registry-packages"},"_id":"@material/card@15.0.0-canary.697fbdebd.0","version":"15.0.0-canary.697fbdebd.0"}