Lenra Docs
Register on Lenra
  • Home
  • Getting started
    Open/Close
  • Guides
    Open/Close
  • Features
    Open/Close
  • References
    Open/Close
  • Contribute

    Listener

    This element is not a UI component but it's the definition of a listener call.

    Examples

    Making a text clickable

    The listener component will which listener and it properties when a user action is dispatch.

    {
        "type": "button",
        "text": "My button",
        "onPressed": {
            "_type": "listener",
            "name": "buttonPressed"
        },
    }
    

    Properties

    AttributeDescriptionType
    _type
    • listener
    nameThe listener name to callstring
    propsParameters passed to the listenerobject