API Overview

Complete technical reference for all Manic exports.

API Reference

Complete reference for exports from the manicjs package (every subpath is listed on Package exports). Nested sections group runtime APIs by concern — each export has its own page where practical.

Router

Theme

Errors

Environment

View transitions

Config helpers

Client

Server & loaders

Quick reference

ExportPreferred importDescription
Router, Link, navigate, useRouter, useQueryParamsmanicjs or manicjs/routerSPA routing
preloadRoute, RouterContextmanicjs/router onlyAdvanced routing (RouterContext)
defineConfig, createPlugin, loadConfig, getConfigmanicjs/configConfig & plugins (plugins)
createManicServermanicjs/serverBun server entry (page)
createClientmanicjs or manicjs/clientTyped RPC (createClient)
ViewTransitions, setViewTransitionsmanicjs or manicjs/transitionsView Transitions API
ThemeProvider, useTheme, ThemeTogglemanicjs or manicjs/themeTheme
initThememanicjs/theme onlyEarly theme apply
getEnv, getPublicEnvmanicjs/envEnv access
NotFound, ErrorOverlay, ServerErrormanicjsError UI
apiLoaderPlugin, fileImporterPluginmanicjs/pluginsLow-level loaders

See Package exports for types-only exports (RouteDef, ManicPluginContext, …).

Installation

bun add manicjs
// App code — shortest path
import { Link, useRouter, navigate } from 'manicjs';

// manic.config.ts
import { defineConfig, createPlugin } from 'manicjs/config';

// Advanced routing
import { preloadRoute } from 'manicjs/router';

TypeScript

Manic ships TypeScript sources as its published types — full IntelliSense across every entry point.

On this page