Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hotwired/turbo

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hotwired/turbo

The speed of a single-page web application without having to write any JavaScript

  • 7.0.0-rc.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
318K
decreased by-6.31%
Maintainers
2
Weekly downloads
 
Created

What is @hotwired/turbo?

@hotwired/turbo is a JavaScript framework that provides a set of tools to build modern web applications with minimal JavaScript. It focuses on enhancing the speed and responsiveness of web applications by handling navigation, form submissions, and more, without requiring a full page reload.

What are @hotwired/turbo's main functionalities?

Turbo Drive

Turbo Drive makes navigation faster by using AJAX to load new pages, replacing the body, and updating the history without a full page reload.

<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/@hotwired/turbo@7.1.0/dist/turbo.min.js"></script>
</head>
<body>
  <a href="/next_page">Next Page</a>
</body>
</html>

Turbo Frames

Turbo Frames allow you to update parts of a page without a full reload. Clicking the link inside the frame will only update the content of that frame.

<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/@hotwired/turbo@7.1.0/dist/turbo.min.js"></script>
</head>
<body>
  <turbo-frame id="frame">
    <a href="/next_content">Load Content</a>
  </turbo-frame>
</body>
</html>

Turbo Streams

Turbo Streams enable real-time updates to parts of the page by sending HTML fragments over WebSockets or other channels. The example appends a new message to the target element with id 'messages'.

<turbo-stream action="append" target="messages">
  <template>
    <div id="message_1">Hello, World!</div>
  </template>
</turbo-stream>

Turbo Native

Turbo Native allows you to use Turbo in native mobile applications, providing a seamless experience between web and mobile. The example shows how to navigate to a URL in a Turbo-enabled Android app.

// In a native mobile app
import { Turbo } from '@hotwired/turbo-android'

Turbo.visit("https://example.com")

Other packages similar to @hotwired/turbo

Keywords

FAQs

Package last updated on 23 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc