Skip to main content
skill CX Codex

bootstrap-v6-install — Claude Code skill: what it does, how to install

bootstrap-v6-install — a skill for Claude Code and Cursor that sets up Bootstrap 6 via CDN or package manager. The script configures Sass, JavaScript, and local paths.

MIT 677 installs ★ 175,109 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add twbs/bootstrap --skill bootstrap-v6-install -a claude-code
Open on GitHub

What bootstrap-v6-install does

This skill adds Bootstrap 6 to a project and configures the environment for local development. It supports two paths: a CDN setup without a build step and an npm package manager setup for customizing Sass tokens and bundling JavaScript.

The skill guides through inserting CSS into the head and placing scripts before the closing body tag. The npm path requires Node.js and a Sass compiler, importing source files with the modern @use rule and handling dependencies like Floating UI and Vanilla Calendar Pro.

What it helps with

  • add Bootstrap 6 via CDN
  • install Bootstrap through npm
  • configure Sass compilation in a project
  • set up Bootstrap JavaScript components

Example prompts for the agent

  • Set up Bootstrap 6 using CDN in this project
  • Install Bootstrap 6 via npm with Sass
  • Configure Bootstrap 6 styles and scripts

How to install bootstrap-v6-install

1Skills CLI (Vercel)

npx skills add twbs/bootstrap --skill bootstrap-v6-install -a claude-code

2Manually: put the files in place

~/.claude/skills/bootstrap-v6-install/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/bootstrap-v6-install/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about bootstrap-v6-install

How to install bootstrap-v6-install in Claude Code?

Run npx skills add twbs/bootstrap --skill bootstrap-v6-install -a claude-code and check ~/.claude/skills/bootstrap-v6-install/SKILL.md.

What does bootstrap-v6-install do?

It adds Bootstrap 6 to a project and sets up CSS, JavaScript, and local development configurations.

What is required to use bootstrap-v6-install?

The npm installation path requires Node.js and a Sass compiler, while the CDN path requires no build step.

Source text

SKILL.md · MIT
---
name: bootstrap-v6-install
description: Add Bootstrap 6 to a project and set it up for local development. Use when installing Bootstrap, adding Bootstrap to a new or existing project, or setting up Bootstrap's CSS and JavaScript via CDN or a package manager.
guide: /getting-started/install
---

# Add Bootstrap 6 to a Project

This skill sets up Bootstrap 6 in a user's project. Pick the path that matches the project: **CDN** for the fastest start with no build step, or **package manager** (npm) for customizing Sass and bundling JS. For a full bundler-specific setup, use the dedicated `bootstrap-npm`, `bootstrap-vite`, `bootstrap-webpack`, or `bootstrap-parcel` skills instead.

## Workflow

- [ ] Step 1: Choose an install path (CDN vs. package manager)
- [ ] Step 2: Install Bootstrap and dependencies
- [ ] Step 3: Include Bootstrap's CSS
- [ ] Step 4: Include Bootstrap's JavaScript
- [ ] Step 5: Verify

---

## Step 1: Choose an install path

- **CDN** — no build step. Best for static pages, demos, and prototypes. Skip to the CDN section below.
- **Package manager (npm)** — required to customize Bootstrap's Sass tokens or tree-shake JS. Requires Node.js and a Sass compiler. Continue with the npm section.

Bootstrap 6 depends on two optional peer packages:

- `@floating-ui/dom` — positioning for menus, popovers, and tooltips. Omit if you don't use them.
- `vanilla-calendar-pro` — the datepicker. Omit if you don't use it.

---

## Step 2 & 3 (CDN): Include via CDN

Add Bootstrap's CSS in `<head>` and the JS bundle before the closing `</body>`. The bundle includes Floating UI and Vanilla Calendar Pro.

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap demo</title>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-B/GM4XqrwHnWXNOWMbloTmrYXZg10cakYGmpfsR/bbzQ6JAJI4ihuyADKLnBgrCe" crossorigin="anonymous">
  </head>
  <body>
    <div class="container py-4 px-3 mx-auto">
      <h1>Hello, Bootstrap!</h1>
      <button class="btn-solid theme-primary">Primary button</button>
    </div>
    <script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-1a/pXj49ZQ1aHEmrJ+gMw1otqoVsYwlEnlD8mIfY2TV03r20Y0CN7uqx1tQogjPL" crossorigin="anonymous"></script>
  </body>
</html>
```

Copy the exact URLs and hashes from the Install docs when you use a different version. Never guess an SRI hash. The `crossorigin="anonymous"` attribute is required for SRI to work.

To load Floating UI and Vanilla Calendar Pro separately (smaller payload), use the non-bundle JS with an import map:

```html
<script type="importmap">
{
  "imports": {
    "@floating-ui/dom": "https://cdn.jsdelivr.net/npm/@floating-ui/dom/+esm",
    "vanilla-calendar-pro": "https://cdn.jsdelivr.net/npm/vanilla-calendar-pro/+esm"
  }
}
</script>
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-BJf/nQgxZJU68GxBse97Vdlc8Rh+z9PzzXiS3/BjV+1nQPR7IKn+iJnD3DJvCMaU" crossorigin="anonymous"></script>
```

For a CDN setup you're done — skip to **Step 5: Verify**.

---

## Step 2 (npm): Install

```sh
npm install [email protected] @floating-ui/dom vanilla-calendar-pro
```

Bootstrap 6 requires a **Sass compiler** (Dart Sass) and **PostCSS/Autoprefixer** to match the official compiled output. Node Sass is not supported. Install the build tooling your setup needs, e.g.:

```sh
npm install --save-dev sass autoprefixer postcss postcss-cli
```

## Step 3 (npm): Include Bootstrap's CSS

Import Bootstrap's source Sass with the modern `@use` rule (never `@import` — it's removed in Dart Sass and unsupported in v6):

```scss
// Import all of Bootstrap's CSS
@use "bootstrap/scss/bootstrap";
```

Customize tokens with the `with ()` syntax. Only include the keys you want to change — Bootstrap merges overrides with its defaults:

```scss
@use "bootstrap/scss/bootstrap" with (
  $root-tokens: (
    --border-radius: .25rem,
    --spacer: 1.5rem,
  )
);
```

Override CSS custom properties through the token maps (`$root-tokens` and each component's `$*-tokens` map), following [Customize › Sass](https://getbootstrap.com/docs/6.0/customize/sass/#compile-time-overrides). Token names are written **unprefixed** in Sass (e.g. `--border-radius`, `--spacer`); Bootstrap's dist/CDN CSS runs PostCSS to add the `--bs-` prefix, so compiling the source yourself keeps them unprefixed.

Compile the Sass to CSS with a `--load-path=node_modules` so `bootstrap` resolves, then run Autoprefixer via PostCSS.

## Step 4 (npm): Include Bootstrap's JavaScript

Bootstrap 6 JavaScript is ESM-only. Import all plugins onto a `bootstrap` object:

```js
import * as bootstrap from 'bootstrap'
```

Or import only what you need for automatic tree-shaking:

```js
import { Tooltip, Toast, Popover } from 'bootstrap'
```

You can also import a single plugin directly from its file under `bootstrap/js/dist/`.

Floating UI and Vanilla Calendar Pro are imported automatically through Bootstrap when a bundler is used.

---

## Step 5: Verify

1. Load the page (or run the dev server) and confirm the sample `.btn-solid.theme-primary` button and `.container` are styled — that proves Bootstrap's CSS is loaded.
2. Trigger a JS component (e.g. a tooltip or dialog) to confirm the JavaScript loaded without console errors.
3. For CDN setups, confirm the `integrity` hashes match the version you linked (mismatched hashes block the file from loading).
4. If Sass fails to compile, confirm you used `@use` (not `@import`) and passed `--load-path=node_modules`. If it reports an undefined Bootstrap variable or mixin, add the `bootstrap.` namespace (`bootstrap.$spacer`) or load Bootstrap with `@use "bootstrap/scss/bootstrap" as *;`.
5. Bootstrap 6 requires a browser that supports `oklch()` and `color-mix()`.

© twbs · MIT · twbs/bootstrap

Similar skills

All skills for Frontend and UI →

From the same set11

The whole set →
bootstrap-color-system bootstrap-color-system — a Claude Code skill for editing Bootstrap 6 colors in Sass and CSS. It activates for theme color changes, color modes, and work with semantic tokens or color scales. CX Codex +1 703installs bootstrap-component bootstrap-component — a skill for Claude Code that automates the creation of Bootstrap 6 components. It generates CSS, markup, and token maps when building new UI elements. CX Codex +1 697installs bootstrap-component-js The bootstrap-component-js Claude Code skill guides JavaScript work on Bootstrap 6 components. It applies when adding a TypeScript module, wiring events and the data API, or wrapping a third-party library. CX Codex +1 687installs bootstrap-utility-api bootstrap-utility-api — a skill for Claude Code that manages the Bootstrap 6 utility API. It helps add, modify, or remove utility classes by editing the $utilities Sass map. CX Codex +1 676installs bootstrap-v5-v6-migration bootstrap-v5-v6-migration is a Claude Code skill that guides project upgrades from Bootstrap 5 to 6. It runs when updating build tools, CSS classes, components, Sass tokens, or scripts. CX Codex +1 667installs bootstrap-vite The bootstrap-vite Claude Code skill sets up Bootstrap 6 CSS and JavaScript in a Vite project. It activates for project setup or when bundling Bootstrap Sass through Vite. CX Codex +1 641installs bootstrap-npm bootstrap-npm — a skill for Claude Code and Cursor builds a Bootstrap 6 starter project using npm and command-line tools without a bundler. Runs when setting up Bootstrap with npm or compiling Sass. CX Codex +1 639installs bootstrap-parcel The bootstrap-parcel Claude Code skill sets up Bootstrap 6 in a Parcel project. It connects Sass and JavaScript, adds a start script, and guides the build check. CX Codex +1 612installs

Project sponsors

Companies that keep this analytics open