Component / Overlay

Motion Dialog

Present modal work without compromising focus. Radix provides proven semantics and trapping while Easecraft retains the layer through interruptible exit motion.

Closed
Release review / modal flow
05

Ready for review

Open the release checkpoint before publishing this motion catalog.

Delivery contract

Install it

pnpm add easecraft@0.1.0

The component imports stable APIs from easecraft.

Files / 00

    Dependencies / 03

    easecraft
    npm / 0.1.0
    react
    peer / >=18.2.0 <20.0.0
    react-dom
    peer / >=18.2.0 <20.0.0

    Package usage

    Use it

    import { MotionDialog } from "easecraft";
    
    <MotionDialog
      title="Publish release?"
      description="Review the release checks first."
      trigger={<button type="button">Review release</button>}
    >
      <ReleaseChecklist />
    </MotionDialog>

    Typed contract

    API

    PropTypeDefaultPurpose
    triggerReactElementrequiredTrigger receiving Radix semantics
    titleReactNoderequiredAccessible dialog name
    descriptionReactNodenoneAccessible dialog description
    childrenReactNoderequiredModal body content
    openbooleanuncontrolledControlled requested state
    defaultOpenbooleanfalseInitial uncontrolled state
    onOpenChange(open) => voidnoneRequested state callback
    onAfterOpen() => voidnoneEntry completion callback
    onAfterClose() => voidnoneExit completion callback
    dismissiblebooleantrueEscape and backdrop dismissal
    initialFocusRefRefObjectfirst focusablePreferred initial focus
    durationduration token | number"normal"Entry duration
    exitDurationduration token | number"fast"Exit duration
    distancedistance token | number"medium"Panel travel distance
    easingeasing token | string"enter"Entry easing
    exitEasingeasing token | string"exit"Exit easing

    Release requirement

    Accessibility

    Modal focus
    Focus moves inside, remains trapped, and returns to the trigger after exit.
    Dismissal
    Escape and backdrop presses request close when dismissal is enabled.
    Exit retention
    The modal remains mounted and inaccessible background content stays blocked.
    Reduced motion
    Open and close state settle immediately while all modal semantics remain.