Skip to content
Premium & Brand

Morphing Popover

Trigger that morphs into a non-modal dialog surface.

Import

tsx
import { MorphingPopover, MorphingPopoverTrigger, MorphingPopoverContent, MorphingPopoverClose, MorphingPopoverHeader, MorphingPopoverBody, MorphingPopoverFooter, MorphingPopoverButton } from "@cooud-ui/ui";
bash
npx cooud-ui add morphing-popover

Examples

API Reference

Generated from the component's exported types.

MorphingPopoverProps

Extends HTMLAttributes<HTMLDivElement>

PropTypeDefaultDescription
open
booleanControlled open state. When provided, the component is fully controlled.
defaultOpen
booleanfalseInitial open state for the uncontrolled case.
onOpenChange
(open: boolean) => voidCalled whenever the open state should change (controlled or not).
transition
TransitionMORPHING_POPOVER_TRANSITIONOverride the morph spring (advanced — defaults to the Cooud morph spring).
reducedMotion
"user" | "always" | "never""user"How `prefers-reduced-motion` is honoured. Defaults to `"user"`: users who opt out get a fade instead of the layout morph. Pass `"never"` to always play the morph (e.g. a showcase that must demonstrate the animation), or `"always"` to force the reduced variant for everyone.
children
ReactNode

MorphingPopoverTriggerProps

Extends Omit< React.ComponentPropsWithoutRef<typeof motion.button>, "ref" | "children" | "onClick" >

PropTypeDefaultDescription
children
ReactNode
onClick
(event: React.MouseEvent<HTMLButtonElement>) => voidExtra click handler; runs alongside the open toggle.

MorphingPopoverContentProps

Extends Omit<React.ComponentPropsWithoutRef<typeof motion.div>, "ref" | "children">

PropTypeDefaultDescription
children
ReactNode
aria-label
stringAccessible name when the content has no visible heading to point at.
aria-labelledby
stringId of a visible heading element (e.g. a ).

MorphingPopoverCloseProps

Extends ButtonHTMLAttributes<HTMLButtonElement>

No own props — see the extended type above for available props.

MorphingPopoverHeaderProps

Extends HTMLAttributes<HTMLDivElement>

No own props — see the extended type above for available props.

MorphingPopoverBodyProps

Extends HTMLAttributes<HTMLDivElement>

No own props — see the extended type above for available props.

MorphingPopoverFooterProps

Extends HTMLAttributes<HTMLDivElement>

No own props — see the extended type above for available props.

MorphingPopoverButtonProps

Extends ButtonHTMLAttributes<HTMLButtonElement>

No own props — see the extended type above for available props.