本文へスキップ
Kitbay
スキル

bootstrap-component-js

MIT2026年11月11日 更新175,039GitHubスター

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

スキルの内容

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.

できること

  • 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