Skip to content

Overview of built-in combined functions

The built-in combined function is the official useXxx() capability provided by ElfUI. They are not reactive primitives, but DOM, Host, event, observer, and form wrappers for service component authors.

ClassificationAPI
HostuseHostuseRenderRootuseShadowRootuseAttrs
Template referenceuseTemplateRef
DOM eventsuseEventListener, useClickOutside
ObserveruseResizeObserver, useIntersectionObserver
Interactive controluseEscapeKey, useScrollLock, useFocusTrap
Form controlsuseFormControlContext, createFormControlContext

These functions must be called during the component setup synchronization phase, which is the top level of the macro component.