V Vaylan UI
Overlay

Modal

Focus a task in an accessible native dialog.

Preview

Example

<.modal id="invite" title="Invite teammate"><:trigger>Invite</:trigger>Invitation form</.modal>

API contract

modal/1 uses declared Phoenix attributes and slots. This table is generated from the compiled component metadata.

AttributeTypeRequiredDefaultAccepted values
id :string Yes Any value matching the declared type
title :string Yes Any value matching the declared type
description :string No nil Any value matching the declared type
placement :atom No :middle [:top, :middle, :bottom, :start, :end]
trigger_class :any No nil Any value matching the declared type
class :any No nil Any value matching the declared type
SlotRequiredSlot attributes
trigger Yes No slot attributes
inner_block Yes No slot attributes
actions No No slot attributes

States and behavior

Closed and open states use a native dialog. The trigger, explicit Close action, Escape key, and backdrop form all close predictably.

Keyboard and accessibility