skip to content

Relay

Takes one event and relays it to multiple (child) handler elements. Good for automating multiple changes at once.

class
Relay
extends
Handle
tag
<relay-blam>
see

Props

name type default description
mode string all

One of 'one', 'some', or 'all'. Each time an event is received, which of the subject handler elements to activate. Importantly, elements’ off state is circumvented. Elements with off are only activated by the Relay. Elements without off are activated independently and via Relay.

prop string null

Not applicable for Relay. The prop is defined on each subject handler.

value string null

Not applicable for Relay. The value is defined on each subject handler.

from string

A CSS selector representing all elements from which events will be listened to. If not set, the node array defaults to the element’s defaultFrom function’s return value.

to string

A CSS selector representing all elements to affect in response to the event. If not set, the node array defaults to the element’s defaultTo function’s return value.

event string blam

The event type to listen for. For many Event-based elements, this is the generic custom event blam.

bypass boolean false

Whether to stop responding to events as they happen.

chance boolean 1

The probability that the event will be responded to. From 0 to 1.

Examples

Examples that use the Relay element: