<!--
  GENERATED FILE - do not edit by hand.
  Source of truth: src/components/mds-table-footer/ in the magma monorepo (usage/*.md and the
  component's JSDoc). Regenerated on every stencil build (scripts/component-docs.ts).
-->

# mds-table-footer

> `@maggioli-design-system/magma` 2.15.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.

The `<mds-table-footer>` web component is a structural child of [`<mds-table>`](../mds-table/AGENTS.md) that renders the footer row of a table - typically used for totals or summaries. Unlike the native `<tfoot>`, it is itself a row (`role="row"`, `display: table-row`): its single slot takes `mds-table-cell` children directly, one per column.

#### Semantic Behavior

- **Compound child only**: Must be placed as a direct slot child of `<mds-table>`, alongside `mds-table-header` and `mds-table-body`; it is not used standalone or nested inside another child type.
- **Structural passthrough**: It renders nothing but a single default slot - a purely structural wrapper with no rendered chrome of its own.
- **Lines up with the rows**: The footer is no selectable data row, but it keeps the columns of one: in a `selectable` table the parent sets the footer's `selectable` and the footer adds an empty first cell, where the rows have their checkbox; when the rows have `slot="action"` content on load, it adds an empty last cell, where the rows have their actions.

#### Properties & Visual Configurations

`<mds-table-footer>` has one prop, `selectable`, which `<mds-table>` sets: leave it to the parent. Its main API is its **default slot**, into which you place one `mds-table-cell` per column of your data, not counting the selection and actions columns. Visual styling (background, borders, cell padding) is inherited from the CSS custom properties defined on the parent `<mds-table>`.

## Read next

- [`examples.md`](examples.md) - correct usage, from the most common case
- [`mistakes.md`](mistakes.md) - the wrong forms, each with the right one
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/layout-table-footer--docs) - the live examples, in the published Storybook of `main`
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`mistakes.md`](../../../../agents/mistakes.md) - the rules shared by every component

## Props

| Prop | Attribute | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `selectable` | `selectable` | `boolean \| undefined` | - | Adds an empty cell in the selection column, so that the cells of the footer line up with the ones of the rows: `mds-table` sets it from its own `selectable` |

## Slots

| Slot | Description |
| --- | --- |
| (default) | Add `mds-table-cell` element/s: the footer is itself a row, for totals and counts. |

## Dependencies

Uses: `mds-table-cell`.
