Modal
Last updated
Was this helpful?
Last updated
Was this helpful?
The Modal module allows for over-page container elements.
md
xs
sm
lg
xl
2xl
3xl
4xl
5xl
6xl
full
slideInBottom
slideInRight
scale
none
Lock Body Scroll
Checkbox, default disabled
If enabled, the body scroll will be locked when modal is open.
Is Centered
Checkbox, default disabled
If enabled, the modal will be centered vertically on screen.
Close On Overlay Click
Checkbox, default disabled
If enabled, the modal will close when the overlay is clicked.
Return Focus on Close
Checkbox, default disabled
If enabled, the modal will return focus to the element that triggered it when it closes.
Preserve Scrollbar Gap
Checkbox, default disabled
If enabled, the padding-right
will be applied to the body element that's equal to the width of the scrollbar.
Custom Styles (required) String, css style property input Can apply additional CSS styles to customize the modal.
Custom Styles (required) String, css style property input Can apply additional CSS styles to customize the modal overlay.
repeat-x
repeat-y
repeat
space
round
no-repeat
Custom Styles (required) String, css style property input Can apply additional CSS styles to customize the modal body.
sm
md
lg
Hide Close Button
Checkbox, default disabled
If enabled, the close button of the modal will be hidden.
Close Icon Color
String - Valid color string (white
) or hex code (#FFFFF
)
If defined, overrides the default color of the close button.
Custom Styles (required) String, css style property input Can apply additional CSS styles to customize the close button.
Broadcast event whenever a modal has been opened.
Broadcast event whenever a modal has been closed.
Opens a modal.
Closes a modal.
(required) Dropdown Sets the sizing of the modal module. The following options can be used:
(required) Dropdown, default slideInBottom Sets the transition animation of the Module. The following options are available:
String - Valid color string (white
) or hex code (#FFFFF
)
Sets Modal background color.
String
Sets the Modal border radius (in px or em). Example: 5px
or 25%
String
If defined, sets the position from top of viewport if isCentered
is not checked.
String - Valid color string (white
) or hex code (#FFFFF
)
Sets the background color for the modal overlay.
String - Valid color string (white
) or hex code (#FFFFF
)
Sets the background color for the modal body.
String
Defines the padding around the edge of the modal body. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 6px
or 1em
String
Defines the margin spacing around the outside of the modal body. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 500px
or 5em
String
Defines the minimum height of the modal body. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 6px
or 1em
String
Defines the minimum width of the modal body. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 6px
or 1em
String
Overrides the default height of the modal body. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 500px
or 5em
String
Overrides the default width of the modal body. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 500px
or 5em
String, url If defined, sets the linked image to be the background of the modal body.
String, css property Sets how background images are repeated in the modal body. Options include:
String, css property Sets whether the modal body's background image position is fixed within the viewport, or scrolls with its containing block.
String, css property Sets the initial position for the modal body's background image.
String, css property Sets the size of the modal body's background image.
Dropdown, default md
Sets the sizing of the close button. The following options can be used:
String
If defined, sets the close button curve radius. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 5px
or 25%
String - Valid color string (white
) or hex code (#FFFFF
)
Sets the background color for the close button.
String, css property Sets the close button's border. It can be used to set the values of , , and .
String
If defined, sets the padding space between contents and border of the close button. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 6px
or 1em
String
If defined, adds margin spacing around the close button. This property accepts lengths followed by a relative unit (em
, ex
, or px
) or percentages. Example: 500px
or 5em