Skip to content

Local Modal Drawer

<tpg-local-modal-drawer></tpg-local-modal-drawer>

Local Modal Drawers are alternative to Local Modals to accomplish longer and self-contained workflows. A typical example is when filling up a form to create or add a request.

They open from bottom to top and can be dismissed by the buttons on their header.

Local Modal Drawers are disruptive. Only use them when you need the user’s full attention for the action they are trying to accomplish.

Their footer follows the rules of the Modal Footer component.

Examples

Tables

Properties

Attribute Property Description Type Default Value
positioning positioning Determines the positioning of the modal: "global" for centering on the screen, "local" for centering within a parent container. 'global' | 'local' 'local'
allow-scroll allowScroll If the modal should prevent scrolling of the background when open. boolean true
is-open isOpen Whether or not the modal is open. Note: its recommended to open and close the modal through js methods showModal() and close(); boolean false
prevent-close-on-click-outside preventCloseOnClickOutside Prevents the modal from closing when clicking outside. boolean false

Events

Event name Reactjs attribute Description

Functions

Name Description Arguments
scrollDown Scrolls down the content by scrollAmount
  • scrollAmount: ??? = 50
scrollUp Scrolls up the content by scrollAmount
  • scrollAmount: ??? = 50
canScroll Check if fit is possible to scroll No parameters
showModal Opens the dialog - for consumers. No parameters
hideModal Closes the dialog - for consumers. No parameters

Slots

Name Description
header Slot reserved for a tpg-modal-header.
footer Slot reserved for tpg-footer
reserved for the content of the local modal.

CSS Parts

Attribute Description
No CSS parts found.

Sandbox