ConfirmDialog API

API documentation for ConfirmDialog component

ConfirmDialog#

Props#

Defines valid properties in ConfirmDialog component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogInstance) => ReactNode)
null
The children to render.
modalboolean
true
Defines if background should be blocked when dialog is displayed.
position"center" | "top" | "bottom" | "left" | "right" | "topleft" | "topright" | "bottomleft" | "bottomright"
center
Position of the dialog.
onOpenChange(event: ConfirmDialogChangeEvent) => void
null
Callback function that is called when the trigger is clicked.
openboolean
false
Specifies the visibility of the dialog.
defaultOpenboolean
false
Specifies the default visibility of the dialog.
draggableboolean
true
Enables dragging to change the position using header.
keepInViewportboolean
true
Keeps dialog in the viewport.
dismissableMaskboolean
false
Specifies if clicking the modal background should hide the dialog.
closeOnEscapeboolean
true
Specifies if pressing escape key should hide the dialog.
blockScrollboolean
false
Whether background scroll should be blocked when dialog is visible.
baseZIndexnumber
0
Base zIndex value to use in layering.
autoZIndexboolean
true
Whether to automatically manage layering.
appendToHTMLElement | "body" | "self"
body
A valid query selector or an HTMLElement to specify where the dialog gets attached.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Defines valid state in ConfirmDialog component.

nametypedefaultdescription
openedboolean
null
Whether the dialog is currently opened.
maskVisibleboolean
null
Whether the mask is currently visible.

Exposes#

Defines the methods and properties exposed by ConfirmDialog component.

nametypedefaultdescription
stateuseDialogState
null
Current state of the dialog.
maskRefRefObject<HTMLDivElement>
null
Reference to the mask element.
motionRefRefObject<{ elementRef: RefObject<HTMLDivElement> }>
null
Reference to the close button element.
closeButtonRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the close button element.
onOpenStateChange() => void
null
Method to change the open state of the dialog.
close() => void
null
Method to close the dialog.
onMaskMouseDown(event: MouseEvent) => void
null
Handler for mask mouse down events.
onMaskMouseUp() => void
null
Handler for mask mouse up events.
onDragStart(event: MouseEvent) => void
null
Handler for drag start events.
onMotionEnter() => void
null
Handler for motion enter events.
onMotionAfterEnter() => void
null
Handler for motion after enter events.
onMotionBeforeLeave() => void
null
Handler for motion before leave events.
onMotionLeave() => void
null
Handler for motion leave events.
onMotionAfterLeave() => void
null
Handler for motion after leave events.

Interfaces#

Defines passthrough(pt) options of ConfirmDialog component.

nametypedefaultdescription
rootConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
maskConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the mask's DOM element.
triggerConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the trigger's DOM element.
triggerIconConfirmDialogPassThroughType<HTMLAttributes<HTMLElement>>
null
Used to pass attributes to the trigger icon's DOM element.
portalConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the portal's DOM element.
headerConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the header's DOM element.
titleConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the title's DOM element.
headerActionsConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the headerActions's DOM element.
closeConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the close's DOM element.
closeIconConfirmDialogPassThroughType<HTMLAttributes<HTMLElement>>
null
Used to pass attributes to the close icon's DOM element.
contentConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the content's DOM element.
iconConfirmDialogPassThroughType<HTMLAttributes<HTMLSpanElement>>
null
Used to pass attributes to the icon's DOM element.
messageConfirmDialogPassThroughType<HTMLAttributes<HTMLSpanElement>>
null
Used to pass attributes to the message's DOM element.
cancelConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the cancel's DOM element.
actionConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the action's DOM element.
footerConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the footer's DOM element.

Types#

Instance of ConfirmDialog component.

values
ComponentInstance<ConfirmDialogProps, ConfirmDialogState, ConfirmDialogExposes>

ConfirmDialogTrigger#

Props#

Defines valid properties in ConfirmDialogTrigger component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogTriggerInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogTriggerInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogTriggerPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogTriggerInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogTrigger component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
Instance of the ConfirmDialog component.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogTrigger component.

nametypedefaultdescription
rootConfirmDialogTriggerPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogTrigger component.

values
ComponentInstance<ConfirmDialogTriggerProps, ConfirmDialogTriggerState, ConfirmDialogTriggerExposes>

ConfirmDialogPortal#

Props#

Defines valid properties in ConfirmDialogPortal component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogPortalInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogPortalInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogPortalPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogPortalInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogPortal component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
Instance of the ConfirmDialog component.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogPortal component.

nametypedefaultdescription
rootConfirmDialogPortalPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogPortal component.

values
ComponentInstance<ConfirmDialogPortalProps, ConfirmDialogPortalState, ConfirmDialogPortalExposes>

ConfirmDialogHeader#

Props#

Defines valid properties in ConfirmDialogHeader component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogHeaderInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogHeaderInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogHeaderPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogHeaderInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogHeader component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
The ConfirmDialog component instance.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogHeader component.

nametypedefaultdescription
rootConfirmDialogHeaderPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogHeader component.

values
ComponentInstance<ConfirmDialogHeaderProps, ConfirmDialogHeaderState, ConfirmDialogHeaderExposes>

ConfirmDialogTitle#

Props#

Defines valid properties in ConfirmDialogTitle component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogTitleInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogTitleInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogTitlePassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogTitleInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogTitle component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
The ConfirmDialog component instance.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogTitle component.

nametypedefaultdescription
rootConfirmDialogTitlePassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogTitle component.

values
ComponentInstance<ConfirmDialogTitleProps, ConfirmDialogTitleState, ConfirmDialogTitleExposes>

ConfirmDialogHeaderActions#

Props#

Defines valid properties in ConfirmDialogHeaderActions component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogHeaderActionsInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogHeaderActionsInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogHeaderActionsPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogHeaderActionsInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogHeaderActions component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
The confirmdialog instance that the header actions belong to.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogHeaderActions component.

nametypedefaultdescription
rootConfirmDialogHeaderActionsPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogHeaderActions component.

values
ComponentInstance<ConfirmDialogHeaderActionsProps, ConfirmDialogHeaderActionsState, ConfirmDialogHeaderActionsExposes>

ConfirmDialogAction#

Props#

Defines valid properties in ConfirmDialogAction component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogActionInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogActionInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogActionPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogActionInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogAction component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
Instance of the ConfirmDialog component.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogAction component.

nametypedefaultdescription
rootConfirmDialogActionPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogAction component.

values
ComponentInstance<ConfirmDialogActionProps, ConfirmDialogActionState, ConfirmDialogActionExposes>

ConfirmDialogClose#

Props#

Defines valid properties in ConfirmDialogClose component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogCloseInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogCloseInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogClosePassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogCloseInstance) => ReactNode)
null
The children to render.
iconOnlyboolean
true
Whether to show the ConfirmDialogClose with a borderless style.
severitystring & {} | "secondary" | "info" | "success" | "warn" | "danger" | "contrast" | "help"
'secondary'
Severity type of the ConfirmDialogClose.
variant"link" | "text" | "outlined"
'text'
Variant of the ConfirmDialogClose.
roundedboolean
true
Whether to show the ConfirmDialogClose with a rounded style.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogClose component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
Instance of the ConfirmDialog component.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogClose component.

nametypedefaultdescription
rootConfirmDialogClosePassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogClose component.

values
ComponentInstance<ConfirmDialogCloseProps, ConfirmDialogCloseState, ConfirmDialogCloseExposes>

ConfirmDialogContent#

Props#

Defines valid properties in ConfirmDialogContent component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogContentInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogContentInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogContentPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogContentInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogContent component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
The ConfirmDialog component instance.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogContent component.

nametypedefaultdescription
rootConfirmDialogContentPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogContent component.

values
ComponentInstance<ConfirmDialogContentProps, ConfirmDialogContentState, ConfirmDialogContentExposes>

ConfirmDialogFooter#

Props#

Defines valid properties in ConfirmDialogFooter component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmDialogFooterInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmDialogFooterInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<ConfirmDialogFooterPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: ConfirmDialogFooterInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Exposes#

Defines the methods and properties exposed by ConfirmDialogFooter component.

nametypedefaultdescription
confirmdialogConfirmDialogInstance
null
The ConfirmDialog component instance.
dialogDialogInstance
null
Instance of the Dialog component.

Interfaces#

Defines passthrough(pt) options of ConfirmDialogFooter component.

nametypedefaultdescription
rootConfirmDialogFooterPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of ConfirmDialogFooter component.

values
ComponentInstance<ConfirmDialogFooterProps, ConfirmDialogFooterState, ConfirmDialogFooterExposes>

useConfirmDialog#

Props#

Defines valid properties in useConfirmDialog.

nametypedefaultdescription
modalboolean
true
Defines if background should be blocked when dialog is displayed.
openboolean
false
Specifies the visibility of the dialog.
defaultOpenboolean
false
Specifies the default visibility of the dialog.
draggableboolean
true
Enables dragging to change the position using header.
keepInViewportboolean
true
Keeps dialog in the viewport.
dismissableMaskboolean
false
Specifies if clicking the modal background should hide the dialog.
closeOnEscapeboolean
true
Specifies if pressing escape key should hide the dialog.
blockScrollboolean
false
Whether background scroll should be blocked when dialog is visible.
baseZIndexnumber
0
Base zIndex value to use in layering.
autoZIndexboolean
true
Whether to automatically manage layering.
appendToHTMLElement | "body" | "self"
body
A valid query selector or an HTMLElement to specify where the dialog gets attached.
onOpenChange(event: useDialogChangeEvent) => void
null
Callback function that is called when the trigger is clicked.

State#

Defines valid state in useConfirmDialog.

nametypedefaultdescription
openedboolean
null
Whether the dialog is currently opened.
maskVisibleboolean
null
Whether the mask is currently visible.

Exposes#

Defines the methods and properties exposed by useConfirmDialog.

nametypedefaultdescription
stateuseDialogState
null
Current state of the dialog.
maskRefRefObject<HTMLDivElement>
null
Reference to the mask element.
motionRefRefObject<{ elementRef: RefObject<HTMLDivElement> }>
null
Reference to the close button element.
closeButtonRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the close button element.
onOpenStateChange() => void
null
Method to change the open state of the dialog.
close() => void
null
Method to close the dialog.
onMaskMouseDown(event: MouseEvent) => void
null
Handler for mask mouse down events.
onMaskMouseUp() => void
null
Handler for mask mouse up events.
onDragStart(event: MouseEvent) => void
null
Handler for drag start events.
onMotionEnter() => void
null
Handler for motion enter events.
onMotionAfterEnter() => void
null
Handler for motion after enter events.
onMotionBeforeLeave() => void
null
Handler for motion before leave events.
onMotionLeave() => void
null
Handler for motion leave events.
onMotionAfterLeave() => void
null
Handler for motion after leave events.

Events#

Event fired when the confirmdialog's open state changes.

nametypedescription
valuebooleanThe value of the dialog.

Types#

Instance of useConfirmDialog headless.

values
HeadlessInstance<useConfirmDialogProps, useConfirmDialogState, useConfirmDialogExposes>