The speed of a single-page web application without having to write any JavaScript
open sourceMITself-hostablefree
Turbo is the heart of Hotwire: a JavaScript library that cuts the custom JavaScript a server-rendered app needs. Turbo Drive turns links and form submissions into fetches that swap the page without a full reload, page refreshes can morph only what changed, Turbo Frames split a page into parts that navigate and lazy-load on their own, and Turbo Streams apply HTML updates (append, replace, remove and so on) sent over WebSocket, server-sent events or in a form response. It works with any backend; the turbo-rails gem wires it into Rails, which uses it by default, and Stimulus covers the interactivity Turbo doesn't. 37signals makes it.
Problems it solves
- make a server-rendered app navigate between pages without full reloads
- submit a form and update just part of the page with HTML the server returns
- lazy-load a slow sidebar or panel separately from the rest of the page
- push new comments to everyone viewing a page over a WebSocket without writing client code
- refresh a page after a change but keep scroll position and only patch what changed
- broadcast changes to records in Rails to every open browser as HTML fragments
- an alternative to writing a React front end for a CRUD app
- scope navigation inside one box on the page, like inline editing, without custom JavaScript
- stream server-sent events that update the page with plain HTML
Features
- Turbo Drive: links and forms without full page reloads
- page refreshes with morphing
- Turbo Frames: independently navigated and lazily loaded page parts
- Turbo Streams: HTML updates over WebSocket, SSE or form responses
- turbo-rails gem with broadcasts from models
- works with any server-side framework
Alternatives
The same job
These do what Turbo does.
- htmx High power tools for HTML
- Phoenix LiveView Rich, real-time user experiences with server-rendered HTML
