Skip to main content
You can use FLEX components inside a custom dialog without adding Filament modal classes or copying the components’ templates. Render each child with its ordinary asset consumer boundary. Keep the closed container dormant from its first render:
Register the container from an active host component, rather than from a child inside that closed container. Import the public SDK through the SDK build adapter:
activate() resolves true after the currently active children’s CSS and factory initialization are ready. Calling it again while opening returns the same pending operation. Closing, suspending, disconnecting or disposing that operation resolves it false; a late response cannot reopen the container. An active preparation failure rejects the promise. Calling activate() again retries failed active factories after their assets are prepared. Always check surface.ready before revealing the container, including when consuming a previously resolved promise. The registered container may stay hidden while preparing. This does not activate closed tabs, collapsed sections or other dormant descendants. An inactive ancestor outside the registered container still prevents readiness. Closed containers have no asset demand, while suspended parents retain their current asset references. For a child rendered elsewhere in the document, pass the parent’s handle explicitly:
A child cannot activate after its parent closes. Closing the child preserves the suspended parent’s and underlying page’s assets. Disposing the parent invalidates its child handles. DOM moves within the document preserve registrations; a disconnected root or a replaced page body disposes old registrations. Register each root once, in its own document. Native Filament modal roots use the existing Filament adapter. The document runtime admits up to 256 custom surfaces; release registrations with a host signal or dispose() when no longer needed. Your dialog continues to own its markup, animation, focus management, accessibility, scroll locking and retry presentation. Closing a surface releases asset ownership; it does not destroy mounted child factories or unload evaluated JavaScript. Remove the child’s DOM through its framework when it should be unmounted.

Continue reading

SDK reference · Lifecycle events
Last modified on October 17, 2026