Skip to content

Introduction ​

inertia-ember is an Inertia.js v3 adapter for Ember. It lets you build an Ember front end the way Inertia apps are built with React, Vue or Svelte: your server keeps its routes and controllers, and each response names a page and its props. Ember renders that page as a component.

Browser                         Server (Laravel, Laravel Rust, Rails, Django…)
  click <Link @href="/ideas">  →  GET /ideas  (X-Inertia: true)
                               ←  { component: "Ideas/Index", props: { ideas: … } }
  render pages/Ideas/Index.gts with @props

There's no Ember router, no Ember Data and no API to design. The first visit gets full HTML (rendered on the server, if you turn on SSR); after that, links and forms fetch the next page's props as JSON and Ember swaps the page without a reload.

What you need ​

  • Ember 7. inertia-ember renders with Ember's renderComponent, so it needs ember-source, @glimmer/component and Vite. You don't need ember-cli.
  • Vite, with inertia-ember/vite to compile .gts/.gjs files and decorators.
  • An Inertia v3 server. Any of them works. The demo uses Laravel Rust.

Pages are strict-mode .gts (or .gjs) files. The package is written in TypeScript and ships its types, which Glint checks in templates.

The demo ​

This repository includes "Ideas", a Laravel Rust and Ember app that uses every piece of the adapter: infinite scroll, forms with Precognition, deferred props, live votes over websockets and SSR. Each guide page links to the part of the demo that uses it, and the examples show its full source.

Open the live demo ↗

Released under the MIT License.