Skip to content

BootstrapModalTagHelpers

StrutTower edited this page Feb 27, 2026 · 1 revision

Tag helper for render Bootstrap modals

<bs-modal id="modal-id" title="Title Text">
    <bs-modal-body>
        Modal body content
    </bs-modal-body>
    <bs-modal-footer>
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
    </bs-modal-footer>
</bs-modal>
Name Required Data Type Default Value Description
id Optional string NULL Sets the id of the modal. Technically optional but the id is normally used to target modals to open them
title Optional string NULL Sets the title of the modal. Does nothing if show-header is set false
show-header Optional boolean True Sets if the modal-header element should be rendered this include the close button in the top right
dialog-scrollable Optional boolean False Sets if the modal-dialog scrolls vertically. Bootstrap Docs
vertically-centered Optional boolean False Set the modal to open in the middle of the viewport. Bootstrap Docs
static-backdrop Optional Boolean False If true, the modal cannot be closed by clicking the backdrop or hitting ESC. Bootstrap Docs
modal-width Optional ModalWidth NULL Sets the width of the modal. Uses TowerSoft.TagHelpers.Options.ModalWidth enum. Bootstrap Docs
modal-fullscreen Optional ModalFullscreen NULL Sets the fullscreen settings of the modal. Uses TowerSoft.TagHelpers.Options.ModalFullscreen enum. Bootstrap Docs

Clone this wiki locally