Skip to content
API reference

components/dialog

Import
import * as api from "@fungi.computer/caps/components/dialog";
Kind Export Description
type alias DialogChangeDetails Details supplied to a Dialog open-change callback.
type alias DialogChangeReason Supported DialogChangeReason values.
type alias DialogInteractionOwner Supported DialogInteractionOwner values.
type alias DialogProps Props accepted by Dialog.
type alias DialogContentProps Props accepted by DialogContent.
constant DialogTrigger The trigger control for a Dialog.
constant DialogPortal Shell dialog destination, with Base UI container and mount lifetime overrides.
constant DialogBackdrop The styled backdrop for a composed Dialog.
constant DialogPopup The styled popup with Base UI composition and caller-controlled focus targets.
constant DialogContent The default portal, backdrop and popup composition for a Dialog. Keeps child state across closes. Like Base UI, only full modal mode has a backdrop.
constant DialogTitle The accessible title for a Dialog.
constant DialogDescription The accessible description for a Dialog.
constant DialogClose A control that requests a Dialog to close.
function Dialog() A dialog controller with explicit controlled or uncontrolled open state.
function DialogFooter() A footer layout for caller-provided Dialog actions.
function DialogHeader() A header layout for caller-provided Dialog content.

DialogChangeDetailstype alias

Section titled “DialogChangeDetails”
Signature
type DialogChangeDetails = BaseDialog.Root.ChangeEventDetails;

Details supplied to a Dialog open-change callback.


DialogChangeReasontype alias

Section titled “DialogChangeReason”
Signature
type DialogChangeReason = BaseDialog.Root.ChangeEventReason;

Supported DialogChangeReason values.


DialogInteractionOwnertype alias

Section titled “DialogInteractionOwner”
Signature
type DialogInteractionOwner = "host" | "local";

Supported DialogInteractionOwner values.


DialogPropstype alias

Section titled “DialogProps”
Signature
type DialogProps<Payload> = BaseDialog.Root.Props<Payload> & object;

Props accepted by Dialog.

Name Type
interactionOwner? DialogInteractionOwner
Type Parameter Default type
Payload unknown

DialogContentPropstype alias

Section titled “DialogContentProps”
Signature
type DialogContentProps = BaseDialog.Popup.Props &
Pick<BaseDialog.Portal.Props, "container" | "keepMounted">;

Props accepted by DialogContent.

DialogTriggerconstant

Section titled “DialogTrigger”
Signature
const DialogTrigger: ForwardRefExoticComponent<
Omit<Props<unknown>, "ref"> & RefAttributes<HTMLButtonElement>
>;

The trigger control for a Dialog.


DialogPortalconstant

Section titled “DialogPortal”
Signature
const DialogPortal: ForwardRefExoticComponent<
Omit<DialogPortalProps, "ref"> & RefAttributes<HTMLDivElement>
>;

Shell dialog destination, with Base UI container and mount lifetime overrides.


DialogBackdropconstant

Section titled “DialogBackdrop”
Signature
const DialogBackdrop: ForwardRefExoticComponent<
Omit<DialogBackdropProps, "ref"> & RefAttributes<HTMLDivElement>
>;

The styled backdrop for a composed Dialog.


DialogPopupconstant

Section titled “DialogPopup”
Signature
const DialogPopup: ForwardRefExoticComponent<
Omit<DialogPopupProps, "ref"> & RefAttributes<HTMLDivElement>
>;

The styled popup with Base UI composition and caller-controlled focus targets.


DialogContentconstant

Section titled “DialogContent”
Signature
const DialogContent: ForwardRefExoticComponent<
Omit<DialogContentProps, "ref"> & RefAttributes<HTMLDivElement>
>;

The default portal, backdrop and popup composition for a Dialog. Keeps child state across closes. Like Base UI, only full modal mode has a backdrop.


DialogTitleconstant

Section titled “DialogTitle”
Signature
const DialogTitle: ForwardRefExoticComponent<
Omit<DialogTitleProps, "ref"> & RefAttributes<HTMLHeadingElement>
>;

The accessible title for a Dialog.


DialogDescriptionconstant

Section titled “DialogDescription”
Signature
const DialogDescription: ForwardRefExoticComponent<
Omit<DialogDescriptionProps, "ref"> & RefAttributes<HTMLParagraphElement>
>;

The accessible description for a Dialog.


DialogCloseconstant

Section titled “DialogClose”
Signature
const DialogClose: ForwardRefExoticComponent<
Omit<DialogCloseProps, "ref"> & RefAttributes<HTMLButtonElement>
>;

A control that requests a Dialog to close.

Signature
function Dialog<Payload>(__namedParameters): Element;

A dialog controller with explicit controlled or uncontrolled open state.

Type Parameter Default type
Payload unknown
Parameter Type
__namedParameters DialogProps<Payload>

Element


DialogFooter()function

Section titled “DialogFooter()”
Signature
function DialogFooter(__namedParameters): Element;

A footer layout for caller-provided Dialog actions.

Parameter Type
__namedParameters HTMLAttributes<HTMLDivElement>

Element


DialogHeader()function

Section titled “DialogHeader()”
Signature
function DialogHeader(__namedParameters): Element;

A header layout for caller-provided Dialog content.

Parameter Type
__namedParameters HTMLAttributes<HTMLDivElement>

Element