Skip to content

Installation

Getting Nuxt Bootstrap CSS running is a single step: add the module to your Nuxt config. There’s no stylesheet to import and no plugin to register — the module handles both for you.

The quickest way is the Nuxt CLI, which installs the package and adds it to your nuxt.config for you:

Terminal window
npx nuxi@latest module add nuxt-bootstrap-css

If you’d rather install it by hand, add the package with your preferred package manager:

Terminal window
# pnpm
pnpm add -D nuxt-bootstrap-css
Terminal window
# npm
npm install --save-dev nuxt-bootstrap-css
Terminal window
# yarn
yarn add --dev nuxt-bootstrap-css

Then add 'nuxt-bootstrap-css' to the modules array in nuxt.config.ts:

export default defineNuxtConfig({
modules: ['nuxt-bootstrap-css'],
})

The package bundles its runtime dependencies, so you don’t install them yourself:

  • bootstrap — the full Bootstrap SCSS and JavaScript.
  • @popperjs/core — the positioning engine Bootstrap uses for dropdowns, tooltips, and popovers.
  • sass — used to compile Bootstrap’s SCSS during the build.

You don’t have to add anything to your css array or import a stylesheet. The module registers bootstrap/scss/bootstrap.scss through Nuxt’s css option automatically, so the full Bootstrap stylesheet is compiled and server-rendered the moment the module is enabled.

  • Usage — use Bootstrap classes, interactive components, and dark mode.
  • Configuration — customize Bootstrap’s SCSS variables and theme.