BootstrapVueNext
BootstrapVueNext is a comprehensive UI component library that seamlessly integrates Vue 3, Bootstrap 5, and TypeScript, offering a robust foundation for modern, type-safe web application development. It provides a rich and accessible set of pre-built components that mirror Bootstrap's styling and functionality, while leveraging Vue 3's composition API and reactivity system. The library is under active development, with its current stable version being 0.44.5 (as of April 2026), and exhibits a rapid release cadence, often seeing multiple updates within a month. Key differentiators include its full TypeScript support, commitment to accessibility (a11y), built-in server-side rendering (SSR) compatibility, and dedicated Nuxt 3 integration, making it a powerful choice for full-stack Vue ecosystems. It serves as a modern successor to older BootstrapVue iterations, aligning with the latest advancements in Vue and Bootstrap.
Common errors
-
ReferenceError: window is not defined
cause Attempting to access browser-specific global objects (like `window`, `document`, `localStorage`) during server-side rendering (SSR).fixWrap browser-specific code in `onMounted` hook or use conditional checks like `if (typeof window !== 'undefined') { /* client-side code */ }`. -
Component 'BOtpInput' is not found. Did you register it properly?
cause Using the old component name `BOtpInput` after updating to `bootstrap-vue-next` version 0.44.5 or later.fixReplace all instances of `<BOtpInput>` with `<BFormOtp>` and update your import statements from `import { BOtpInput }` to `import { BFormOtp }`. -
Uncaught SyntaxError: Cannot use import statement outside a module
cause Attempting to use ESM `import` syntax in a CommonJS (CJS) environment without proper transpilation or module configuration.fixEnsure your project is configured for ESM (e.g., `"type": "module"` in `package.json` for Node.js, or using a bundler like Vite/Webpack that handles ESM). If stuck with CJS, you may need a build step or consider dynamically importing ESM modules if supported by your runtime.
Warnings
- breaking The component `BOtpInput` was renamed to `BFormOtp` for consistency and clarity within the form components. Direct usage of `BOtpInput` will result in component not found errors.
- gotcha When developing with Server-Side Rendering (SSR), accessing browser-specific globals like `window` or `document` directly in component setup or module scope can lead to `ReferenceError: window is not defined` errors during the SSR build process.
- gotcha BootstrapVueNext relies on Bootstrap 5 CSS for its styling. Neglecting to import the Bootstrap 5 CSS file will result in unstyled components, even if the components are correctly rendered.
Install
-
npm install bootstrap-vue-next -
yarn add bootstrap-vue-next -
pnpm add bootstrap-vue-next
Imports
- BootstrapVueNext
const BootstrapVueNext = require('bootstrap-vue-next')import BootstrapVueNext from 'bootstrap-vue-next'
- BButton
import BButton from 'bootstrap-vue-next/BButton'
import { BButton } from 'bootstrap-vue-next' - BModal
import { BModal } from 'bootstrap-vue-next/components'import { BModal } from 'bootstrap-vue-next' - BFormOtp
import { BOtpInput } from 'bootstrap-vue-next'import { BFormOtp } from 'bootstrap-vue-next' - BTableProps
import type { BTableProps } from 'bootstrap-vue-next'
Quickstart
import { createApp } from 'vue';
import BootstrapVueNext from 'bootstrap-vue-next';
import { BButton, BModal } from 'bootstrap-vue-next';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap-vue-next/dist/bootstrap-vue-next.css';
const app = createApp({
template: `
<div class="container mt-5">
<h1>Welcome to BootstrapVueNext!</h1>
<BButton variant="primary" @click="showModal = true">Open Modal</BButton>
<BModal v-model="showModal" title="Example Modal" ok-only>
<p>This is a modal powered by BootstrapVueNext.</p>
<p>It integrates Bootstrap 5 styling and Vue 3 reactivity.</p>
</BModal>
</div>
`,
data() {
return {
showModal: false
};
},
components: {
BButton,
BModal
}
});
app.use(BootstrapVueNext);
app.mount('#app');