Package com.vaadin.flow.component.trigger
@NullMarked
package com.vaadin.flow.component.trigger
Server-side API for wiring client-side triggers (DOM events, shortcuts, …) to
client-side actions (clipboard copy, set property, run JS, …) reading values
from outputs, without a server round-trip when not needed.
The trigger API is intentionally open for extension: applications and add-ons
declare new trigger, action and output types by extending
AbstractTrigger,
AbstractAction or
AbstractOutput and pairing them
with a JavaScript handler registered under the same type id against
window.Vaadin.Flow.triggers.
-
ClassDescriptionBase class for
Actionimplementations.Base class forOutputimplementations.Base class forTriggerimplementations.Something that runs on the client when aTriggerfires.Callstarget.click()on a target element, dispatching a synthetic click event.Fires when the host element receives aclickDOM event.Copies a value to the user's clipboard vianavigator.clipboard.writeText.Action backed by an arbitrary JavaScript expression — the escape hatch for cases not covered by a built-inAbstractAction.JsOutput<T>Output backed by an arbitrary JavaScript expression — the escape hatch for cases not covered by a built-inAbstractOutput.Trigger backed by an arbitrary JavaScript expression — the escape hatch for cases not covered by a built-inAbstractTrigger.Output<T>A value produced on the client at the moment a trigger fires, snapshotted and passed into the boundactions.Reads a JavaScript property from a target element at the moment a trigger fires.Sets a target element's enabled state.Fires when the given key (with optional modifiers) is pressed while the host element is the active scope.SignalOutput<T>Output backed by a server-sideSignal.Something that fires on the client and, when it does, runs one or moreactionssynchronously inside the original DOM event handler.