turbo
The speed of a single-page web application without having to write any JavaScript
JavaScript library from 37signals that makes server-rendered web apps feel instant by intercepting link clicks and updating only the changed parts of the page, with no full reloads and no custom JavaScript needed.
Turbo is a JavaScript library that makes web applications feel faster without requiring developers to write large amounts of custom JavaScript. It was created by 37signals, the company behind Basecamp and Hey, and is part of a broader toolkit called Hotwire.
The core idea is that instead of rebuilding an entire page every time a user clicks a link or submits a form, Turbo intercepts those actions and updates only the parts of the page that actually changed. This produces a fast, fluid experience without the complexity of building a fully JavaScript-driven application from scratch.
Turbo is made up of four main components. Turbo Drive handles link clicks and form submissions, preventing full page reloads so navigation feels instant. Turbo Frames let you divide a page into independent sections, each of which can load separately or update on its own without disturbing the rest of the page. Turbo Streams push live updates directly to the page, either through a persistent WebSocket connection or in response to form actions, using ordinary HTML rather than custom JavaScript logic. Turbo Native connects a server-rendered web application to native iOS and Android apps, allowing the same backend to power both the web and mobile versions with smooth transitions between the two.
All of these techniques work by sending HTML from the server to the browser, rather than sending raw data and letting the browser reconstruct the page. For situations where that approach is not enough and more interactive behavior is needed, Turbo is designed to pair with Stimulus, another Hotwire library that handles specific JavaScript interactions in a structured way.
The project is open source and documentation is available at turbo.hotwired.dev.
Where it fits
- Add fast, app-like navigation to a traditional Rails or Django app without building a JavaScript SPA.
- Push live database updates to all connected users in real time using Turbo Streams over WebSockets.
- Split a page into independent sections that each load or refresh on their own without disturbing the rest of the page.
- Wrap a server-rendered web app inside a native iOS or Android shell with smooth transitions using Turbo Native.