A Rails gem that integrates Turbo to build fast, modern web applications with minimal JavaScript.
Turbo for Rails is a gem that integrates the Turbo framework into Ruby on Rails applications to deliver fast, modern web experiences with minimal JavaScript. It accelerates navigation, enables partial page updates, and supports real-time features using server-rendered HTML. The framework reduces the need for custom JavaScript by handling interactions like link clicks, form submissions, and WebSocket updates automatically.
Ruby on Rails developers building full-stack web applications who want to improve performance and interactivity without writing extensive frontend JavaScript. It's also suitable for teams creating hybrid mobile apps that embed web views within native shells.
Developers choose Turbo for Rails because it provides a seamless, integrated way to achieve single-page application speed using existing Rails templates and server-side logic. Its tight Rails integration, support for real-time updates via Action Cable, and ability to decompose pages into independent frames reduce complexity and accelerate development.
Use Turbo in your Ruby on Rails app
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides Rails-specific helpers like `turbo_frame_tag` and `turbo_stream_from`, and integrates with Action Cable for real-time updates without building a separate JSON API, as highlighted in the README's usage examples.
Accelerates link clicks, form submissions, and page updates using server-rendered HTML through Turbo Drive and Frames, reducing custom JavaScript needs by an order of magnitude, per the project philosophy.
Enables asynchronous page updates over WebSockets with Turbo Streams, allowing reactive features like live notifications using existing Rails templates and model callbacks for broadcasts.
Forms the foundation for embedding web views in native Android or iOS apps with native navigation patterns, letting developers reuse web features without rewriting them in Swift or Kotlin.
Testing Turbo Stream broadcasts requires managing WebSocket connections in system tests, with the README noting flaky tests and the need for special helpers like `connect_turbo_cable_stream_sources` and configuration tweaks.
Heavily dependent on Rails infrastructure and conventions, making it unsuitable for applications that might transition to other backends or use non-Rails frontends, as the gem is built specifically for Rails integration.
Requires adjustments to custom layout resolution methods to handle turbo frame requests properly, adding complexity to view rendering, as warned in the README's section on custom layouts.