Back to migration overview

Show and Hide Prop Migration

BootstrapVueNext standardizes visibility control around v-model and no*-prefixed rendering props.

Edit this page on GitHub

Show and Hide Prop Migration

Summary

BootstrapVueNext standardizes visibility control around v-model and no*-prefixed rendering props.

Affected APIs

  • BCollapse
  • BModal
  • BPlaceholder
  • BToast

Breaking Change

We have made an effort to standardize the names and behaviors of props that are related to the showing and hiding of components and sub-components.

The primary reactive way to control the visibility of a component is generally by use of the v-model rather than visible as in BCollapse, BModal, BToast. Note that show and visible are still supported for specifying the initial visibility of these components.

Rather than using hide as a prefix to specify that you don't want a sub-component to be rendered, we've moved to using no as the prefix. For instant in BPlaceholder, hideHeader becomes noHeader. Similarly we use the 'no' prefix in place of 'skip' in places like BCollapse where skipAnimation becomes noAnimation.

The properties and components that are affected by this change are shown in the following table:

Prop Old Prop Description Components
initial-animationappearWhen set, enables the initial animation on mount
lazylazyWhen set, the content will not be mounted until opened
model-valuevisibleControls the visibility of the component
no-animationskip-animationWhen set, disables the animation
no-backdrophide-backdropDisables rendering of the backdrop
no-ellipsishide-ellipsisDo not show ellipsis buttons
no-fadeskip-animationAlias for `noAnimation`
no-goto-end-buttonshide-goto-end-buttonsHides the go to first and go to last page buttons
no-headerhide-headerDisables rendering of the header
no-header-closehide-header-closeDisables rendering of the header close button
no-wrapperskip-wrapperDo not render the dropdown wrapper element
showWhen set, and prop 'visible' is false on mount, will animate from closed to open on initial mount. Mainly to help with template show. Use model-value for reactive show/hide
trans-propsTransition properties
unmount-lazylazyWhen set and `lazy` is true, the content will be unmounted when closed
visiblevisibleWhen 'true', open without animation

Migration Notes

  • Extracted from the canonical BootstrapVue → BootstrapVueNext migration guide.

Safe Automatic Rewrite

No. This entry includes behavioral or structural changes and should be reviewed manually before applying automated transforms.

  • None