← Skyee · Skyee components · Get started

Modal

Centred dialog with focus trap and Escape to close.

Live preview

Welcome

Focus is trapped, Escape closes, and the page behind stays still.

HTML

<button class="sky-btn" data-sky-toggle="modal" data-sky-target="#m-basic">Open modal</button>
<div class="sky-modal" id="m-basic"><div class="sky-modal-box"><div class="sky-modal-head"><h3>Welcome</h3><button class="sky-btn sky-ghost sky-square sky-sm" data-sky-dismiss aria-label="Close"><i class="sky-icon sky-icon-x"></i></button></div><div class="sky-modal-body"><p>Focus is trapped, Escape closes, and the page behind stays still.</p></div><div class="sky-modal-foot"><button class="sky-btn sky-ghost" data-sky-dismiss>Cancel</button><button class="sky-btn" data-sky-dismiss>Continue</button></div></div></div>

Open in the Skyee app · Edit in the playground