ConfirmDialog API
API documentation for ConfirmDialog component
ConfirmDialog#
Props#
Defines valid properties in ConfirmDialog component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((instance: ConfirmDialogInstance) => ReactNode) | null | The children to render. |
| modal | boolean | 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. |
| open | boolean | false | Specifies the visibility of the dialog. |
| defaultOpen | boolean | false | Specifies the default visibility of the dialog. |
| draggable | boolean | true | Enables dragging to change the position using header. |
| keepInViewport | boolean | true | Keeps dialog in the viewport. |
| dismissableMask | boolean | false | Specifies if clicking the modal background should hide the dialog. |
| closeOnEscape | boolean | true | Specifies if pressing escape key should hide the dialog. |
| blockScroll | boolean | false | Whether background scroll should be blocked when dialog is visible. |
| baseZIndex | number | 0 | Base zIndex value to use in layering. |
| autoZIndex | boolean | true | Whether to automatically manage layering. |
| appendTo | HTMLElement | "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.
| name | type | default | description |
|---|
| opened | boolean | null | Whether the dialog is currently opened. |
| maskVisible | boolean | null | Whether the mask is currently visible. |
Exposes#
Defines the methods and properties exposed by ConfirmDialog component.
| name | type | default | description |
|---|
| state | useDialogState | null | Current state of the dialog. |
| maskRef | RefObject<HTMLDivElement> | null | Reference to the mask element. |
| motionRef | RefObject<{ elementRef: RefObject<HTMLDivElement> }> | null | Reference to the close button element. |
| closeButtonRef | RefObject<{ 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#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialog component.
| name | type | default | description |
|---|
| root | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
| mask | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the mask's DOM element. |
| trigger | ConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the trigger's DOM element. |
| triggerIcon | ConfirmDialogPassThroughType<HTMLAttributes<HTMLElement>> | null | Used to pass attributes to the trigger icon's DOM element. |
| portal | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the portal's DOM element. |
| header | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the header's DOM element. |
| title | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the title's DOM element. |
| headerActions | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the headerActions's DOM element. |
| close | ConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the close's DOM element. |
| closeIcon | ConfirmDialogPassThroughType<HTMLAttributes<HTMLElement>> | null | Used to pass attributes to the close icon's DOM element. |
| content | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the content's DOM element. |
| icon | ConfirmDialogPassThroughType<HTMLAttributes<HTMLSpanElement>> | null | Used to pass attributes to the icon's DOM element. |
| message | ConfirmDialogPassThroughType<HTMLAttributes<HTMLSpanElement>> | null | Used to pass attributes to the message's DOM element. |
| cancel | ConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the cancel's DOM element. |
| action | ConfirmDialogPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the action's DOM element. |
| footer | ConfirmDialogPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the footer's DOM element. |
Types#
Instance
Instance of ConfirmDialog component.
| values |
|---|
| ComponentInstance<ConfirmDialogProps, ConfirmDialogState, ConfirmDialogExposes> |
ConfirmDialogTrigger#
Props#
Defines valid properties in ConfirmDialogTrigger component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogTriggerInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogTriggerInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogTriggerPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | Instance of the ConfirmDialog component. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogTrigger component.
| name | type | default | description |
|---|
| root | ConfirmDialogTriggerPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogTrigger component.
| values |
|---|
| ComponentInstance<ConfirmDialogTriggerProps, ConfirmDialogTriggerState, ConfirmDialogTriggerExposes> |
ConfirmDialogPortal#
Props#
Defines valid properties in ConfirmDialogPortal component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogPortalInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogPortalInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogPortalPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | Instance of the ConfirmDialog component. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogPortal component.
| name | type | default | description |
|---|
| root | ConfirmDialogPortalPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogPortal component.
| values |
|---|
| ComponentInstance<ConfirmDialogPortalProps, ConfirmDialogPortalState, ConfirmDialogPortalExposes> |
Props#
Defines valid properties in ConfirmDialogHeader component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogHeaderInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogHeaderInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogHeaderPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | The ConfirmDialog component instance. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogHeader component.
| name | type | default | description |
|---|
| root | ConfirmDialogHeaderPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogHeader component.
| values |
|---|
| ComponentInstance<ConfirmDialogHeaderProps, ConfirmDialogHeaderState, ConfirmDialogHeaderExposes> |
ConfirmDialogTitle#
Props#
Defines valid properties in ConfirmDialogTitle component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogTitleInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogTitleInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogTitlePassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | The ConfirmDialog component instance. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogTitle component.
| name | type | default | description |
|---|
| root | ConfirmDialogTitlePassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogTitle component.
| values |
|---|
| ComponentInstance<ConfirmDialogTitleProps, ConfirmDialogTitleState, ConfirmDialogTitleExposes> |
Props#
Defines valid properties in ConfirmDialogHeaderActions component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogHeaderActionsInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogHeaderActionsInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogHeaderActionsPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | The confirmdialog instance that the header actions belong to. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogHeaderActions component.
| name | type | default | description |
|---|
| root | ConfirmDialogHeaderActionsPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogHeaderActions component.
| values |
|---|
| ComponentInstance<ConfirmDialogHeaderActionsProps, ConfirmDialogHeaderActionsState, ConfirmDialogHeaderActionsExposes> |
ConfirmDialogAction#
Props#
Defines valid properties in ConfirmDialogAction component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogActionInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogActionInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogActionPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | Instance of the ConfirmDialog component. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogAction component.
| name | type | default | description |
|---|
| root | ConfirmDialogActionPassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogAction component.
| values |
|---|
| ComponentInstance<ConfirmDialogActionProps, ConfirmDialogActionState, ConfirmDialogActionExposes> |
ConfirmDialogClose#
Props#
Defines valid properties in ConfirmDialogClose component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogCloseInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogCloseInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogClosePassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((instance: ConfirmDialogCloseInstance) => ReactNode) | null | The children to render. |
| iconOnly | boolean | true | Whether to show the ConfirmDialogClose with a borderless style. |
| severity | string & {} | "secondary" | "info" | "success" | "warn" | "danger" | "contrast" | "help" | 'secondary' | Severity type of the ConfirmDialogClose. |
| variant | "link" | "text" | "outlined" | 'text' | Variant of the ConfirmDialogClose. |
| rounded | boolean | 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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | Instance of the ConfirmDialog component. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogClose component.
| name | type | default | description |
|---|
| root | ConfirmDialogClosePassThroughType<HTMLAttributes<HTMLButtonElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogClose component.
| values |
|---|
| ComponentInstance<ConfirmDialogCloseProps, ConfirmDialogCloseState, ConfirmDialogCloseExposes> |
ConfirmDialogContent#
Props#
Defines valid properties in ConfirmDialogContent component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogContentInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogContentInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogContentPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | The ConfirmDialog component instance. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogContent component.
| name | type | default | description |
|---|
| root | ConfirmDialogContentPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogContent component.
| values |
|---|
| ComponentInstance<ConfirmDialogContentProps, ConfirmDialogContentState, ConfirmDialogContentExposes> |
Props#
Defines valid properties in ConfirmDialogFooter component.
| name | type | default | description |
|---|
| ref | Ref<unknown> | null | The reference to the component instance. |
| pIf | boolean | true | Whether the component should be rendered. |
| style | CSSProperties | ((instance?: ConfirmDialogFooterInstance) => CSSProperties) | null | The style to apply to the component. |
| className | string | ((instance?: ConfirmDialogFooterInstance) => string) | null | The class name to apply to the component. |
| as | string | 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. |
| asChild | boolean | false | Whether the component should be rendered as a child component. |
| pt | SafeRecord<ConfirmDialogFooterPassThrough> | null | The pass-through props to pass to the component |
| ptOptions | PassThroughOptions | null | The pass-through options to pass to the component |
| unstyled | boolean | null | Whether the component should be rendered without classes. |
| dt | unknown | null | The design token to use for the component. |
| styles | StylesOptions<ComponentInstance> | null | The styles to use for the component. |
| children | ReactNode | ((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.
| name | type | default | description |
|---|
| confirmdialog | ConfirmDialogInstance | null | The ConfirmDialog component instance. |
| dialog | DialogInstance | null | Instance of the Dialog component. |
Interfaces#
PassThroughOptions
Defines passthrough(pt) options of ConfirmDialogFooter component.
| name | type | default | description |
|---|
| root | ConfirmDialogFooterPassThroughType<HTMLAttributes<HTMLDivElement>> | null | Used to pass attributes to the root's DOM element. |
Types#
Instance
Instance of ConfirmDialogFooter component.
| values |
|---|
| ComponentInstance<ConfirmDialogFooterProps, ConfirmDialogFooterState, ConfirmDialogFooterExposes> |
useConfirmDialog#
Props#
Defines valid properties in useConfirmDialog.
| name | type | default | description |
|---|
| modal | boolean | true | Defines if background should be blocked when dialog is displayed. |
| open | boolean | false | Specifies the visibility of the dialog. |
| defaultOpen | boolean | false | Specifies the default visibility of the dialog. |
| draggable | boolean | true | Enables dragging to change the position using header. |
| keepInViewport | boolean | true | Keeps dialog in the viewport. |
| dismissableMask | boolean | false | Specifies if clicking the modal background should hide the dialog. |
| closeOnEscape | boolean | true | Specifies if pressing escape key should hide the dialog. |
| blockScroll | boolean | false | Whether background scroll should be blocked when dialog is visible. |
| baseZIndex | number | 0 | Base zIndex value to use in layering. |
| autoZIndex | boolean | true | Whether to automatically manage layering. |
| appendTo | HTMLElement | "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.
| name | type | default | description |
|---|
| opened | boolean | null | Whether the dialog is currently opened. |
| maskVisible | boolean | null | Whether the mask is currently visible. |
Exposes#
Defines the methods and properties exposed by useConfirmDialog.
| name | type | default | description |
|---|
| state | useDialogState | null | Current state of the dialog. |
| maskRef | RefObject<HTMLDivElement> | null | Reference to the mask element. |
| motionRef | RefObject<{ elementRef: RefObject<HTMLDivElement> }> | null | Reference to the close button element. |
| closeButtonRef | RefObject<{ 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#
useConfirmDialogChangeEvent
Event fired when the confirmdialog's open state changes.
| name | type | description |
|---|
| value | boolean | The value of the dialog. |
Types#
Instance
Instance of useConfirmDialog headless.
| values |
|---|
| HeadlessInstance<useConfirmDialogProps, useConfirmDialogState, useConfirmDialogExposes> |