Skip to main content

Modal API Overview

Initialization

import { Modal, Text, Portal } from "@svar-ui/react-core";

export default function Example() {
return (
<Portal>
<Modal>
<Text />
</Modal>
</Portal>
);
}
tip
  • Visit the Features Guide to learn more about the control's functionality.
  • Explore the samples to visualize the available features.
buttonsOptional. An array of buttons for a modal box
titleOptional. Sets the text of a modal box's header
cancelFires on click of the Cancel button or when the ESC key is pressed
confirmFires when a non-cancel button is clicked or when the ENTER key is pressed