Document that tabler.js already includes Bootstrap (#3103)

This commit is contained in:
Paweł Kuna authored and GitHub committed 2026-09-21 10:22:45 +02:00
1 parent 9268348a7e
commit 5a735bc049
2 files changed
+21

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@tabler/docs": patch
---
Added a note to the installation docs that `tabler.js` already includes Bootstrap and must not be loaded next to it.
@@ -72,4 +72,20 @@ Save the file and open it in your browser. You should see your first page styled
</Steps> </Steps>
## Bootstrap is already included
Tabler's JavaScript file contains Bootstrap's JavaScript. Do not load `bootstrap.bundle.js` or `import 'bootstrap'` next to it.
<Warning title="Load Bootstrap only once">
With two copies on the page, every `data-bs-toggle` element gets two handlers. One click then opens two backdrops for a modal or an offcanvas, and dropdowns and tooltips open twice.
</Warning>
Use the components that Tabler exposes instead. With the script tag they are on the `tabler` global, for example `tabler.Modal` or `tabler.Offcanvas`. With a bundler, import them from the package:
```js
import { Modal, Offcanvas } from '@tabler/core'
```
If you need your own copy of Bootstrap's JavaScript, load only Tabler's CSS and leave `tabler.js` out.
If you want to see what's possible, the demo pages at [preview.tabler.io](https://preview.tabler.io) show every layout and component in use. The rest of this documentation covers each of them in detail. If you want to see what's possible, the demo pages at [preview.tabler.io](https://preview.tabler.io) show every layout and component in use. The rest of this documentation covers each of them in detail.