Skip to content
Brandon Jordan edited this page Sep 15, 2022 · 11 revisions

Events are on all components and allow you to trigger something when an event occurs for the component.

The returned c is the component, meaning you can chain methods to this component that will be triggered when the event fires.

Component()
    .onClick( (c) => c
        .rotate()
    )

Interaction Events

  • onLoad( (c) => c )
  • onClick( (c) => c )
  • onChange( (c) => c )
  • onHover( (c) => c, (c) => c ) callbacks for the mouse entering and leaving
  • onFocus( (c) => c )
  • onBlur( (c) => c )
  • onDoubleClick( (c) => c )
  • onError( (c) => c )
  • onKeypress( (c) => c )

Screen Size Events

These events are triggered by screen size changes using standard screen size ratios.

  • onDeviceSmall( (c) => c )
  • onDeviceMedium( (c) => c )
  • onDeviceLarge( (c) => c )
Clone this wiki locally