PHPackages                             playroom/filament-adapter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. playroom/filament-adapter

ActiveLibrary[Admin Panels](/categories/admin)

playroom/filament-adapter
=========================

PlayRoom plugin and widget for Filament v5

v1.0.0(3mo ago)061MITPHPPHP ^8.3

Since Apr 23Pushed 3mo agoCompare

[ Source](https://github.com/Play-Room/filament-adapter)[ Packagist](https://packagist.org/packages/playroom/filament-adapter)[ RSS](/packages/playroom-filament-adapter/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

[![playroom_2560x1440_no_crop](https://private-user-images.githubusercontent.com/100382372/583790432-177650c3-9504-47ac-8828-8dad83aca92f.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODkzOTAsIm5iZiI6MTc4Mjk4OTA5MCwicGF0aCI6Ii8xMDAzODIzNzIvNTgzNzkwNDMyLTE3NzY1MGMzLTk1MDQtNDdhYy04ODI4LThkYWQ4M2FjYTkyZi5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQxMDQ0NTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NjJjY2I4OTkyODAwZWJkZGRjZDkxMzFmZWViYTMxZjdjMTE4NDhjYzMzZWY4YTJiYzc3ZWUwMzhlNDYzYjBjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZqcGVnIn0.CdC6d63xYrqZwZe8kcj9tSX-30tdHKDJba0LIDxBBZ0)](https://private-user-images.githubusercontent.com/100382372/583790432-177650c3-9504-47ac-8828-8dad83aca92f.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODkzOTAsIm5iZiI6MTc4Mjk4OTA5MCwicGF0aCI6Ii8xMDAzODIzNzIvNTgzNzkwNDMyLTE3NzY1MGMzLTk1MDQtNDdhYy04ODI4LThkYWQ4M2FjYTkyZi5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQxMDQ0NTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NjJjY2I4OTkyODAwZWJkZGRjZDkxMzFmZWViYTMxZjdjMTE4NDhjYzMzZWY4YTJiYzc3ZWUwMzhlNDYzYjBjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZqcGVnIn0.CdC6d63xYrqZwZe8kcj9tSX-30tdHKDJba0LIDxBBZ0)PlayRoom Filament Adapter
=========================

[](#playroom-filament-adapter)

Filament v5 plugin and widget package for embedding PlayRoom in a panel.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 13+
- Filament 5+
- Livewire 4+

Installation
------------

[](#installation)

Require the Filament adapter with Composer:

```
composer require playroom/filament-adapter:^1.0
```

Laravel package discovery will register `PlayRoom\\FilamentPlayRoom\\FilamentPlayRoomServiceProvider` automatically.

Register The Plugin
-------------------

[](#register-the-plugin)

Register the plugin in your Filament panel provider:

```
use Filament\Panel;
use PlayRoom\FilamentPlayRoom\PlayRoomPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            PlayRoomPlugin::make(),
        ]);
}
```

The default plugin configuration mounts a floating PlayRoom launcher in the bottom-right corner of the panel.

Package Classes
---------------

[](#package-classes)

### `FilamentPlayRoomServiceProvider`

[](#filamentplayroomserviceprovider)

This service provider is registered through Laravel package discovery.

#### `boot(): void`

[](#boot-void)

- Loads the package views under the `filament-play-room::` namespace.
- This is the method that makes `filament-play-room::global` and `filament-play-room::widget` available to the host application.

### `PlayRoomPlugin`

[](#playroomplugin)

This is the primary Filament integration for mounting PlayRoom globally in a panel.

#### `make(): static`

[](#make-static)

- Factory method that returns a preconfigured plugin instance.
- Applies the package defaults for a floating launcher.
- Sets launcher position to `bottom-right`.
- Sets default floating panel dimensions.
- Enables persistence with the default storage key `playroom:floating-demo`.

#### `getId(): string`

[](#getid-string)

- Returns the plugin identifier: `playroom`.
- Filament uses this as the unique plugin id for the panel.

#### `register(Panel $panel): void`

[](#registerpanel-panel-void)

- Registers a Filament render hook on `PanelsRenderHook::BODY_END`.
- Injects the package global view so PlayRoom is rendered across the panel.
- Passes the configured locale, theme, options, default-game config, and game registrars into the global Livewire mount.

#### `boot(Panel $panel): void`

[](#bootpanel-panel-void)

- Present for Filament's plugin contract.
- Currently does not perform additional runtime work.

Use The Widget
--------------

[](#use-the-widget)

Add the widget to a dashboard or panel widget list:

```
use PlayRoom\FilamentPlayRoom\PlayRoomWidget;

public function getWidgets(): array
{
    return [
        PlayRoomWidget::class,
    ];
}
```

### `PlayRoomWidget`

[](#playroomwidget)

Use this when you want PlayRoom rendered as an explicit dashboard widget instead of a global floating launcher.

#### `canView(): bool`

[](#canview-bool)

- Always returns `true`.
- The widget is visible whenever the widget is registered in Filament.

The widget renders the package view `filament-play-room::widget`, which mounts the shared Livewire component with the widget's current configuration.

Customization
-------------

[](#customization)

Both `PlayRoomPlugin` and `PlayRoomWidget` use the shared configuration API from the Livewire adapter, so you can chain methods such as:

```
PlayRoomPlugin::make()
    ->locale('en')
    ->theme('dark')
    ->floating()
    ->launcher([
        'position' => 'bottom-right',
        'panelWidth' => 'min(520px, calc(100vw - 2rem))',
        'panelHeight' => 'min(78vh, 760px)',
    ])
    ->persistence([
        'enabled' => true,
        'storageKey' => 'playroom:floating-demo',
    ]);
```

Configuration API Reference
---------------------------

[](#configuration-api-reference)

The following methods are provided by the shared `ConfiguresPlayRoom` trait used by both `PlayRoomPlugin` and `PlayRoomWidget`.

### State Synchronization Methods

[](#state-synchronization-methods)

#### `onLocaleChanged(mixed $payload = null): void`

[](#onlocalechangedmixed-payload--null-void)

- Handles the `playroom-locale-changed` Livewire event.
- Accepts a string payload or an array containing `locale` or `value`.
- Ignores invalid or empty values.

#### `onThemeChanged(mixed $payload = null): void`

[](#onthemechangedmixed-payload--null-void)

- Handles the `playroom-theme-changed` Livewire event.
- Accepts a string payload or an array containing `theme` or `value`.
- Only accepts `light` or `dark`.

#### `syncPlayRoomLocale(string $locale): void`

[](#syncplayroomlocalestring-locale-void)

- Convenience method that forwards a locale update through `onLocaleChanged()`.
- Useful when the frontend needs to push the current locale back into Livewire state.

#### `syncPlayRoomTheme(string $theme): void`

[](#syncplayroomthemestring-theme-void)

- Convenience method that forwards a theme update through `onThemeChanged()`.
- Useful when the frontend needs to push the current theme back into Livewire state.

### Read Methods

[](#read-methods)

#### `playRoomOptions(): array`

[](#playroomoptions-array)

- Returns the resolved PlayRoom options array.
- Merges the stored option set with the current `locale` and `theme`.

#### `playRoomDefaultGamesConfig(): array`

[](#playroomdefaultgamesconfig-array)

- Returns the configured default game definitions.

#### `playRoomGameRegistrars(): array`

[](#playroomgameregistrars-array)

- Returns the list of JavaScript registrar function names that should be called when PlayRoom initializes.

#### `isFloating(): bool`

[](#isfloating-bool)

- Returns `true` when the current launcher mode is `floating`.
- Returns `false` for inline mode.

### Layout Methods

[](#layout-methods)

#### `wrapperClass(string $wrapperClass): static`

[](#wrapperclassstring-wrapperclass-static)

- Sets the CSS classes applied to the outer PlayRoom wrapper element.

#### `containerClass(string $containerClass): static`

[](#containerclassstring-containerclass-static)

- Sets the CSS classes applied to the inner PlayRoom container element.

#### `inline(): static`

[](#inline-static)

- Switches PlayRoom into inline mode.
- Sets `browserStartMode` to `inline`.
- Sets the launcher mode to `inline`.

#### `floating(): static`

[](#floating-static)

- Switches PlayRoom into floating modal mode.
- Sets `browserStartMode` to `modal`.
- Sets the launcher mode to `floating`.

#### `browserStartMode(string $mode): static`

[](#browserstartmodestring-mode-static)

- Sets the raw PlayRoom browser start mode.
- The package currently uses `inline` and `modal`.

#### `launcher(array $launcher): static`

[](#launcherarray-launcher-static)

- Merges launcher settings into the current launcher configuration.
- Common keys include `mode`, `position`, `panelWidth`, `panelHeight`, and `startOpen`.

#### `persistence(array $persistence): static`

[](#persistencearray-persistence-static)

- Merges persistence settings into the current persistence configuration.
- Expected keys are `enabled` and `storageKey`.

#### `draggableModal(bool $draggable = true): static`

[](#draggablemodalbool-draggable--true-static)

- Enables or disables dragging for the floating PlayRoom modal.

#### `resizableModal(bool|array $config = true): static`

[](#resizablemodalboolarray-config--true-static)

- Enables or disables modal resizing when passed a boolean.
- Accepts a detailed configuration array when you need to customize min, base, or max width and height values.

### Locale And Theme Methods

[](#locale-and-theme-methods)

#### `locale(string $locale): static`

[](#localestring-locale-static)

- Sets the active locale.
- Trims the input and falls back to `en` when an empty string is provided.

#### `localeOptions(array $options): static`

[](#localeoptionsarray-options-static)

- Replaces the locale switcher options.
- Each item should contain `value` and `label` keys.

#### `localeMessages(array $messages): static`

[](#localemessagesarray-messages-static)

- Sets translated message dictionaries keyed by locale.
- Use this when the embedded PlayRoom UI needs custom copy per language.

#### `showLocaleSwitcher(bool $show = true): static`

[](#showlocaleswitcherbool-show--true-static)

- Shows or hides the locale switcher in the PlayRoom UI.

#### `theme(string $theme): static`

[](#themestring-theme-static)

- Sets the active theme.
- Any value other than `dark` resolves to `light`.

#### `showThemeSwitcher(bool $show = true): static`

[](#showthemeswitcherbool-show--true-static)

- Shows or hides the theme switcher in the PlayRoom UI.

#### `themeColors(array $colors): static`

[](#themecolorsarray-colors-static)

- Merges custom theme colors into the PlayRoom options.
- Supports `primary` and optional `secondary` keys.

### Game Registration Methods

[](#game-registration-methods)

#### `useDefaultGames(bool $use = true): static`

[](#usedefaultgamesbool-use--true-static)

- Enables or disables registration of the package's default games.

#### `defaultGamesConfig(array $config): static`

[](#defaultgamesconfigarray-config-static)

- Merges per-game configuration into the default games config array.
- Use this to override settings for built-in games.

#### `registerGameRegistrar(string $registrar): static`

[](#registergameregistrarstring-registrar-static)

- Adds a JavaScript registrar function name to the initialization pipeline.
- Duplicate registrar names are ignored.

### Generic Option Methods

[](#generic-option-methods)

#### `option(string $key, mixed $value): static`

[](#optionstring-key-mixed-value-static)

- Sets a single top-level PlayRoom option by key.

#### `options(array $options): static`

[](#optionsarray-options-static)

- Deep-merges an array of top-level PlayRoom options into the existing configuration.

Default Configuration
---------------------

[](#default-configuration)

The shared defaults used by the Filament package are:

- Locale: `en`
- Theme: `light`
- Wrapper class: `h-[42rem] overflow-hidden rounded-lg border`
- Container class: `h-full w-full`
- Browser start mode: `inline`
- Launcher mode: `inline`
- Persistence: disabled by default in the trait, enabled by default in `PlayRoomPlugin::make()`
- Draggable modal: disabled
- Resizable modal: enabled
- Default locale options: English, Srpski, Francais
- Locale switcher: enabled
- Theme switcher: enabled
- Theme colors: primary `#0f766e`, secondary `#475569`

Example Configurations
----------------------

[](#example-configurations)

### Inline Widget Configuration

[](#inline-widget-configuration)

```
use PlayRoom\FilamentPlayRoom\PlayRoomWidget;

class DemoPlayRoomWidget extends PlayRoomWidget
{
    public function mount(): void
    {
        $this
            ->inline()
            ->locale('en')
            ->theme('light')
            ->showThemeSwitcher(false)
            ->themeColors([
                'primary' => '#1d4ed8',
                'secondary' => '#0f172a',
            ]);
    }
}
```

### Floating Plugin Configuration

[](#floating-plugin-configuration)

```
use PlayRoom\FilamentPlayRoom\PlayRoomPlugin;

PlayRoomPlugin::make()
    ->floating()
    ->draggableModal()
    ->resizableModal([
        'enabled' => true,
        'size' => [
            'width' => ['min' => '480px', 'base' => '80vw', 'max' => '96vw'],
            'height' => ['min' => '360px', 'base' => '78vh', 'max' => '92vh'],
        ],
    ])
    ->persistence([
        'enabled' => true,
        'storageKey' => 'playroom:admin-panel',
    ])
    ->registerGameRegistrar('registerAdminPlayRoomGames');
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance82

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

92d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/211412089?v=4)[ZPM Labs](/maintainers/zpmlabs)[@ZPMLabs](https://github.com/ZPMLabs)

---

Top Contributors

[![sasaorasanin](https://avatars.githubusercontent.com/u/100382372?v=4)](https://github.com/sasaorasanin "sasaorasanin (4 commits)")

### Embed Badge

![Health badge](/badges/playroom-filament-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/playroom-filament-adapter/health.svg)](https://phpackages.com/packages/playroom-filament-adapter)
```

###  Alternatives

[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.8k2](/packages/crumbls-layup)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3991.8k](/packages/codewithdennis-larament)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
