
Product
Introducing Repository Labels and Security Policies
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
@types/bootstrap
Advanced tools
TypeScript definitions for bootstrap
@types/bootstrap provides TypeScript type definitions for the Bootstrap library, allowing developers to use Bootstrap with TypeScript and benefit from type checking and autocompletion.
Modal
This feature allows you to create and control Bootstrap modals using TypeScript. The code sample demonstrates how to initialize a modal with specific options.
const myModal = new bootstrap.Modal(document.getElementById('myModal'), { keyboard: false });
Tooltip
This feature allows you to create and manage tooltips using TypeScript. The code sample shows how to initialize tooltips for elements with the data-bs-toggle attribute.
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
const tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
Carousel
This feature allows you to create and control carousels using TypeScript. The code sample demonstrates how to initialize a carousel with specific options.
const myCarousel = document.querySelector('#myCarousel');
const carousel = new bootstrap.Carousel(myCarousel, {
interval: 2000,
wrap: false
});
@types/jquery provides TypeScript type definitions for jQuery. It is similar to @types/bootstrap in that it allows developers to use jQuery with TypeScript, benefiting from type checking and autocompletion. However, it focuses on jQuery rather than Bootstrap.
@types/popper.js provides TypeScript type definitions for Popper.js, a library used for positioning tooltips and popovers. It is often used in conjunction with Bootstrap but focuses specifically on positioning elements, unlike @types/bootstrap which covers a broader range of UI components.
@types/react-bootstrap provides TypeScript type definitions for React-Bootstrap, a library that offers Bootstrap components as React components. It is similar to @types/bootstrap but is specifically designed for use with React.
npm install --save @types/bootstrap
This package contains type definitions for bootstrap (https://getbootstrap.com/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bootstrap.
These definitions were written by denisname, Piotr Błażejewicz, Martin Badin, Kyle Tsang, and Luke Nelson.
FAQs
TypeScript definitions for bootstrap
The npm package @types/bootstrap receives a total of 355,243 weekly downloads. As such, @types/bootstrap popularity was classified as popular.
We found that @types/bootstrap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.
Product
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.