BToast Migration
Migration notes for BToast from BootstrapVue to BootstrapVueNext.
BToast Migration
Summary
Migration notes for BToast from BootstrapVue to BootstrapVueNext.
Affected APIs
- BToast
Breaking Change
Global Toast Management System Changes
$bvToast instance methods are deprecated:
this.$bvToast.show(options)→ UseuseToastcomposable withcreate()methodthis.$bvToast.hide(target)→ UseuseToastcomposable or template refs with.hide()this.$bvToast.hideAll()→ UseuseToastcomposable
Named toaster system is deprecated:
<b-toaster>targets → Use Vue'sTeleportcomponent oruseToastpositioning- Toaster positioning CSS → Use CSS positioning on individual toasts or toast containers
Alternative approaches:
Please see useToast for the modern method of programmatically creating and managing toasts.
Props Changes
Renamed props:
visible→model-value- Controls both visibility and auto-dismiss timing (replaces separatevisiblemodel)no-auto-hide→ Setmodel-valuetofalseortrue(boolean) instead of using auto-hide durationauto-hide-delay→ Setmodel-valueto number of milliseconds for auto-dismiss duration
Removed props (not implemented in BootstrapVueNext):
hrefandto- UseuseToastwith BLink props or see BLink Integration in the toast documentationtoaster- UseTeleportoruseToastpositioning insteadappend-toast- Available onuseToastinsteadb-toaster-*related props - Use modern positioning withTeleportstatic- BToast renders in place by default (no teleporting behavior)
New props in BootstrapVueNext:
progress-props- Configure built-in progress bar for timed toastsno-progress- Hide progress bar on timed toastsshow-on-pause- Control visibility when countdown is pausedinterval- Control countdown timer update frequency (default:'requestAnimationFrame')solid- Disable toast transparency (same as BootstrapVue)
Auto-dismiss Behavior Changes
BootstrapVue: Used separate props for auto-hide configuration:
<BToast
auto-hide
auto-hide-delay="5000"
no-hover-pause
/>BootstrapVueNext: Uses model-value for both visibility and auto-dismiss:
<!-- Boolean for show/hide -->
<BToast v-model="show" />
<!-- Number for auto-dismiss duration in milliseconds -->
<BToast
:model-value="5000"
no-hover-pause
/>Event System Changes
Event naming changes:
- No
$rootevent system - toasts are managed through composables or direct component references - All events now use the standardized show/hide event lifecycle
New events: BootstrapVueNext adds several events:
close-countdown- Emitted during countdown with remaining millisecondsupdate:model-value- Standard v-model event for visibility/duration changes- Standard show/hide lifecycle events:
show,shown,hide,hidden,show-prevented,hide-prevented,toggle,toggle-prevented
Slots Changes
Renamed slots:
toast-title→title- Toast header title content
Available slots:
default- Toast body content (enhanced with slot scope data)title- Toast header title content (wastoast-titlein BootstrapVue)close- Custom close button content (new in BootstrapVueNext)
Enhanced slot scope: All slots now receive scope data with control functions:
id- Toast component IDshow()- Function to show the toasthide()- Function to hide the toasttoggle()- Function to toggle visibilityvisible- Current visibility stateactive- Whether countdown timer is active
Accessibility Improvements
Enhanced ARIA support:
isStatusprop correctly toggles betweenrole="alert"(default) androle="status"- Corresponding
aria-livevalues:"assertive"(default) and"polite" aria-atomic="true"automatically applied for better screen reader announcementstabindex="0"for keyboard accessibility
See Show and Hide shared properties.
Migration Notes
- Extracted from the canonical BootstrapVue → BootstrapVueNext migration guide.
- Review related migrations for shared prop, event, and slot changes.
Safe Automatic Rewrite
No. This entry includes behavioral or structural changes and should be reviewed manually before applying automated transforms.