Inertia X adds Frames to Inertia 3 — Perplexity Tips &…
    Neura MarketNeura Market/Perplexity
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    PerplexityBlogInertia X adds Frames to Inertia 3
    Back to Blog
    Inertia X adds Frames to Inertia 3
    javascript

    Inertia X adds Frames to Inertia 3

    Stefan Buhrmester June 1, 2026
    0 views

    Update: You might also be interested in Inertia X UI, a UI layer built on top of Inertia X. It has...

    Update: You might also be interested in Inertia X UI, a UI layer built on top of Inertia X.

    It has been a long time coming, but after countless hours of refactoring, testing, and completely rethinking how we orchestrate monolithic single-page applications, I am very excited to finally type npm publish.

    Inertia X.11 is a fork of Inertia 3 that adds the Frame component to the Svelte adapter.

    You can check out the source code, read the documentation, and grab the package right now on GitHub: github.com/buhrmi/inertiax.

    If you’ve been following the project, you know that the landscape shifted dramatically with the arrival of the Inertia 3.x branch. To ensure complete alignment with these fundamental core upgrades and Svelte’s modern architecture, I made a tough but necessary decision: Inertia X.11 is a complete rewrite from scratch. By avoiding fragile monkey-patching and building natively on top of the newest Inertia 3 foundation, Inertia X.11 is cleaner, strictly typed, and incredibly fast. Here is a deep dive into why you should use it, what has changed, and how it works.


    The Core Problem: The Singleton Limitation

    Standard Inertia.js is brilliant, but it introduces a major architectural constraint: the global singleton router. Standard Inertia assumes your entire app has exactly one router and one active page state.

    Because of this, building complex interfaces—like slide-over panels, nested application wizards, or dynamic sidebars that pull live server data without resetting the rest of the application UI—can turn into a developer nightmare. You’re often forced to ditch the Inertia paradigm entirely and build custom JSON API endpoints or pollute your global page props.

    Inertia X.11 shatters this limitation. It adds a first-class <Frame> component to the Svelte adapter, giving you the ability to spin up multiple independent Inertia page regions on the exact same document. Each frame owns its own router and page state, ensuring that forms and links executed inside a frame only update that specific frame.


    What’s New and Changed in X.11?

    If you used previous iterations of Inertia X, things look vastly different now that we are built on top of Inertia 3:

    • Explicit, First-Class Hooks: Instead of manually digging through global store lookups, X.11 introduces clear, modern hooks like useFrameRouter() and useFrameContext().
    • Smart Browser History Tracking: By default, actions taken within non-top frames update that frame's history state without replacing or mangling the browser URL. If you want a frame navigation to explicitly change the address bar, you now explicitly pass updateBrowserUrl: true.
    • Automatic Link Interception: Inertia X.11 introduces a global click handler that automatically intercepts standard same-origin <a> tags clicked within a frame, turning them into frame-scoped visits without requiring any boilerplate.
    • X-Inertia-Referer Header: To support clean server-side redirect_back behavior inside isolation, Inertia X now automatically sends an X-Inertia-Referer header containing the frame’s src URL.

    Useful Examples

    Using Inertia X.11 feels exactly like standard Inertia, but with superpowers. Here is how you can use the new syntax in your projects today:

    1. Basic Frame Loading

    Need to load a dynamic sub-page or sidebar? Simply place a <Frame> component. You can pass a fallback snippet inside it to handle loading states smoothly.

    <script>
      import { Frame } from 'inertiax-svelte';
    </script>
    
    <div class="app-layout">
      <main>
        <h1>Dashboard Home</h1>
      </main>
    
      <aside>
        <Frame id="sidebar" src="/users/42/edit">
          <p>Loading user profile...</p>
        </Frame>
      </aside>
    </div>
    
    

    2. Accessing the Local Router

    Inside a component rendered within a frame, you can seamlessly control navigation utilizing useFrameRouter(). The top-level global router remains accessible through the standard import.

    <script lang="ts">
      import { useFrameRouter } from 'inertiax-svelte';
    
      const router = useFrameRouter();
    
      function nextStep() {
        // Navigates strictly inside this frame
        router.get('/wizard/step-2');
      }
    </script>
    
    <button on:click={nextStep}>Next Step</button>
    
    

    3. Controlling a Frame From Somewhere Else

    Sometimes a parent layout or a main data table needs to trigger an event inside a secondary panel (like a detail slider). You can target a frame using frameId in your visit options:

    <script lang="ts">
      import { router } from 'inertiax-svelte';
    
      function openDetailsPanel(userId: number) {
        router.get(`/users/${userId}/details`, {}, { frameId: 'details' });
      }
    </script>
    
    <button on:click={() => openDetailsPanel(42)}>View Details</button>
    
    

    Alternatively, if you prefer explicit control, you can instantiate a dedicated router and pass it directly to the frame:

    <script lang="ts">
      import { createRouter, Frame } from 'inertiax-svelte';
    
      const detailsRouter = createRouter('details');
    
      function showUser(userId: number) {
        detailsRouter.visit(`/users/${userId}/details`);
      }
    </script>
    
    <button on:click={() => showUser(42)}>Show User</button>
    
    <Frame id="details" router={detailsRouter} src="/users/42/details">
      <p>Loading details...</p>
    </Frame>
    
    

    4. Customizing Link Interception

    Because standard <a> tags are intercepted automatically inside frames, building navigation is incredibly clean. If you want a specific link to bypass Inertia entirely, just use data-inertia-ignore. You can also intercept links programmatically using the onClickLink prop:

    <script lang="ts">
      import { Frame } from 'inertiax-svelte';
    
      function onClickLink(event: MouseEvent, href: string) {
        if (href.startsWith('/admin')) {
          event.preventDefault(); // Stop frame navigation for admin routes
          // Implement custom routing or alert logic here
        }
      }
    </script>
    
    <Frame id="sidebar" src="/users/42/edit" {onClickLink} />
    
    

    Installation & Migration

    Because Inertia X.11 is a complete replacement ecosystem built over Inertia 3, migrating means swapping out the core packages. Your backend adapters (Laravel, Rails, Go, etc.) require zero changes!

    # Using npm
    npm remove @inertiajs/svelte @inertiajs/vite @inertiajs/core
    npm install inertiax-svelte inertiax-vite inertiax-core
    
    

    Next, update your imports across your project files:

    • Change @inertiajs/svelte -> inertiax-svelte
    • Change @inertiajs/core -> inertiax-core
    • Change @inertiajs/vite -> inertiax-vite

    Wrapping Up

    Rewriting Inertia X from scratch for the 3.x branch was a massive undertaking, but the result is a bulletproof development experience. You no longer have to fight the framework to build complex, multi-region web applications.

    Go check out the code on GitHub, install the package, and let me know what incredible interfaces you create with it!

    Tags

    javascriptopensourceshowdevwebdev

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest Perplexity prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Perplexity and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Perplexity resource

    • Automate SEO-Optimized Blog Creation with GPT-4, Perplexity AI & Multi-Language Supportn8n · $24.99 · Related topic
    • Automate SEO Blog Content Creation with GPT-4, Perplexity AI, and WordPressn8n · $24.99 · Related topic
    • Automate SEO Blog Creation + Social Media with GPT-4, Perplexity, and WordPressn8n · $24.99 · Related topic
    • Auto-Generate SEO Blog Posts with Perplexity, GPT, Leonardo & WordPressn8n · $14.99 · Related topic
    Browse all workflows