Back to migration overview
v-b-modal Migration
Migration notes for v-b-modal from BootstrapVue to BootstrapVueNext.
v-b-modal Migration
Summary
Migration notes for v-b-modal from BootstrapVue to BootstrapVueNext.
Affected APIs
- None explicitly listed
Breaking Change
Relationship with v-b-toggle
In BSVN, v-b-modal is an alias for v-b-toggle:
- Both directives work identically
v-b-modalis semantically clearer when working with modalsv-b-toggleworks with modals, collapse, and offcanvas- Use whichever makes your code more readable
template
<!-- BSV: Only v-b-modal worked with modals -->
<BButton v-b-modal.my-modal>Show Modal</BButton>template
<!-- BSVN: Both work identically - choose based on semantics -->
<BButton v-b-modal.my-modal>Show Modal</BButton>
<BButton v-b-toggle.my-modal>Show Modal</BButton>New Features in BSVN
Array value support:
template
<!-- BSVN allows arrays (BSV required space-separated strings) -->
<BButton v-b-modal="['modal-1', 'modal-2']">Show Multiple</BButton>CSS class tracking:
BSVN adds collapsed/not-collapsed classes to trigger elements based on modal state, allowing for conditional styling.
Migration from BSV this.$bvModal.show(id):
BSV's this.$bvModal.show(id) has been replaced with multiple approaches. See the BModal directive documentation for detailed migration examples.
Migration Notes
- Extracted from the canonical BootstrapVue → BootstrapVueNext migration guide.
Safe Automatic Rewrite
Yes. This entry is mostly mechanical and can usually be rewritten automatically when the surrounding code matches the documented patterns.
Related Migrations
- None