MindeesUI
ComponentsOverlays

Modal

Token-aware centered or full-bleed modal panel with scrim, dismiss-on-backdrop, and reduce-motion aware fade.

Modal is the base overlay primitive. It renders a token-driven scrim, an elevated panel, and respects the user's reduce-motion preference (no animation when enabled).

Import

import { Modal } from '@mindees/ui';

Usage

const [visible, setVisible] = useState(false);

return (
  <>
    <Button onPress={() => setVisible(true)}>Open</Button>
    <Modal visible={visible} onClose={() => setVisible(false)} accessibilityLabel="Confirm action">
      <Heading level={3}>Title</Heading>
      <Text>Body copy</Text>
    </Modal>
  </>
);

Full-bleed (non-centered) panel — anchors content to the bottom edge:

<Modal visible={visible} onClose={close} centered={false}>
  {/* fills the viewport */}
</Modal>

Props

PropTypeDefaultDescription
visiblebooleanControls whether the modal is shown.
onClose() => voidCalled on backdrop press (when dismissible) and on the platform back gesture.
dismissiblebooleantrueWhen false, backdrop taps are ignored.
centeredbooleantrueCentered panel (max 480 dp); otherwise content fills the screen and aligns to the bottom.
accessibilityLabelstringLabel announced to assistive tech when the modal opens.
childrenReact.ReactNodeModal contents.

Accessibility

Built on React Native's Modal, so the platform handles focus capture and the Android hardware back button (onRequestClose calls onClose). Provide accessibilityLabel so screen readers announce the modal's purpose. When reduce motion is enabled the fade animation is skipped automatically.

On this page