https://github.com/miii/turbo-multiple-frame-targeting
💎 Add support for multiple frame targeting in Turbo. Alternative solution to implementing Turbo streams in situations where refactoring otherwise may be required.
https://github.com/miii/turbo-multiple-frame-targeting
frames hotwired multiple turbo turbo-frame turbo-frames
Last synced: 11 months ago
JSON representation
💎 Add support for multiple frame targeting in Turbo. Alternative solution to implementing Turbo streams in situations where refactoring otherwise may be required.
- Host: GitHub
- URL: https://github.com/miii/turbo-multiple-frame-targeting
- Owner: miii
- Created: 2023-06-18T19:41:53.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T22:45:07.000Z (over 2 years ago)
- Last Synced: 2025-06-08T17:40:53.981Z (12 months ago)
- Topics: frames, hotwired, multiple, turbo, turbo-frame, turbo-frames
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@miii/turbo-multiple-frame-targeting
- Size: 105 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @miii/turbo-multiple-frame-targeting
> Add support for multiple frame targeting in Turbo
## 💡 Motivation
See [hotwired/turbo#475](https://github.com/hotwired/turbo/issues/475) and [hotwired/turbo#56](https://github.com/hotwired/turbo/issues/56).
This is an alternative solution to implementing Turbo streams in situations where refactoring otherwise may be required.
## 📦 Setup
```sh
$ npm install @miii/turbo-multiple-frame-targeting
```
```js
import * as Turbo from '@hotwired/turbo'
import enableMultiFrameSupport from '@miii/turbo-multiple-frame-targeting'
Turbo.start()
enableMultiFrameSupport()
```
### Alternative setup
```js
import * as Turbo from '@hotwired/turbo'
import { enable, disable } from '@miii/turbo-multiple-frame-targeting'
Turbo.start()
enable()
// Later...
disable()
```
## 🚀 Usage
This package will enable you to provide a space-separated list of identifiers, much like [Stimulus](https://stimulus.hotwired.dev/reference/controllers#multiple-controllers).
```html
...
...
```