<!-- https://svgrid.com/docs/recipes/mobile-card-pivot/ - SvGrid documentation as markdown. Index of every page: https://svgrid.com/llms.txt -->

# Mobile card view with grid-on-desktop

> Live in [demo 81-mobile-card-view](https://svgrid.com/demos/81-mobile-card-view/).

> Live demo: Mobile / responsive cards - https://svgrid.com/demos/81-mobile-card-view/

## When

Same data, two layouts. Auto-pivot below 720px or force one via a toolbar switch.

## How

Key API surface:

- `window.innerWidth listener`
- `shared $state array between the two views`

See the demo source for the full implementation; this recipe pins the
pattern + the surface so you can copy-paste it confidently. The doc
page that explains the underlying feature in depth is linked from the
[recipes index](https://github.com/sv-grid/sv-grid/blob/main/docs/recipes/index.md).

## See also

- [Demo 81-mobile-card-view source](https://github.com/sv-grid/sv-grid/blob/main/examples/src/demos/81-mobile-card-view.svelte)
- [Demo 81-mobile-card-view prompt sidecar](https://github.com/sv-grid/sv-grid/blob/main/examples/src/demos/prompts/81-mobile-card-view.md) - drop into an LLM context window
- [Recipes index](https://github.com/sv-grid/sv-grid/blob/main/docs/recipes/index.md)

---

SvGrid is the Svelte 5 data grid (`npm install @svgrid/grid`, MIT). This page: https://svgrid.com/docs/recipes/mobile-card-pivot/ . All docs: https://svgrid.com/llms.txt
