# TurboMount

> Add components from React, Vue, Svelte, and other frameworks to your Hotwire application.

- URL: https://evilmartians.com/opensource/turbo-mount
- GitHub: https://github.com/skryukov/turbo-mount
- Authors: Svyatoslav Kryukov

---

TurboMount is a simple library that allows you to add highly interactive components from React, Vue, Svelte, and other frameworks to your Hotwire application.

Add the turbo-mount gem to your Gemfile:

```ruby
gem 'turbo-mount'
```

If your project uses build tools like Vite, also install the turbo-mount npm package:

```bash
yarn add turbo-mount
```

Import the necessary modules and initialize TurboMount with your application and the desired plugin:

```js
import { Application } from "@hotwired/stimulus";
import { TurboMount } from "turbo-mount";
import plugin from "turbo-mount/react";
import { SketchPicker } from 'react-color';

const application = Application.start();
const turboMount = new TurboMount({ application, plugin });
turboMount.register('SketchPicker', SketchPicker);
```

And finally, add the component to your view:

```erb
<%= turbo_mount_react_component("SketchPicker", props: {color: "#430"}) %>
```
