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 "@cronus-ui/ui";
bash
npx cronus-ui add morphing-popover

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component MorphingPopoverDefault layout:inline style:morphing-popover {
  aria-label:"Details"
  label "Open"
  text "Popover body"
}

page "/audit/morphing-popover/default" type:custom {
  use MorphingPopoverDefault
}

API Reference

Generated from the component's exported types.

MorphingPopoverProps

Extends HTMLAttributes<HTMLDivElement>

Skip MorphingPopoverProps props table
PropTypeDefaultDescription
open
boolean—Controlled open state. When provided, the component is fully controlled.
defaultOpen
booleanfalseInitial open state for the uncontrolled case.
onOpenChange
(open: boolean) => void—Called whenever the open state should change (controlled or not).
transition
TransitionMORPHING_POPOVER_TRANSITIONOverride the morph spring (advanced — defaults to the Cronus 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—Contents of the component.
className
string—Additional class names merged onto the root.
id
string—DOM id of the root element.

MorphingPopoverTriggerProps

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

Skip MorphingPopoverTriggerProps props table
PropTypeDefaultDescription
children
ReactNode—Contents of the component.
onClick
(event: React.MouseEvent<HTMLButtonElement>) => void—Extra click handler; runs alongside the open toggle.
asChild
boolean—Render as the child element via Slot.
className
string—Additional class names merged onto the root.

MorphingPopoverContentProps

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

Skip MorphingPopoverContentProps props table
PropTypeDefaultDescription
children
ReactNode—Contents of the component.
aria-label
string—Accessible name when the content has no visible heading to point at.
aria-labelledby
string—Id of a visible heading element (e.g. a ).
asChild
boolean—Render as the child element via Slot.
className
string—Additional class names merged onto the root.

MorphingPopoverCloseProps

Extends ButtonHTMLAttributes<HTMLButtonElement>

Skip MorphingPopoverCloseProps props table
PropTypeDefaultDescription
type
string—Native type of the underlying element.
disabled
boolean—Disables pointer and keyboard interaction.
onClick
(event: MouseEvent) => void—Click handler.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

MorphingPopoverHeaderProps

Extends HTMLAttributes<HTMLDivElement>

Skip MorphingPopoverHeaderProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

MorphingPopoverBodyProps

Extends HTMLAttributes<HTMLDivElement>

Skip MorphingPopoverBodyProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

MorphingPopoverFooterProps

Extends HTMLAttributes<HTMLDivElement>

Skip MorphingPopoverFooterProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

MorphingPopoverButtonProps

Extends ButtonHTMLAttributes<HTMLButtonElement>

Skip MorphingPopoverButtonProps props table
PropTypeDefaultDescription
type
string—Native type of the underlying element.
disabled
boolean—Disables pointer and keyboard interaction.
onClick
(event: MouseEvent) => void—Click handler.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.