bootstrap.native is a robust JavaScript library providing native, dependency-free implementations of Bootstrap 5 components. It serves as a lightweight and performant alternative to Bootstrap's official JavaScript, deliberately omitting external dependencies like jQuery and Popper.js. The current stable version is 5.1.10. The project maintains an active release cadence, with frequent updates addressing bugs, performance enhancements, and compatibility with the latest Bootstrap 5.x releases. Its key differentiators include a minimal footprint (approximately 13Kb gZipped), a codebase entirely sourced with TypeScript, and an emphasis on modern browser APIs such as `PositionObserver` and `ResizeObserver` for superior performance. The library supports integration via npm, bun, pnpm, and deno, providing broad compatibility across different development environments.
npm install bootstrap.nativeVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and programmatically control a Bootstrap Modal component using `bootstrap.native` after the DOM is fully loaded.
Migrate all imports to ES Module (ESM) syntax using `import { Component } from 'bootstrap.native';`Use the static `getInstance` method on the component class instead, for example: `Alert.getInstance(myAlertElement)`.
Ensure your project is using Bootstrap 5 CSS classes and structure. If you need Bootstrap 4 support, use older versions of `bootstrap.native` or consult the legacy branch.
Remove the `container` option from your Tooltip and Popover configurations and adjust CSS if necessary to manage their positioning and z-index.
Use the static `getInstance` method on the component class: `import { Alert } from 'bootstrap.native'; const myAlert = Alert.getInstance(myElement);`Update your import statements to use ES Modules: `import { Modal } from 'bootstrap.native';`Ensure component initialization code runs after the `DOMContentLoaded` event, or within a script tag placed at the end of the `<body>`.
No dependency data recorded yet.