ReadonlyactiveClasses to append when the mode is active & remove when inactive.
ReadonlycontextReadonlydelayDelay, in milliseconds, to use when debouncing the mode updates.
ReadonlyinactiveClasses to append when the mode is inactive & remove when active.
Tracks the current mode for this zone.
ReadonlyswitchKey to use when switching the active state via the switch method.
StaticblessingsStaticclassesStaticoutletsStatictargetsStaticvaluesStaticshouldOptionalprevious: ZoneModeIntentionally does nothing.
Useful for attaching data-action to leverage the built in
Stimulus options without needing any extra functionality.
e.g. preventDefault (:prevent) and stopPropagation (:stop).
Switches the active state of the zone, based ont he provided key from the event detail or params. If there is no key provided, it will use the fallback key of 'active'.
If the key's value is truthy, it will set the mode to active, otherwise it will set it to inactive.
If the key is not found in the event detail or params, it will do nothing.
Optionalevent: CustomEvent<{ mode?: ZoneMode }> & { params?: { mode: ZoneMode } }Staticafter
Enables the controlled element to respond to specific user interactions by adding or removing CSS classes dynamically.
Example: - Shows a hover effect when files are dragged over the element.
Example: - Switches the active state of the element based on a key value from the switch event.