id
Optional
Type: string
Default: unset
An id
can be assigned to a UI component, which then targets the specific component and enables calling component methods on it from JavaScript/TypeScript.
Example - id
on a text-input
id
on a text-input
<var name="first_name" type="text"/>
<text-input id="first-name-input" label="First name" bind="first_name" />
function focusInput() {
// call a component method to programatically focus the text-input
component.textInput({id: 'first-name-input'}).focus();
}
Last updated