Skip to content
Menu

Overlays

Centered modal frame

Centered modal frame: A plain centered modal that fades and scales in over a dimmed backdrop, with a header, body and footer, for everyday forms and confirmations.

Using Centered modal frame

Centered modal frame uses the card preview frame with a light/dark theme setting.

Customize the preview

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

ControlTypeDefaultPreview limits
titletextEdit profileUp to 50 characters
accentcolor#38BDF8No additional limit in the metadata.
showCloseButtonbooleantrueNo additional limit in the metadata.
widthnumber420From 320 to 560; step 10
Which frameworks are available for Centered modal frame?

Centered modal frame is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

What does Centered modal frame depend on?

The React metadata lists these npm dependencies beyond React: motion, radix-ui, clsx, tailwind-merge.

What accessibility details are visible in Centered modal frame?

The React source for Centered modal frame includes: native elements (button); attributes and handlers (aria-hidden, aria-label). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

How does Centered modal frame handle reduced motion?

Centered modal frame reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: duration: reduced ? 0 : 0.14; duration: reduced ? 0 : 0.18; duration: reduced ? 0 : 0.2. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

Connect your agent

Related open components