{
  "timestamp": "2026-11-19T09:33:56",
  "compiler": {
    "name": "@stencil/core",
    "version": "4.45.4",
    "typescriptVersion": "5.8.3"
  },
  "storybook": "https://magma-design-system.github.io/magma/storybook/",
  "studio": "https://magma-design-system.github.io/magma/studio/",
  "components": [
    {
      "filePath": "src/components/mds-card-footer/mds-card-footer.tsx",
      "encapsulation": "shadow",
      "tag": "mds-card-footer",
      "docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "parent",
          "text": "mds-card"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-card-footer>` web component is the footer region of a [`<mds-card>`](../mds-card/AGENTS.md), grouping the trailing content of a card (typically actions such as buttons or supplementary metadata) into the card's bottom region.\n\n#### Semantic Behavior\n\n- **Compound child only**: `<mds-card-footer>` must be a direct slot child of `<mds-card>`; it is not used standalone, nor mixed in as a different child type.\n- **Self-slotting**: Simply placing it inside `<mds-card>` routes it into the parent's footer region without the author setting the slot manually.\n- **Pure layout wrapper**: It has a single default slot and no props, no state, no events, and no ARIA role of its own. It contributes only structural placement, not semantics.\n- **A row of actions**: the actions stand `rhythm/inline` apart at the end of the card; under `--magma-container-actions` of the footer (380px) they stack, each at the full width, in the order of the row, the main action at the bottom (`actions/stacked`). A lone action has no order to keep: it stays at its own width at the end of the row at every width, as an `<mds-button-dropdown>` alone does, so a grid of narrow cards does not repeat a band of buttons.\n- **Presence affects parent layout**: Including or omitting the footer changes how the card arranges its regions.\n\n#### Slot semantics\n\nThis component exposes a single default slot and has no configurable properties. Pass any `text`, `HTML elements`, or other components (commonly `<mds-button>` actions) into the default slot; they will be rendered in the card's footer region. The footer lays its children out in a row aligned to the end, with a fixed gap and padding; the placement of the region and the responsive behavior are owned by the parent `<mds-card>`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-card-footer>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Action Row Inside a Full Card\n\nThe typical use: a card with header, content, and footer regions, the footer holding the primary and secondary actions. Place `<mds-card-footer>` as a direct child of `<mds-card>` - it routes itself to the footer region automatically.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Riepilogo pratica</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Verifica i dati prima di procedere.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Single Call-to-Action\n\nA card with only a media region and a footer is a valid minimal composition. The footer carries a lone action, which keeps its own width at the end of the row even when the footer is under `--magma-container-actions` (380px): with one action the stack has no order to keep, so it does not stretch it.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/images/documento.jpg\" alt=\"Anteprima documento\"></mds-img>\n  </mds-card-media>\n  <mds-card-footer>\n    <mds-button label=\"Scarica\" icon=\"mi/baseline/download\" variant=\"primary\" tone=\"weak\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Destructive Action Pattern\n\nUse a `variant=\"error\"` button for destructive operations. Keep the cancel action to the left and the destructive action to the right - the footer's `justify-content: flex-end` naturally aligns both.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Elimina archivio</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Questa operazione non puo essere annullata.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"text\"></mds-button>\n    <mds-button label=\"Elimina\" variant=\"error\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Supplementary Metadata Alongside an Action\n\nThe default slot accepts any slottable content - mix an informational label with a button when status context belongs at the bottom of the card.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Stato richiesta</mds-text>\n  </mds-card-header>\n  <mds-card-footer>\n    <mds-badge label=\"In attesa\" variant=\"warning\" tone=\"weak\"></mds-badge>\n    <mds-button label=\"Visualizza dettagli\" variant=\"primary\" tone=\"outline\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Explicit `slot` Attribute on a Plain Element\n\nWhen you prefer a plain `<div>` or need to place a non-`mds-card-*` wrapper in the footer region, set `slot=\"footer\"` explicitly. The element lands in the footer region, but `<mds-card>` infers its managed grid from the tag names of its children: add `disable-auto-grid` to the card, otherwise the regions overlap.\n\n```html\n<mds-card disable-auto-grid>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Nota operativa</mds-text>\n  </mds-card-header>\n  <div slot=\"footer\" style=\"display: flex; gap: calc(var(--spacing) * 300);\">\n    <mds-button label=\"Chiudi\" variant=\"dark\" tone=\"outline\"></mds-button>\n    <mds-button label=\"Salva nota\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </div>\n</mds-card>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-card-footer>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use `<mds-card-footer>` Outside `<mds-card>`\n\n`<mds-card-footer>` self-routes to the `footer` slot of `<mds-card>` via `<Host slot=\"footer\">`. Outside a card it renders as a bare flex row with no visual context and communicates nothing to screen readers.\n\n```html\n<!-- INCORRECT -->\n<mds-card-footer>\n  <mds-button label=\"Conferma\" variant=\"primary\"></mds-button>\n</mds-card-footer>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Assign `slot=\"footer\"` on `<mds-card-footer>` Manually\n\n`<mds-card-footer>` already sets `slot=\"footer\"` on its host via its own render output. Adding it again as an attribute in your markup is redundant: the component writes it itself, overwriting any other value when it renders.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-footer slot=\"footer\">\n    <mds-button label=\"Salva\" variant=\"primary\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Nest `<mds-card-footer>` Inside a Wrapper Element\n\nCompound component children must be direct slot children of the parent - `<mds-card>` has no default slot, so a `<div>` wrapper without a `slot` is not rendered at all, and the `<mds-card-footer>` inside it with it.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <div class=\"azioni\">\n    <mds-card-footer>\n      <mds-button label=\"Annulla\" variant=\"dark\"></mds-button>\n    </mds-card-footer>\n  </div>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Place Multiple `<mds-card-footer>` in One Card\n\n`<mds-card>` maps all children with the footer tag to the same grid area; multiple footers stack or overlap unpredictably. Consolidate all footer content into a single `<mds-card-footer>`.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\"></mds-button>\n  </mds-card-footer>\n  <mds-card-footer>\n    <mds-button label=\"Conferma\" variant=\"primary\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Override Footer Layout via Inline Styles or Undocumented Selectors\n\n`<mds-card-footer>` owns its internal flex layout (the alignment at the end, the actions `--magma-rhythm-inline` apart); its inset is the card's, and the card sets it `--magma-rhythm-content-actions` from the region before it. Overriding it with inline `style` or by targeting shadow internals breaks theme consistency and couples code to implementation details. If the parent card's spacing must change, use `<mds-card>`'s documented `--mds-card-gap` and `--mds-card-padding` custom properties on the card host, with a rhythm role.\n\n```html\n<!-- INCORRECT -->\n<mds-card-footer style=\"justify-content: flex-start; padding: 0;\">\n  <mds-button label=\"Salva\" variant=\"primary\"></mds-button>\n</mds-card-footer>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "layout-card-footer--docs"
    }
  ]
}
