Slds modal height Do you know how can I set the width of a modal window opened by a lightning component action? In the edit options I can set only the height but is not enough because the content of my table is not completely shown. doInit}" /> <aura:attribute name="plico" type="Envelope__c" />. modal-body{ height : 40vh !important; max-height: 40vh !important; } . To apply custom styling, use the :host selector or define a custom class using the class attribute. slds-modal__container{ height : auto; width: 80%; max-width: 70vh; } . slds-modal__content{ height : 550px !important; max-height: 800px !important; } My understanding is they added a slds-modal__content size so you need to override that as well. </div. Are you looking to have a generic custom SLDS Lightning Web Component modal where you can easily change the modal size, headers, body and footer with minimal javascript required? This blog is for you. We can crack the code by using parent css selector. Default value is medium. . Below a part of the app. Modals grow according to how much content is within, but <aura:html tag="style"> . size - Determines how much of the viewport width the modal uses. The core of this workaround to create a quick action with greater widths than that of a standard quick action width is creating an slds-modal on top of the standard modal of quick action. Share The modal height should adjust based on the content inside - the modal content block (. css. Modals always have an equal amount of space at the top and bottom to account for the height of the close button. slds-modal__container {margin:0 auto; width:50%; max-width:40rem; min-width:20rem} In the <section> tag of the modal, add the class slds-modal_large or slds-modal_medium, depending on what you want. lightning-modal-body implements the modals blueprint in the Salesforce Lightning Design System (SLDS). <div class="slds-modal__container"> SOME MODAL STUFF HERE. You can set the size attribute when you open the modal. slds-modal__footer{ display: inline !important; } </aura:html> Note: You can update the given width and height as per your requirement. doInit}" /> <aura:attribute name="plico" type="Envelope__c" /> Modals always have an equal amount of space at the top and bottom to account for the height of the close button. Here is the code: <aura:handler name="init" value="{!this}" action="{!c. through css we set the modal width and position to the center of the page. Let’s create a Lightning Web Component named modal with these files:- The modal's maximum height is calculated to prevent the content from exceeding the screen height, and scroll bars are automatically added. Supported values are small, medium, large, and full. The height of the modal is determined by the amount of content in the lightning-modal-body component, and the size value. slds-modal__content) will begin to scroll when maximum height is reached. ptcbesqkpdflmyhzpofxxzhsprbmyvtbodqvwfodzplfijki
close
Embed this image
Copy and paste this code to display the image on your site