ModalOpener

ModalOpener Stimulus Controller

Provides programmatic modal triggering through value-driven activation. Automatically opens Bootstrap modals when the modalBtn value is set, enabling remote modal control and confirmation workflows.

Features:

  • Value-driven modal activation
  • Automatic modal triggering
  • Bootstrap modal integration
  • Programmatic control from other controllers
  • Confirmation dialog support
  • Remote modal opening capability

Values:

  • modalBtn: String - ID of modal button element to trigger

Usage:

JavaScript usage: controller.modalBtnValue = "confirmModal"; // Triggers modal opening