Skip to content

runtime API

@elfui/runtime is the entrance for advanced component authors. Business applications can usually be imported from @elfui/core.

Component definition

defineComponentdefineCustomElementensureCustomElementregisterComponentsresolveComponentTag

Lifecycle and collaboration

onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted, onActivated, onDeactivated, onAttributeChanged, onErrorCaptured, provide, inject, hasInjectionContext, createInjectionKey

onMounted() may return a cleanup callback. It runs during unmount before component DOM and scopes are released.

Instructions, configurations, plug-ins

configuregetConfigresetConfigresolveAppConfigwarnusePlugin

Application directives belong to app.directive(); macro-component-local directives belong to defineDirective() from @elfui/core. The process-global directive registry is internal.

Host and DOM

useHostuseShadowRootuseRenderRootuseAttrsuseAppConfiguseHostAttruseHostFlaguseHostClassuseHostCssVaruseHostStyleuseTemplateRefdefineExpose

defineExpose(exposed, options) accepts true or a member-name array in options.overrideNative to declare intentional overrides of native host members.

Built-in helpers

teleporttransitiontransitionGroupkeepAlivesuspensedynamicComponentprojectLightDom

WARNING

@elfui/runtime/internal is the low-level implementation entry. Standard generated code reaches these helpers through @elfui/core/internal; application code must not depend on either internal subpath.