DesignOverviewDesign SystemMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingAgentsCortexMemoryActiveProvenanceActiveContextActiveServicesInsightsGet in touchSource on GitHub
Essentials
EventsEach state change sends two events. The first is a request that you can cancel.
The second is a notification that the change happened.// The request. Cancelable, carries what is being proposed, and fires before// anything moves. This is how you take the decision.element.addEventListener('helix-before-change',(event)=>{if(locked){event.preventDefault()}})// The notification, under the platform's own name. Fires after the value moved,// so it is on the target where every handler ever written expects it.element.addEventListener('change',(event)=>{save(event.target.value)})Most of the time you need the notification. Bind onChange in React or
onchange= in HTML and read the target, as you would for an <input>. Use the
prefixed event when you want to cancel the change.Each event has its own class. The class gets the event's type to you in three
ways:
The class name is in the manifest, so the framework typings can emit a typed
callback. A bare CustomEvent would give (detail: unknown).
The family augments HTMLElementEventMap for its own events, and core does
for the events several families share. Importing a family types
addEventListener for its events when you write plain HTML.
The name is defined on the class, so a dispatch and a listener always use the
same string.
Why the request has a prefix and the notification does notRetargetingAn event dispatched inside a shadow root is retargeted so that it appears to
come from the host. A bare input from a <helix-input> would look the same
as the input from the control inside it. A prefixed event cannot be mistaken
for either one.React's event namesReact's synthetic event system handles change, input, submit, copy,
focus, and its other event names. A prop that matches one of those names is
connected to the native event of that name. onhelix-before-change matches none
of them, so it reaches our event. A request needs exactly that.The notification uses the native nameThe notification has no prefix for the same reason. onChange on a Helix
element goes through React's synthetic system to the native change event the
element sends. You use it the way you already use it on any input.The type map is globalHTMLElementEventMap is shared by every element in your application. Our event
classes extend Event, so an entry named select would still compile. It would
silently retype textarea.addEventListener('select', …) as carrying our detail,
which is undefined at runtime. We measured this. We would not see a collision
from an unprefixed name, and you would.Which events bubble
Lifecycle events do not bubble and are not composed. These are
helix-before-open and helix-before-close. Overlays nest, and an inner
overlay's lifecycle must never reach the outer overlay that contains it. A
menu that closes inside a dialog does not close the dialog.
Coordination events bubble and are composed. These are
helix-before-select, helix-dismiss, and helix-before-change. A parent or
a router can intercept them across a shadow boundary, so you can use a Tree
as navigation.
If you listen on a container and receive nothing, the event is probably a
lifecycle event. Add the listener to the element itself.Cancel a changeYou can cancel the events sent before a state change. Canceling is the only way
to stop the change:dialog.addEventListener('helix-before-close',(event)=>{if(unsaved){event.preventDefault()}})Every dispatched event is checked against a declaration, so every event you can
listen for is documented. A declaration needs no dispatch of its own, because a
parent declares the events its children send and a form control declares the
native event it relays.NamesEvery Helix event follows one grammar:
A request is named helix-before-<verb>. It is cancelable, carries what is
being proposed, and is sent before anything moves.
Its notification is the native event where the platform has one, such as
change or toggle. Otherwise it is helix-<verb>, the same verb without
before. It is not cancelable, carries the state now in force, and is sent
once the change stands. A request that is refused sends no notification.
toggle means open and closed, as it does on <details>. A checked state
uses helix-before-check, followed by change on a form control or by
helix-check elsewhere.
Two notifications use the past tense, because the plain verb is taken:
helix-resized, since helix-resize reports a measurement, and
helix-pasted, since paste is the clipboard event.CommandsFive events are cancelable and have no before in their name. Each one is a
command you can refuse, and no notification follows, because nothing is in
force afterwards to report:
helix-create, a value a combobox list does not hold
helix-dismiss, an element asking to be taken away
helix-send, what a reader wrote in a chat composer
helix-shortcut, a chord that was pressed
helix-terminal-link, an address a terminal would open
Changed in October 2026Requests that had plain names now carry before, and the plain name is the
notification:
helix-sort, helix-filter, helix-select, and helix-reorder were the
requests on Data Table. They are helix-before-sort, helix-before-filter,
helix-before-select, and helix-before-reorder now. The plain names are
the notifications that were helix-sorted, helix-filtered,
helix-selected, and helix-reordered. A page that bound helix-sort to
refuse a sort binds helix-before-sort now, because helix-sort arrives
after the order has moved and cannot be refused.
helix-navigate is helix-before-navigate, and helix-navigate follows it
on Pagination, Data Table, Date Picker, and Drilldown. Pagination and Data
Table sent helix-activate after a page moved, and send helix-navigate
now.
helix-select on Carousel is helix-before-activate, and helix-activate
still follows it.
helix-facet, helix-graph-filter, and helix-read are
helix-before-facet, helix-before-graph-filter, and helix-before-read,
and each plain name is the notification after it.
helix-before-toggle is helix-before-check, and helix-toggle is
helix-check. A row of Table that opens sends helix-before-expand and
helix-expand.
helix-reorder on a list, a tree, or a table is no longer cancelable. Refuse
helix-before-reorder to keep an item where it is.
Helix eventsEach component's page lists the events it sends, with the class and the detail.Requests and notificationsEventMeaninghelix-before-activate, helix-activateA set is about to make a different child current, and then didhelix-before-changeA value is about to change. input and change followhelix-before-cell-edit, helix-cell-editA data table's cell is about to open for an edit, and then didhelix-before-cell-commit, helix-cell-commitA data table's edited cell is about to save its new value, and then didhelix-before-check, helix-checkA checked state is about to change, and then did. A form control sends change in place of helix-checkhelix-before-collapse, helix-collapseA splitter's pane is about to shut or reopen, and then didhelix-before-column-toggle, helix-column-toggleA data table's column is about to be hidden or shown, and then washelix-before-edit, helix-editA sandbox's source is about to be edited, and then washelix-before-expand, helix-expandRows of a table are about to open or close in place, and then didhelix-before-export, helix-exportA data table is about to make a file of its rows, and then the browser saved ithelix-before-facet, helix-facetA filter input's field is about to be filtered by other values, and then washelix-before-filter, helix-filterA list or a table is about to narrow what it shows, and then didhelix-before-follow, helix-followA press on a link in a table cell is about to load its page, and then ishelix-before-graph-filter, helix-graph-filterA graph is about to show or hide a group's notes, and then didhelix-before-listen, helix-listenA field is about to listen for dictation, and then put a phrase in its texthelix-before-move, helix-moveCards on a canvas are about to move, and then didhelix-before-navigate, helix-navigateA component is about to move the view it shows, such as a page or a month, and then didhelix-before-open, helix-before-closeAn open state is about to change. toggle followshelix-before-panel-resize, helix-panel-resizeA sandbox's panel is about to change height, and then didhelix-before-paste, helix-pastedCards are about to be pasted onto a canvas, and then werehelix-before-pin, helix-pinA transcript is about to be pinned to the bottom or let go of it, and then washelix-before-read, helix-readA notification is about to be marked read or unread, and then washelix-before-reconnect, helix-reconnectA connection's end on a canvas is about to move, and then didhelix-before-relabel, helix-relabelA label a canvas draws is about to change, and then didhelix-before-reorder, helix-reorderA row, an item, or a column is about to move to a new place, and then didhelix-before-resize, helix-resizedA splitter's divider is about to settle, and then didhelix-before-select, helix-selectAn item in a set is about to be chosen, and then a selection changedhelix-before-sort, helix-sortA table is about to change its order, and then didhelix-before-split, helix-splitThe divider between a sandbox's panes is about to move, and then didhelix-before-view-change, helix-view-changeA data table's view is about to change, and then did: its search, filters, sort, columns, or page sizehelix-before-view-save, helix-view-saveQuick Filters is about to save a data table's view, and then didCommand eventsEventMeaninghelix-createA combobox was asked for a value its list does not holdhelix-dismissAn element asks to be taken awayhelix-sendA chat composer is handing over what the reader wrotehelix-shortcutA shortcut's chord was pressedhelix-terminal-linkA link in a terminal's output was activatedOther notificationsEventMeaninghelix-actionA reader acted on a list rowhelix-aura-fallbackAn aura stopped drawing its shader and shows its gradienthelix-bandA meter's reading moved into another bandhelix-canvas-editA reader asked to edit a cardhelix-canvas-pan, helix-canvas-zoom, helix-canvas-viewA canvas moved, zoomed, or changed its viewhelix-caretThe cursor moved in a text editorhelix-clearA reader cleared a valuehelix-completeA control that fills up has filledhelix-connectA reader asked for two cards to be joinedhelix-consoleThe sandbox passes on a log messagehelix-copy, helix-copy-errorSomething was copied, or nothing could behelix-device-button, helix-device-key, helix-device-screenshotA device screen's button, key, or screenshot was asked forhelix-device-scroll, helix-device-swipe, helix-device-tap, helix-device-text, helix-device-touchA reader scrolled, swiped, tapped, pasted, or touched a device screenhelix-endA video playlist reached its last entry and stoppedhelix-foundA search found its matches, or moved among themhelix-graph-layout, helix-graph-readyA graph's layout settled, or the graph was drawn wholehelix-graph-pan, helix-graph-zoomA reader asked a graph to move or to zoomhelix-graph-part-change, helix-graph-signalWhat a graph's connector draws changed, or something passed between two noteshelix-historyA transcript reached its oldest turn, and older ones can be fetchedhelix-loadA lazy tree branch opened and asks for its childrenhelix-load-moreA reader asked for more itemshelix-map-clusterA reader pressed a cluster of map markershelix-map-pan, helix-map-rotate, helix-map-tilt, helix-map-zoomA reader asked a map to move, rotate, tilt, or zoomhelix-map-part-change, helix-map-readyWhat a map's connector draws changed, or the map was drawn wholehelix-next, helix-previousA reader asked for the next or the previous item in a sequencehelix-plot-change, helix-plot-turnWhat a plot's connector draws changed, or a reader turned a 3D plot by keyhelix-pressA control was pressed and actedhelix-previewA control shows what a press would choosehelix-range-changeThe items a virtual list shows changedhelix-reading-change, helix-reading-pressA chart moved to a reading, or a reading was pressedhelix-rejectA file field refused some of the files it was givenhelix-removeA reader asked for cards or connections to be taken awayhelix-resizeA preview reports how much room its content needshelix-sample-start, helix-sample-endThe eyedropper opened, or closedhelix-scrolledA header started or stopped floating over the pagehelix-stopA reader asked for what is under way to stophelix-strands-fallbackA strands element stopped drawing its ribbon and shows its gradienthelix-terminal-bell, helix-terminal-titleA terminal's program rang the bell or set its titlehelix-terminal-input, helix-terminal-resize, helix-terminal-restartA terminal has input for the process, changed size, or was asked to restarthelix-tour-ask, helix-tour-statusA tour stop asked the tour to move, or the tour's progress changedhelix-typingA reader started or stopped writing in a chat composerEvery stateful component also sends native events once the change is applied:
input and change on a value control
toggle on anything that opens, carrying newState and oldState as
<details> does. It is a ToggleEvent in browsers that have one, and it is
sent whether the change came from a reader or from assigning open
close on a dialog
load and error on an image
Events in a frameworkNative events use their usual props, such as onChange, onInput, and
onToggle, which every framework already understands. A prefixed event uses
on followed by the exact name, such as onhelix-before-change. Nothing
removes the prefix or converts it to camel case. That is React's own behavior.
See React, Vue, and Svelte.