Modus Bootstrap
Modus Bootstrap is a responsive framework for web and mobile uses and is built upon and extends the Bootstrap 4 code framework.
You can use the CSS files as is, or integrate the Sass files into your own application if you wish to modify it further.
CDN
Modus Bootstrap can be used as is from our public CDN:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@trimbleinc/modus-bootstrap@1.6.4/dist/modus.min.css" />
If you want to also use the Modus Bootstrap Framework layout (top nav, left nav, and content area) you will need to add these additional references in the head BEFORE Modus Bootstrap:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@trimbleinc/modus-bootstrap@1.6.4/dist/modus-layout.min.css" />
<script src="https://cdn.jsdelivr.net/npm/@trimbleinc/modus-bootstrap@1.6.4/dist/modus-layout.min.js"></script>
You do not (and should not) include additional references to Bootstrap CSS other than their JavaScript links for component functions. If you are using Angular, React, or other framework you should use an appropriate Bootstrap library.
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
Install with npm
Install Modus Bootstrap with our npm package:
$ npm install --save-dev @trimbleinc/modus-bootstrap
The compiled CSS files will be found in the ./node_modules/@trimbleinc/modus-bootstrap/dist
directory.
Customize using Sass
The Sass files will be found in the /scss
directory.
Development
Build CSS, run dev server, and watch for changes
npm run dev
Sample page found at http://localhost:3030/
Build Package
Builds the CSS files to /dist
npm run build
File structure
Whenever possible, avoid modifying Modus Bootstrap or Bootstrap core files.
For Sass, that means creating your own stylesheet that imports Modus Bootstrap and Bootstrap so you can modify and extend it. Assuming you’re using a package manager like npm, you’ll have a file structure that looks like this:
your-project/
├── scss
│ └── custom.scss
└── node_modules/
├── bootstrap
│ ├── js
│ └── scss
└── @trimblemaps
└──modus-framework
└── scss
Importing
In your custom.scss, you’ll import Modus Bootstrap and Bootstrap’s source Sass files. With that setup in place, you can begin to modify any of the Sass variables and maps in your custom.scss.
You can also start to add parts of Bootstrap under the // Optional
section as needed. We suggest using the full import stack from our bootstrap.scss
file as your starting point.
The main file to focus on is the _theme.scss
file (and/or _theme-dark.scss
if you want a dark look).
You should copy this file from /node_modules/@trimbleinc/modus-bootstrap/scss/components
to your own SASS directory and import your copy instead of the Modus Bootstrap Framework version in your main SASS file.
This example shows you how you should structure your main file. The order in which files are imported matters.
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/@trimbleinc/modus-bootstrap/scss/components/functions";
@import "your_custom_sass_directory/your_copy_of_modus_theme_file";
@import "../node_modules/@trimbleinc/modus-bootstrap/scss/components/variables";
@import "../node_modules/bootstrap/scss/variables";
@import "../node_modules/bootstrap/scss/mixins";
@import "../node_modules/@trimbleinc/modus-bootstrap/scss/components/mixins";
@import "../node_modules/bootstrap/scss/reboot";
@import "../node_modules/bootstrap/scss/type";
@import "../node_modules/bootstrap/scss/images";
@import "../node_modules/bootstrap/scss/code";
@import "../node_modules/bootstrap/scss/grid";
@import "../node_modules/bootstrap/scss/tables";
@import "../node_modules/bootstrap/scss/forms";
@import "../node_modules/bootstrap/scss/buttons";
@import "../node_modules/bootstrap/scss/transitions";
@import "../node_modules/bootstrap/scss/dropdown";
@import "../node_modules/bootstrap/scss/button-group";
@import "../node_modules/bootstrap/scss/input-group";
@import "../node_modules/bootstrap/scss/custom-forms";
@import "../node_modules/bootstrap/scss/nav";
@import "../node_modules/bootstrap/scss/navbar";
@import "../node_modules/bootstrap/scss/card";
@import "../node_modules/bootstrap/scss/breadcrumb";
@import "../node_modules/bootstrap/scss/pagination";
@import "../node_modules/bootstrap/scss/badge";
@import "../node_modules/bootstrap/scss/jumbotron";
@import "../node_modules/bootstrap/scss/alert";
@import "../node_modules/bootstrap/scss/progress";
@import "../node_modules/bootstrap/scss/media";
@import "../node_modules/bootstrap/scss/list-group";
@import "../node_modules/bootstrap/scss/close";
@import "../node_modules/bootstrap/scss/toasts";
@import "../node_modules/bootstrap/scss/modal";
@import "../node_modules/bootstrap/scss/tooltip";
@import "../node_modules/bootstrap/scss/popover";
@import "../node_modules/bootstrap/scss/carousel";
@import "../node_modules/bootstrap/scss/spinners";
@import "../node_modules/bootstrap/scss/utilities";
@import "../node_modules/bootstrap/scss/print";
@import "../node_modules/@trimbleinc/modus-bootstrap/scss/components/controls";
@import "../node_modules/@trimbleinc/modus-bootstrap/scss/components/base";
@import "../node_modules/@trimbleinc/modus-bootstrap/scss/components/file-drop-zone";
@import "your_custom_sass_directory/your_project_specific_sass_files";