Proposal: Support for multiple "slot-based" outlets in TanStack Router #5397
discoverlance-com
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi maintainers,
I’d like to discuss a potential enhancement for the router: support for multiple, named outlets (or “slots”) in a parent route. Currently,
Outlet
only allows rendering child content in one place, which works well for simple nested routes. However, some layout use cases could benefit from being able to target multiple regions in the parent layout.For example, consider a root layout with a sidebar and main content area:
Here, the main content still uses the existing
Outlet
, but the sidebar is a named slot. Child routes could then populate these slots independently, for example, suppose we have/employees
and/admin
routes which are children of theRootLayout
above:Benefits of this approach:
I’d love to hear feedback from the community:
Thanks for considering!
Beta Was this translation helpful? Give feedback.
All reactions