component
About component methods
This API allows developers to interact with various UI components programmatically in a view's JavaScript/TypeScript.
Component Methods
A UI component in JourneyApps may have component methods associated with it. These methods can be triggered in one of the following ways:
By the JourneyApps Runtime when a user interacts with a component (e.g. when a user clicks a button)
Programmatically inside a view's JavaScript / TypeScript. Example syntax:
component.textInput({id: 'my-identifier'}).focus();
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:
var item = component.sidebarItem({
label: 'Home',
icon: 'fa-home',
iconColor: 'primary',
onPress: function() {
link.main();
},
onPressIcon: 'ion-chevron-right',
state: 'normal'
});
Last updated