components/dialog
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/dialog";Exports
Section titled “Exports”| 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”type DialogChangeDetails = BaseDialog.Root.ChangeEventDetails;Details supplied to a Dialog open-change callback.
DialogChangeReasontype alias
Section titled “DialogChangeReason”type DialogChangeReason = BaseDialog.Root.ChangeEventReason;Supported DialogChangeReason values.
DialogInteractionOwnertype alias
Section titled “DialogInteractionOwner”type DialogInteractionOwner = "host" | "local";Supported DialogInteractionOwner values.
DialogPropstype alias
Section titled “DialogProps”type DialogProps<Payload> = BaseDialog.Root.Props<Payload> & object;Props accepted by Dialog.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
interactionOwner? |
DialogInteractionOwner |
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Payload |
unknown |
DialogContentPropstype alias
Section titled “DialogContentProps”type DialogContentProps = BaseDialog.Popup.Props & Pick<BaseDialog.Portal.Props, "container" | "keepMounted">;Props accepted by DialogContent.
DialogTriggerconstant
Section titled “DialogTrigger”const DialogTrigger: ForwardRefExoticComponent< Omit<Props<unknown>, "ref"> & RefAttributes<HTMLButtonElement>>;The trigger control for a Dialog.
DialogPortalconstant
Section titled “DialogPortal”const DialogPortal: ForwardRefExoticComponent< Omit<DialogPortalProps, "ref"> & RefAttributes<HTMLDivElement>>;Shell dialog destination, with Base UI container and mount lifetime overrides.
DialogBackdropconstant
Section titled “DialogBackdrop”const DialogBackdrop: ForwardRefExoticComponent< Omit<DialogBackdropProps, "ref"> & RefAttributes<HTMLDivElement>>;The styled backdrop for a composed Dialog.
DialogPopupconstant
Section titled “DialogPopup”const DialogPopup: ForwardRefExoticComponent< Omit<DialogPopupProps, "ref"> & RefAttributes<HTMLDivElement>>;The styled popup with Base UI composition and caller-controlled focus targets.
DialogContentconstant
Section titled “DialogContent”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”const DialogTitle: ForwardRefExoticComponent< Omit<DialogTitleProps, "ref"> & RefAttributes<HTMLHeadingElement>>;The accessible title for a Dialog.
DialogDescriptionconstant
Section titled “DialogDescription”const DialogDescription: ForwardRefExoticComponent< Omit<DialogDescriptionProps, "ref"> & RefAttributes<HTMLParagraphElement>>;The accessible description for a Dialog.
DialogCloseconstant
Section titled “DialogClose”const DialogClose: ForwardRefExoticComponent< Omit<DialogCloseProps, "ref"> & RefAttributes<HTMLButtonElement>>;A control that requests a Dialog to close.
Dialog()function
Section titled “Dialog()”function Dialog<Payload>(__namedParameters): Element;A dialog controller with explicit controlled or uncontrolled open state.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Payload |
unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
DialogProps<Payload> |
Returns
Section titled “Returns”Element
DialogFooter()function
Section titled “DialogFooter()”function DialogFooter(__namedParameters): Element;A footer layout for caller-provided Dialog actions.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
HTMLAttributes<HTMLDivElement> |
Returns
Section titled “Returns”Element
DialogHeader()function
Section titled “DialogHeader()”function DialogHeader(__namedParameters): Element;A header layout for caller-provided Dialog content.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
HTMLAttributes<HTMLDivElement> |
Returns
Section titled “Returns”Element