Core API reference
Choose the stable root, router, server, config, plugin, and development entry points intentionally.
Import from the narrowest public entry point
The root package provides common application APIs. Use the five memorable feature boundaries for routing, server work, configuration, plugins, and development tooling.
tsimport { createResource, createStore, createTavo, Seo } from "@tavojs/core";
import { defineRoutePage, navigate } from "@tavojs/core/router";
import { createSessionStorage } from "@tavojs/core/server";
import { defineConfig } from "@tavojs/core/config";
import { definePlugin } from "@tavojs/core/plugin";
import { createPagesTestHarness } from "@tavojs/core/dev";Use entry points by responsibility
@tavojs/core: components, JSX, stores, actions, forms, resources, styling, localization, and common application APIs.@tavojs/core/router: Auto Pages routes, navigation, loaders, actions, middleware, subscriptions, and route types.@tavojs/core/server: Node SSR, document rendering, sessions, and server utilities.@tavojs/core/configand@tavojs/core/plugin: project configuration and Plugin API v1.@tavojs/core/dev: experimental inspection, testing, instrumentation, validation, scheduling, and devtools.@tavojs/core/server-onlyand the JSX runtime paths are technical integration boundaries.
Treat declarations as the exact contract
Guides explain how APIs fit together; generated TypeScript declarations remain authoritative for overloads, generic parameters, and return values in the installed version.
Rendering and production entry points
| API / option | Type | Default | Behavior |
|---|---|---|---|
@tavojs/core | stable | symbol-specific | Common application APIs. DOM, focus, ref, directive, and transition symbols are browser-only; JSX values, static rendering, and style registries also work on the server. |
@tavojs/core/router | stable | browser + server | Auto Pages routing, navigation, route modules, loaders, actions, middleware, subscriptions, and route types. |
@tavojs/core/server | stable | server | Node SSR, document rendering, sessions, and server utilities. |
@tavojs/core/config | stable | build | Configuration authoring helpers, exact project types, and Vite integration. |
@tavojs/core/plugin | stable | build + server + browser | Plugin-author declarations, manifests, phases, permissions, capabilities, stores, and compatibility helpers. |
@tavojs/core/dev | experimental | development + tests | Inspection, testing, instrumentation, validation, scheduling, devtools, configuration loading, overlays, and development servers. |
@tavojs/core/server-only | stable | server marker | Empty side-effect boundary that rejects execution in a browser bundle. |
Browse by responsibility
Search the complete API or open a focused reference for one framework responsibility.
Components, JSX, and DOM
Component contracts, JSX output, roots, refs, directives, focus, observers, and transitions from the root package.
Errors and code splitting
Error boundaries and lazy component contracts for pending, failure, and loaded states.
Runtime contracts
Shared state helpers, storage and unsubscribe contracts, diagnostics, and API stability metadata.
MVC, stores, and services
createTavo, controllers, application boot, services, stores, persistence, and selectors.
Data, actions, and async
Actions, forms, resources, deferred values, and their data contracts.
Localization, SEO, and assets
Localization state and routing, document head, SEO metadata, images, fonts, scripts, and style registries.
Router and Auto Pages
Routes, navigation, loaders, middleware, actions, route modules, status, prefetching, and subscriptions.
Server rendering and sessions
Node request handling, rendering, static caches, image optimization, environment loading, and sessions.
Configuration
Stable authoring helpers and exact project and Vite configuration contracts.
Plugin API
Plugin-author declarations, manifests, permissions, capabilities, phases, stores, and compatibility helpers.
Development and testing
Experimental testing, validation, diagnostics, instrumentation, scheduling, inspection, overlays, configuration loading, and development servers.