Zum Inhalt springen
Kitbay
Skill

bootstrap-component-js

MITAktualisiert am 11. Nov. 2026175.039GitHub-Sterne

A skill from the Bootstrap repository for adding JavaScript behaviour to a Bootstrap 6 component.

Was der Skill vermittelt

A skill from the Bootstrap repository for adding JavaScript behaviour to a Bootstrap 6 component. The agent writes a TypeScript module that extends Bootstrap's BaseComponent class, defines and validates config options, adds paired before and after events, wires the data attribute API, optionally positions elements with Floating UI or wraps a third-party library, cleans up in dispose, registers the export and adds a Vitest browser test. It then checks the work with the repository's lint, type-check, test, build and bundle-size scripts. A short final section shows how a project using Bootstrap can extend BaseComponent for its own components, with a warning about name clashes.

Funktionen

  • Write a Bootstrap 6 plugin that extends BaseComponent
  • Add config options, events and the data attribute API
  • Position menus and tooltips with Floating UI
  • Add a Vitest browser test for a component