Skip to content

Build frontend experiences with the backend you love

Build single-page applications using your existing Rails controllers, routes, and authentication. No API required.

users_controller.rb
class UsersController < ApplicationController
  def index
    render inertia: {
      users: User.active.map do |user|
        user.as_json(only: [:id, :name, :email])
      end
    }
  end
end
import { Link } from '@inertiajs/react'

const Users = ({ users }: { users: User[] }) => (
  <>
    {users.map((user) => (
      
{user.name}

{user.email}

))} ); export default Users;
users_controller.rb
class UsersController < ApplicationController
  def index
    render inertia: {
      users: User.active.map do |user|
        user.as_json(only: [:id, :name, :email])
      end
    }
  end
end
import { Link } from '@inertiajs/react'

const Users = ({ users }: { users: User[] }) => (
  <>
    {users.map((user) => (
      
{user.name}

{user.email}

))} ); export default Users;
The Inertia Way

Your controllers. Your routes. Modern components.

Pass data from Rails directly to React, Vue, or Svelte as props. No REST endpoints. No GraphQL. No state management headaches.

Get started

Add to your existing Rails app or jump in with a ready-to-use starter kit.

Add to existing app

1
bundle add inertia_rails
2
bin/rails g inertia:install

Configures Vite, your chosen framework, and creates example pages.

Start with a kit

Authentication, Vite, optional SSR, and Kamal deployment included.

bundle add inertia_rails
bin/rails g inertia:install

Built for real Rails apps

Form handling, SSR, testing helpers, and more. Everything you need to ship production apps with confidence.

Why Inertia?

Inertia sits between traditional server-rendered apps and full SPAs. Here's how it compares.

vs Hotwire

Same monolith, different view layer

Both keep you in Rails. Inertia gives you the full React/Vue/Svelte ecosystem.

HotwireInertia
View layerERB + StimulusReact/Vue/Svelte
InteractivityHTML fragmentsFull component state
UI librariesBuild your ownnpm ecosystem

Hotwire for minimal JS and server HTML.
Inertia for modern component architecture.

vs API + SPA

Same frontend, no API hassle

Both give you React/Vue/Svelte. Inertia removes the API layer entirely.

API + SPAInertia
RoutingTwo routersRails only
AuthJWT/OAuth danceRails sessions
DataFetch in useEffectProps from controller

API + SPA for public APIs or mobile apps.
Inertia for focused web products.

Frequently asked questions

Common questions about using Inertia with Rails.

No. Controllers pass data directly to components as props—no endpoints, no client-side fetching. Need a public API later? Add it alongside Inertia whenever you want.

Yes. Devise, Clearance, custom auth—whatever you use today works unchanged. Inertia uses Rails sessions, so there's no token management to deal with.

SSR gives you fast first paint and full SEO. It runs a small Node.js process alongside Rails—the starter kits set this up for you.

Yes. ERB views and Inertia pages coexist fine. Convert one page at a time. No big-bang rewrite required.

No. Inertia started in the Laravel ecosystem, but this adapter is actively maintained and works the same way.

Wrap your Inertia app with Capacitor for native mobile/desktop—no API needed. Or add API endpoints alongside Inertia—they work fine together.

Yes. Partial reloads, code splitting, and deferred props keep large apps fast. Load only what you need, when you need it.

Join the community

Get help, share what you're building, and learn from real-world Inertia Rails applications.