Skip to content

Modal

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

ModalProps

& & & {...}
NameTypeDescription
durationnumberDuration of animation, ms
visiblebooleanThis property is responsible for the visibility of the modal window
onClose(trigger: "onOutsideClick" | "onCloseClick" | "onEscape", e: React.MouseEvent | React.KeyboardEvent) => voidFunction called when the component is hidden
closablebooleanDisplaying the close button(x) in the upper-right corner of the modal dialog
disablePreventScrollbooleanSetting `true` disables mechanism that hides document body scrollbar when Modal is visible
localestring
ghostbooleanProps 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.