Bootstrap 5 Theme
The Bootstrap 5 theme makes DotSelect match the look and feel of Bootstrap 5 form controls. It uses Bootstrap's design tokens for colors, spacing, borders, and typography.
Usage
CDN
Include Bootstrap 5 CSS first, then the DotSelect Bootstrap theme:
html
<!-- Bootstrap 5 CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<!-- DotSelect Bootstrap 5 Theme -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dot-select@latest/dist/css/themes/bootstrap5.min.css">
<!-- DotSelect JS -->
<script src="https://cdn.jsdelivr.net/npm/dot-select@latest/dist/js/dot-select.min.js"></script>npm
js
import 'bootstrap/dist/css/bootstrap.min.css';
import 'dot-select/dist/css/themes/bootstrap5.min.css';SCSS
scss
// Import Bootstrap variables first
@import 'bootstrap/scss/variables';
// Then import the DotSelect Bootstrap 5 theme
@import 'dot-select/src/scss/themes/bootstrap5';Integration with Bootstrap Forms
DotSelect inherits Bootstrap's form sizing and validation states:
Form Sizes
The theme respects Bootstrap's .form-select-sm and .form-select-lg classes:
Validation States
Bootstrap validation classes are supported:
Input Groups
Use DotSelect inside Bootstrap input groups:
Bootstrap Theme Variables
The Bootstrap 5 theme maps to Bootstrap's CSS custom properties:
| DotSelect Variable | Bootstrap Equivalent |
|---|---|
$ds-primary-color | var(--bs-primary) |
$ds-border-color | var(--bs-border-color) |
$ds-border-radius | var(--bs-border-radius) |
$ds-font-family | var(--bs-body-font-family) |
$ds-font-size | var(--bs-body-font-size) |
$ds-focus-ring-color | var(--bs-focus-ring-color) |
TIP
If you customize Bootstrap's SCSS variables, the DotSelect Bootstrap theme will automatically pick up those changes when compiled together.