Modal

Modal - A UI component for displaying modal dialogs and overlays.

This component provides:

  • Modal dialog functionality

  • Backdrop/overlay support

  • Customizable content

  • Animation support (fade in/out, slide in/out)

  • Dismissible by backdrop click or close button

  • Responsive sizing and positioning

Constructors

Link copied to clipboard
constructor(options: ModalOptions)

Properties

Link copied to clipboard
open override val children: StateFlow<List<MediaSfuUIComponent>>

Get all child components.

Link copied to clipboard
open override val currentStyle: ComponentStyle

Get the current style of this component.

Link copied to clipboard
open override val id: String

Unique identifier for this UI component.

Link copied to clipboard
open override val isAnimating: StateFlow<Boolean>

Whether an animation is currently running.

Link copied to clipboard
open override val isEnabled: Boolean

Whether this component is currently enabled.

Link copied to clipboard
val isOpen: StateFlow<Boolean>
Link copied to clipboard
open override val isVisible: Boolean

Whether this component is currently visible.

Functions

Link copied to clipboard
open override fun addChild(component: MediaSfuUIComponent)

Add a child component to this layout.

Link copied to clipboard
open override fun applyStyle(style: ComponentStyle)

Apply a style to this component.

Link copied to clipboard
open override fun clearChildren()

Clear all child components.

Link copied to clipboard
fun close()

Close the modal.

Link copied to clipboard
open override fun disable()

Disable this component.

Link copied to clipboard
open override fun dispose()

Dispose of this component and release resources.

Link copied to clipboard
open override fun enable()

Enable this component.

Link copied to clipboard

Get the current modal content.

Link copied to clipboard
open override fun handleInteraction(event: InteractionEvent)

Handle a user interaction event.

Link copied to clipboard
open override fun hide()

Hide this component.

Link copied to clipboard
fun open()

Open the modal.

Link copied to clipboard
open override fun removeChild(component: MediaSfuUIComponent)

Remove a child component from this layout.

Link copied to clipboard

Set the modal content.

Link copied to clipboard
fun setPosition(x: Float, y: Float)

Set the modal position.

Link copied to clipboard
fun setSize(width: Float, height: Float)

Set the modal size.

Link copied to clipboard
open override fun show()

Show this component.

Link copied to clipboard
open override fun startAnimation(animation: Animation)

Start an animation.

Link copied to clipboard
open override fun stopAnimation()

Stop the current animation.

Link copied to clipboard
fun toggle()

Toggle the modal open/close state.