Optional files configure Unpoly to work with Bootstrap's CSS classes. With the integration loaded, navigation feedback, form validation and overlays use the classes and layout rules that Bootstrap expects.
Load the files matching your Bootstrap version after Unpoly's own files. Builds for Bootstrap 3, 4 and 5 are available from a CDN:
| Development | Production |
|---|---|
unpoly-bootstrap3.js |
unpoly-bootstrap3.min.js (0.5 KB gzipped) |
unpoly-bootstrap3.css |
unpoly-bootstrap3.min.css (0.2 KB gzipped) |
unpoly-bootstrap4.js |
unpoly-bootstrap4.min.js (0.5 KB gzipped) |
unpoly-bootstrap4.css |
unpoly-bootstrap4.min.css (0.2 KB gzipped) |
unpoly-bootstrap5.js |
unpoly-bootstrap5.min.js (0.5 KB gzipped) |
unpoly-bootstrap5.css |
unpoly-bootstrap5.min.css (0.2 KB gzipped) |
The same files ship with Unpoly's npm package:
import 'unpoly/unpoly.js'
import 'unpoly/unpoly.css'
import 'unpoly/unpoly-bootstrap5.js' // mark-line
import 'unpoly/unpoly-bootstrap5.css' // mark-line
The JavaScript file adjusts Unpoly's configuration to Bootstrap's conventions:
active class to mark
current links and running interactions, and .nav and .navbar elements count
as navigational containers. See up.status.config.up.viewport.config..row and .col-*, are ignored
when Unpoly derives a target selector from an element.
See up.fragment.config.badTargetClasses.up.layer.config.foreignOverlaySelectors..form-group elements are used as form groups
when validating forms. Bootstrap 5 has no form group class,
so configure up.form.config.groupSelectors to match your own markup.The stylesheet lets .container and .container-fluid elements fill Unpoly
overlays without Bootstrap's page padding.
Tip Your coding agent can search these docs locally with the Unpoly agent skill