playroom / livewire-adapter
Livewire adapter package for PlayRoom built on the Alpine adapter
v1.0.1
2026-04-23 17:02 UTC
Requires
- php: ^8.3
- laravel/framework: ^13.0
- livewire/livewire: ^4.0
README
Laravel package that exposes PlayRoom as a Livewire 4 component.
Requirements
- PHP 8.3+
- Laravel 13+
- Livewire 4+
Installation
Require the package:
composer require playroom/livewire-adapter
Laravel package discovery will register PlayRoom\\LivewirePlayRoom\\LivewirePlayRoomServiceProvider automatically.
Add the package JavaScript entry to your application's vite.config.js inputs so Laravel Vite includes it in the manifest:
laravel({ input: [ 'resources/css/app.css', 'resources/js/app.js', 'vendor/playroom/livewire-adapter/resources/js/playroom-init.js', ], refresh: true, })
Usage
Render the component in Blade:
<livewire:play-room />
Or mount it directly with custom options:
@livewire(\PlayRoom\LivewirePlayRoom\LivewirePlayRoom::class, [ 'playRoomLocale' => 'en', 'playRoomTheme' => 'light', 'playRoomOptions' => [ 'browserStartMode' => 'inline', 'launcher' => [ 'mode' => 'inline', ], 'themeColors' => [ 'primary' => '#0f766e', 'secondary' => '#475569', ], ], 'playRoomUseDefaultGames' => true, 'playRoomDefaultGamesConfig' => [], 'playRoomGameRegistrars' => [], ])
Supported Props
playRoomLocaleplayRoomThemeplayRoomOptionsplayRoomWrapperClassplayRoomContainerClassplayRoomUseDefaultGamesplayRoomDefaultGamesConfigplayRoomGameRegistrars
Notes
- The package loads the
vendor/playroom/livewire-adapter/resources/js/playroom-init.jsVite entry from the consuming Laravel app. - The consuming Laravel app must add that same path to the Vite
inputarray, otherwise the asset will not exist inpublic/build/manifest.json. - This adapter expects the underlying PlayRoom Alpine integration to be available in the host application.
- Locale and theme changes stay synchronized between the PlayRoom instance and Livewire.