Skip to content

Modal

jsx
import Modal from 'intergalactic/modal';
<Modal />;
import Modal from 'intergalactic/modal';
<Modal />;

ModalProps

& & & {...}
NameTypeDescription
durationnumber Duration of animation, ms
visibleboolean This property is responsible for the visibility of the modal window
onClose(trigger: "onOutsideClick" | "onCloseClick" | "onEscape", e: React.MouseEvent | React.KeyboardEvent) => void Function called when the component is hidden
closableboolean Displaying the close button(x) in the upper-right corner of the modal dialog
disablePreventScrollboolean Setting `true` disables mechanism that hides document body scrollbar when Modal is visible
localestring
ghostboolean Props for render modal without background and paddings. Useful in carousel for example

Component which represents the background. Has all properties as BoxProps prop does.

jsx
import Modal from 'intergalactic/modal';
<Modal.Overlay />;
import Modal from 'intergalactic/modal';
<Modal.Overlay />;

Component which represents the modal window itself. Has all properties as BoxProps prop does.

jsx
import Modal from 'intergalactic/modal';
<Modal.Window />;
import Modal from 'intergalactic/modal';
<Modal.Window />;

Component which represents the closing icon. The component is the CloseS icon with the configured styles. Has all properties as BoxProps prop and IconProps prop does.

jsx
import Modal from 'intergalactic/modal';
<Modal.Close />;
import Modal from 'intergalactic/modal';
<Modal.Close />;

Component which represents the title. It adds aria-labelledby attribute to modal window. Has all properties as TextProps prop does.

jsx
import Modal from 'intergalactic/modal';
<Modal.Title />;
import Modal from 'intergalactic/modal';
<Modal.Title />;

Released under the MIT License.

Released under the MIT License.