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 volume baseline:

EntrygzipDescription
@elfui/core10.52 KBMain entry, without runtime compiler
@elfui/chain21.19 KBChained .template() with runtime compiler
@elfui/core + @elfui/router15.00 KBMain entrance plus routing
@elfui/reactivity4.17 KBReactive only

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.