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.
Modal Properties
buttons | Optional. An array of buttons for a modal box |
title | Optional. Sets the text of a modal box's header |
Modal Events
cancel | Fires on click of the Cancel button or when the ESC key is pressed |
confirm | Fires when a non-cancel button is clicked or when the ENTER key is pressed |