# Modal A modal dialog with its trigger button. The shortcode renders both the button and the dialog. ![Open modal dialog](https://book.lewe.com/bootstrap-visuals/assets/component-modal.png "Open modal dialog") ## Example ```text wrap [bsv-modal title="Details" button_text="Open details" button_style="info" size="lg"]The modal content.[/bsv-modal] ``` ## Format ```text wrap [bsv-modal parameter="value" ...]your content here[/bsv-modal] ``` ## Parameters | Parameter | Description | Default | | --- | --- | --- | | `id` | Optional dialog ID. When empty, a unique `bsv-modal-N` ID is generated. | _generated_ | | `title` | The dialog title. | _empty_ | | `size` | Dialog width: `sm`, `lg` or `xl`. | _default_ | | `button_text` | Text of the trigger button. | `Open Modal` | | `button_style` | Style of the trigger button: any of the eight Bootstrap styles. | `primary` | The dialog opens with a backdrop, locks body scroll, moves focus inside, traps Tab, closes on Escape or the close button, and restores focus to the trigger. `aria-modal`, `role="dialog"` and `aria-labelledby` are set. Without JavaScript the content is readable and the close button is hidden.