# Give a Modal Its Own URL in TanStack Router

DevFeed: [Give a Modal Its Own URL in TanStack Router](<https://devfeed.tech/articles/give-a-modal-its-own-url-in-tanstack-router-77075.md>)

Original publisher: [Read original article](<https://spin.atomicobject.com/modal-own-url-tanstack-router/>)

Author: Bryan Paronto

Published: 2026-10-08T12:00:06Z

Content type: tutorial

Language: en

Sources: [Atomic Object](<https://devfeed.tech/sources/atomic-object.md>)

Topics: [Self-organizing Team](<https://devfeed.tech/topics/self-organizing-team.md>)

Tags: [dialog](<https://devfeed.tech/tags/dialog.md>), [element](<https://devfeed.tech/tags/element.md>), [json](<https://devfeed.tech/tags/json.md>), [tanstack](<https://devfeed.tech/tags/tanstack.md>)

## AI overview

A practical TanStack Router pattern makes a detail dialog addressable through its own URL while keeping the filtered grid mounted behind it. The article uses a layout route with the dialog as a child, preserves search parameters between routes, preloads item data through loaders and the query cache, and maps browser history and dialog dismissal to navigation behavior.

## Source excerpt

I recently built an app whose main screen is a wall of photos. Every item is a card in a masonry grid, and a sidebar of filters narrows the wall down. Click a card, and a detail dialog opens over the grid. I wanted that dialog to have a URL. Copy the address bar, send [...] The post Give a Modal Its Own URL in TanStack Router appeared first on Atomic Spin.