ConfirmPopup API

API documentation for ConfirmPopup component

ConfirmPopup#

Props#

Defines valid properties in ConfirmPopup component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupInstance) => 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<ConfirmPopupPassThrough>
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: ConfirmPopupInstance) => ReactNode)
null
The children to render.
openboolean
false
Specifies the visibility of the confirmpopup.
defaultOpenboolean
false
Specifies the default visibility of the confirmpopup.
defaultFocus"accept" | "reject"
undefined
Element to receive the focus when the confirmpopup gets visible, valid values are "accept" and "reject".
onOpenChange(event: useConfirmPopupChangeEvent) => void
null
Callback function that is called when the trigger is clicked.
[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 ConfirmPopup component.

nametypedefaultdescription
openedboolean
null
Whether the confirmpopup is currently opened.

Exposes#

Defines the methods and properties exposed by ConfirmPopup component.

nametypedefaultdescription
stateuseConfirmPopupState
null
Current state of the confirmpopup.
motionRefRefObject<{ elementRef: RefObject<HTMLDivElement> }>
null
Reference to the motion element.
triggerRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the trigger element.
rejectRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the reject element.
acceptRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the accept element.
onOpenStateChange() => void
null
Method to change the open state of the confirmpopup.
close() => void
null
Method to close the confirmpopup.
onMotionEnter() => void
null
Handler for motion enter events.
onMotionAfterEnter() => void
null
Handler for motion after enter events.
onMotionAfterLeave() => void
null
Handler for motion after leave events.

Interfaces#

Defines passthrough(pt) options of ConfirmPopup component.

nametypedefaultdescription
rootConfirmPopupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
triggerConfirmPopupPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the trigger's DOM element.
portalConfirmPopupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the portal's DOM element.
contentConfirmPopupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the content's DOM element.
iconConfirmPopupPassThroughType<HTMLAttributes<HTMLSpanElement>>
null
Used to pass attributes to the icon's DOM element.
messageConfirmPopupPassThroughType<HTMLAttributes<HTMLSpanElement>>
null
Used to pass attributes to the message's DOM element.
footerConfirmPopupPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the footer's DOM element.
rejectConfirmPopupPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the reject's DOM element.
acceptConfirmPopupPassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the accept's DOM element.

Types#

Instance of ConfirmPopup component.

values
ComponentInstance<ConfirmPopupProps, ConfirmPopupState, ConfirmPopupExposes>

ConfirmPopupTrigger#

Props#

Defines valid properties in ConfirmPopupTrigger component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupTriggerInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupTriggerInstance) => 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<ConfirmPopupTriggerPassThrough>
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: ConfirmPopupTriggerInstance) => 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 ConfirmPopupTrigger component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupTrigger component.

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

Types#

Instance of ConfirmPopupTrigger component.

values
ComponentInstance<ConfirmPopupTriggerProps, ConfirmPopupTriggerState, ConfirmPopupTriggerExposes>

ConfirmPopupPortal#

Props#

Defines valid properties in ConfirmPopupPortal component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupPortalInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupPortalInstance) => 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<ConfirmPopupPortalPassThrough>
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: ConfirmPopupPortalInstance) => 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 ConfirmPopupPortal component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupPortal component.

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

Types#

Instance of ConfirmPopupPortal component.

values
ComponentInstance<ConfirmPopupPortalProps, ConfirmPopupPortalState, ConfirmPopupPortalExposes>

ConfirmPopupContent#

Props#

Defines valid properties in ConfirmPopupContent component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupContentInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupContentInstance) => 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<ConfirmPopupContentPassThrough>
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: ConfirmPopupContentInstance) => 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 ConfirmPopupContent component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupContent component.

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

Types#

Instance of ConfirmPopupContent component.

values
ComponentInstance<ConfirmPopupContentProps, ConfirmPopupContentState, ConfirmPopupContentExposes>

ConfirmPopupIcon#

Props#

Defines valid properties in ConfirmPopupIcon component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupIconInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupIconInstance) => 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<ConfirmPopupIconPassThrough>
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: ConfirmPopupIconInstance) => 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 ConfirmPopupIcon component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupIcon component.

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

Types#

Instance of ConfirmPopupIcon component.

values
ComponentInstance<ConfirmPopupIconProps, ConfirmPopupIconState, ConfirmPopupIconExposes>

ConfirmPopupMessage#

Props#

Defines valid properties in ConfirmPopupMessage component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupMessageInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupMessageInstance) => 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<ConfirmPopupMessagePassThrough>
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: ConfirmPopupMessageInstance) => 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 ConfirmPopupMessage component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupMessage component.

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

Types#

Instance of ConfirmPopupMessage component.

values
ComponentInstance<ConfirmPopupMessageProps, ConfirmPopupMessageState, ConfirmPopupMessageExposes>

ConfirmPopupFooter#

Props#

Defines valid properties in ConfirmPopupFooter component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupFooterInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupFooterInstance) => 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<ConfirmPopupFooterPassThrough>
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: ConfirmPopupFooterInstance) => 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 ConfirmPopupFooter component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupFooter component.

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

Types#

Instance of ConfirmPopupFooter component.

values
ComponentInstance<ConfirmPopupFooterProps, ConfirmPopupFooterState, ConfirmPopupFooterExposes>

ConfirmPopupReject#

Props#

Defines valid properties in ConfirmPopupReject component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupRejectInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupRejectInstance) => 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<ConfirmPopupRejectPassThrough>
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: ConfirmPopupRejectInstance) => ReactNode)
null
The children to render.
size"small" | "large" | "normal"
small
The size of the reject button
variant"link" | "text" | "outlined"
text
the variant of the reject button
[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 ConfirmPopupReject component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupReject component.

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

Types#

Instance of ConfirmPopupReject component.

values
ComponentInstance<ConfirmPopupRejectProps, ConfirmPopupRejectState, ConfirmPopupRejectExposes>

ConfirmPopupAccept#

Props#

Defines valid properties in ConfirmPopupAccept component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: ConfirmPopupAcceptInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: ConfirmPopupAcceptInstance) => 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<ConfirmPopupAcceptPassThrough>
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: ConfirmPopupAcceptInstance) => ReactNode)
null
The children to render.
size"small" | "large" | "normal"
small
The size of the accept button
[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 ConfirmPopupAccept component.

nametypedefaultdescription
confirmpopupConfirmPopupInstance
null
Instance of the ConfirmPopup component.

Interfaces#

Defines passthrough(pt) options of ConfirmPopupAccept component.

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

Types#

Instance of ConfirmPopupAccept component.

values
ComponentInstance<ConfirmPopupAcceptProps, ConfirmPopupAcceptState, ConfirmPopupAcceptExposes>

useConfirmPopup#

Props#

Defines valid properties in useConfirmPopup.

nametypedefaultdescription
openboolean
false
Specifies the visibility of the confirmpopup.
defaultOpenboolean
false
Specifies the default visibility of the confirmpopup.
defaultFocus"accept" | "reject"
undefined
Element to receive the focus when the confirmpopup gets visible, valid values are "accept" and "reject".
onOpenChange(event: useConfirmPopupChangeEvent) => void
null
Callback function that is called when the trigger is clicked.

State#

Defines valid state in useConfirmPopup.

nametypedefaultdescription
openedboolean
null
Whether the confirmpopup is currently opened.

Exposes#

Defines the methods and properties exposed by useConfirmPopup.

nametypedefaultdescription
stateuseConfirmPopupState
null
Current state of the confirmpopup.
motionRefRefObject<{ elementRef: RefObject<HTMLDivElement> }>
null
Reference to the motion element.
triggerRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the trigger element.
rejectRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the reject element.
acceptRefRefObject<{ elementRef: RefObject<HTMLButtonElement> }>
null
Reference to the accept element.
onOpenStateChange() => void
null
Method to change the open state of the confirmpopup.
close() => void
null
Method to close the confirmpopup.
onMotionEnter() => void
null
Handler for motion enter events.
onMotionAfterEnter() => void
null
Handler for motion after enter events.
onMotionAfterLeave() => void
null
Handler for motion after leave events.

Events#

Event fired when the confirmpopup's open state changes.

nametypedescription
valuebooleanThe value of the confirmpopup.

Types#

Instance of useConfirmPopup headless.

values
HeadlessInstance<useConfirmPopupProps, useConfirmPopupState, useConfirmPopupExposes>