Skip to content

Packages and entrances ​

ElfUI uses a single user-facing entry while keeping its internal packages separate. New projects declare only @elfui/core as a direct runtime dependency; Chain, Router, and build tooling remain optional.

Entrance selection ​

ScenarioInstallationImport
New Project / Component LibraryRuntime @elfui/core; dev dependency @elfui/vite-pluginimport { defineHtml, createApp } from "@elfui/core"
Routing@elfui/routerimport { createRouter } from "@elfui/router"
Old site embedded / small demo@elfui/chainimport { ElfUI } from "@elfui/chain"
Only responsive@elfui/reactivityimport { useRef } from "@elfui/reactivity"
Advanced runtime packaging@elfui/runtimeimport { defineComponent } from "@elfui/runtime"
Create Vite Projectcreate-elfuipnpm create elfui@beta my-app --install

Package responsibilities ​

PackagesResponsibilities
@elfui/coreThe standard user-facing runtime entry for stable macro, reactivity, and runtime APIs
@elfui/vite-pluginVite macro component compilation plug-in
@elfui/routerWeb Components Routing
@elfui/chainChained component expansion package, including runtime compiler
@elfui/reactivityComplete entrance to responsive system
@elfui/runtimeCustom Element, lifecycle, built-in components and advanced helpers
@elfui/compilerCompiler source code capabilities for tools and extensions

Volume caliber ​

Current beta size baseline. The real-application fixture represents a tree-shaken public API consumer; aggregate facades deliberately retain every stable export for release monitoring.

TargetgzipBrotliDescription
Real application fixture10.13 KB9.16 KBTree-shaken consumer of the public Core API
@elfui/core aggregate facade18.47 KB16.66 KBEvery stable Core export; not a typical application bundle
@elfui/runtime aggregate facade16.14 KB14.64 KBEvery stable Runtime export, without the compiler
@elfui/reactivity aggregate facade5.23 KB4.77 KBComplete standalone reactivity entry

boundary ​

@elfui/core does not export the createComponent(), ElementBuilder, compile() or runtime string template capabilities. When you need a chained API, go to "Ecology/Chain Components".

Generated render helpers import from @elfui/core/internal. This subpath is a versioned protocol between the compiler and Core, not an application-authoring API. Applications should not write internal imports or declare @elfui/runtime directly.

WARNING

@elfui/router is a standalone package; only install it if routing is required. For the complete ecology, see [Ecosystem Overview] (/en/ecosystem/overview): Router, Extensions, UI Kit, Language Tools and Create ElfUI are all maintained independently in their respective warehouses.