Links

component

About component methods
Version compatibility
component was introduced with version 4.38.5 of the JourneyApps Container.
This API allows developers to interact with various UI components programmatically in a view's JavaScript/TypeScript.

Component Methods

Version compatibility
Component methods were introduced with version 4.84.0 of the JourneyApps Runtime. One exception to this is component.textInput({id: 'my-identifier'}).focus(), which was introduced with version 4.81.1 of the runtime.
A UI component in JourneyApps may have component methods associated with it. These methods can be triggered in one of the following ways:
  1. 1.
    By the JourneyApps Runtime when a user interacts with a component (e.g. when a user clicks a button)
  2. 2.
    Programmatically inside a view's JavaScript / TypeScript. Example syntax: component.textInput({id: 'my-identifier'}).focus();
  3. 3.
    Using voice commands
A UI component's available methods and associated voice commands are listed in the View Components panel in OXIDE:

component.sidebarItem

Constructs a sidebar item from your view's JS.
Example usage:
main.js
var item = component.sidebarItem({
label: 'Home',
icon: 'fa-home',
iconColor: 'primary',
onPress: function() {
link.main();
},
onPressIcon: 'ion-chevron-right',
state: 'normal'
});
Last modified 1yr ago