Skip to content
ghostui

Preview

Installation

Install the local ghost-kit source bundle while the registry runs at localhost:3110. It contains this component and its source dependencies. Prepare the local registry first so token dependencies also resolve locally.

Install

Basic usage

Structure

Examples

State

Control the open state when another part of the page needs it.

Dialog is closed.

Open from a menu

Open the dialog from a menu item after the menu closes.

Weekend mix

Nested dialogs

Open a second dialog for a related task.

Close confirmation

Keep an unsaved draft until the user saves or confirms a discard.

Custom focus management

Move focus to the field on open and to the chosen action on close.

Outside scroll dialog

Scroll the viewport around a tall dialog.

Inside scroll dialog

Keep scrolling inside a height-limited popup.

Elements outside the popup surface

Place the close action outside the colored surface while it stays inside the dialog's focus order.

Detached triggers

Connect a trigger to a dialog through a shared handle.

Multiple triggers

Open one dialog from two actions and show which action opened it.

API reference

For inherited behavior and additional part properties, see the Base UI Dialog API.