100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Web

Turbo (Hotwire)

A set of libraries for building fast, mostly server-rendered web apps without writing much JavaScript

IntermediateFramework8.8K learners

Turbo is the core library of Hotwire, a suite of tools from Basecamp/37signals that lets server-rendered web applications feel like single-page apps by sending HTML over the wire instead of JSON, replacing page fragments without full-page…

#Turbo#Hotwire#Web#Framework#Intermediate#StimulusJs#WebWorkers#WebDevelopment#Glossary#SkillVeris

Definition

Turbo is the core library of Hotwire, a suite of tools from Basecamp/37signals that lets server-rendered web applications feel like single-page apps by sending HTML over the wire instead of JSON, replacing page fragments without full-page reloads.

Overview

Turbo is the successor to Turbolinks and forms the core of Hotwire (HTML Over The Wire), an approach that pushes back against the default assumption that modern web interactivity requires a client-side JavaScript framework and a JSON API. Its central bet is that most of the perceived need for single-page-application architecture is really a need for fast, app-like navigation and partial page updates, both of which can be achieved by having the server send HTML fragments that Turbo swaps into the current page, rather than having the client fetch JSON and re-render it with a framework like React. Turbo is composed of several complementary pieces. Turbo Drive intercepts link clicks and form submissions, fetches the resulting page over an XHR-style request, and merges it into the current document without a full page reload, which is what makes navigation feel instant. Turbo Frames scope updates to specific, named regions of a page, so a single link or form can update just one panel — a comment list, a sidebar — instead of the whole page. Turbo Streams go further, allowing the server to push small HTML fragments, wrapped in simple actions like append, replace, or remove, that get applied to the DOM, which enables real-time updates (often delivered over WebSockets via Action Cable in Rails) without any client-side state management. Hotwire also includes Stimulus, a companion JavaScript framework for the small amount of client-side behavior that HTML-over-the-wire still needs, such as toggling a class or managing a dropdown's open state. Turbo originated inside and is most closely associated with Ruby on Rails, where it's included by default in new applications, but it's framework-agnostic on the server side and has official adapters and community usage in Laravel, Django, Phoenix, and plain server frameworks. Its appeal is largely to teams who want the responsiveness of a modern SPA without maintaining a separate frontend build pipeline, client-side router, or JSON API layer.

Key Features

  • Turbo Drive: full-page navigation without full-page reloads
  • Turbo Frames: scoped, independently updatable regions of a page
  • Turbo Streams: server-pushed HTML fragment updates via simple actions (append, replace, remove)
  • Real-time updates over WebSockets without client-side state management
  • No JSON API layer required — the server renders and sends HTML directly
  • Framework-agnostic on the backend, with deep integration in Ruby on Rails
  • Pairs with Stimulus for lightweight, targeted client-side JavaScript behavior
  • Smaller client-side JavaScript footprint compared to full SPA frameworks

Use Cases

Adding SPA-like navigation speed to a traditional server-rendered web app
Building real-time UI updates (chat, notifications, live comment threads) without a JSON API
Reducing the JavaScript footprint of CRUD-heavy business applications
Modernizing legacy server-rendered applications incrementally
Ruby on Rails applications using the default Hotwire-based stack
Teams that want to avoid maintaining a separate frontend build pipeline

Alternatives

HTMX · HTMX orgReact · MetaAlpine.js · AlpineLiveView · Phoenix

History

Turbo is the core of Hotwire ("HTML Over The Wire"), an approach from 37signals (the makers of Basecamp) for building fast, modern web applications by sending server-rendered HTML rather than JSON plus large client-side JavaScript. Turbo descends from Turbolinks, which in 2012 pioneered swapping the page body while managing history to speed up navigation. Turbo (and the broader Hotwire umbrella) was released in 2021, led by David Heinemeier Hansson; it accelerates page navigation and form submission, and can stream partial-page updates over WebSocket (Turbo Streams). Paired with Stimulus for small amounts of behavior, Turbo lets teams build interactive apps with minimal custom JavaScript.

Frequently Asked Questions