Skip to main content

Modal


The "Modal" is used to display content or options in a pop-up window that temporarily overlays the main content of a web or mobile application. They are ideally used when you have to provide some additional information, bring attention to something, prompt for input, or require a confirmatory action. The Modal can include animations or transition effects to make it more visually appealing and to guide the user's attention.

Modal


PropertyDescription
WidthSets the width of the modal shell.
HeightSets the height of the modal shell.
Modal OverlayMakes the background opaque and sets its color.
Header ImageAdds an image (in the URL) to the header section of the modal.
Ok TextSets the text that's displayed on the "Ok" button.
Cancel TextSets the text that's displayed on the "Cancel" button.
Closable
(Checkbox)
Enables the users to close the modal overlay.
Footer
(Checkbox)
Enables the footer section (Cancel & Submit buttons).
Disable Footer Cancel
(Checkbox)
Disables the "Cancel" button.
Footer Alignment
[Left/Center/Right]
Sets the alignment of the footer section.
Footer Type
[Buttom/Link]
Changes the style of the footer.
Select Content Type
(Drop-down)
Select the content "Type" that will be displayed on the modal's main section. (Text, Icon, Input, & Image)

Select Content Type - Properties

Text PropertyDescription
ContentEnter the text that will be displayed on the modal's main section.
Font WightSets the thickness of the text.
Font SizeSets the size of the text.
ColorSets the color of the display text.
MarginSets the margin around the display text.
Text AlignSets the alignment of the display text.
Icon PropertyDescription
Select Icon Variant
(Success/Error/Spinner)
Choose between the three available icon variants.
Modal
MarginSets the margin around the displayed icon.
Input PropertyDescription
NameAssign a name to the input field.
LabelAdds the title of the input field.
PlaceholderEnter the placeholder text displayed within the input field.
MarginSets the margin around the input field.
Image PropertyDescription
Image URLAdd the URL of the image that will be displayed on the modal's main section.
WidthSets the width of the image.
HeightSets the height of the image.
MarginSets the margin around the image.

API Methods

Input

Sets the criteria for validating the input fields assigned to the modal component; displays an error message if it fails.

Input(inputId: string).setError(errorMsg: string): void

hide

Hides the component.

hide(): void

show

Shows the component.

show(): void

setVisibility

Sets the Visibility flag for this component.

setVisibility(visible: boolean): void

setVisibilityCondition

Sets the visibility condition for this component.

setVisibilityCondition(condition: string): void

Event Handlers

Event handlers allow you to set triggers for various actions based on the fired events. They are as follows:

onOk

onOk - Sets the necessary action to be performed when the "OK" button is clicked.

onCancel

onCancel - Specifies the action to be taken when the user clicks the "Cancel" button to dismiss a dialog or cancel an action.