https://github.com/simotod/alpine-turbo-drive-adapter
Bridge library to enable full support for Alpine components in pages using Turbolinks
https://github.com/simotod/alpine-turbo-drive-adapter
alpinejs javascript turbolinks
Last synced: 6 months ago
JSON representation
Bridge library to enable full support for Alpine components in pages using Turbolinks
- Host: GitHub
- URL: https://github.com/simotod/alpine-turbo-drive-adapter
- Owner: SimoTod
- License: mit
- Created: 2020-06-21T13:13:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-04-27T17:14:05.000Z (about 1 year ago)
- Last Synced: 2025-05-20T05:02:56.167Z (about 1 year ago)
- Topics: alpinejs, javascript, turbolinks
- Language: JavaScript
- Homepage:
- Size: 1.57 MB
- Stars: 229
- Watchers: 5
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Alpine Turbo Drive Adapter
[](https://www.npmjs.com/package/alpine-turbo-drive-adapter)
[](https://bundlephobia.com/result?p=alpine-turbo-drive-adapter)
[](https://www.jsdelivr.com/package/npm/alpine-turbo-drive-adapter)
[](https://www.npmjs.com/package/alpine-turbo-drive-adapter)
[](https://github.com/sponsors/SimoTod)
Alpine-turbo-drive-adapter allows you to add support for Alpine.js V3 to your Turbolinks/Turbo powered apps.
It handles events to properly clean up the DOM from Alpine generated code when navigating between pages.
If you look for the Alpine v2 version, look at the [1.x branch](https://github.com/SimoTod/alpine-turbo-drive-adapter/tree/1.x).
## Install
### From CDN
Just include `` before your Alpine script in your page
### From NPM
Install the package
```bash
npm i alpine-turbo-drive-adapter
```
Include it in your script along with Alpine JS (make sure Alpine is available on the window object).
```javascript
import 'alpine-turbo-drive-adapter'
import Alpine from 'alpinejs'
window.Alpine = Alpine
```