open-frame.config.ts
Workspace-level configuration.
The config lives at the workspace root and is fully optional — every field has a sensible default.
import type { OpenFrameConfig } from '@open-frame/core';
const config: OpenFrameConfig = {};
export default config;Schema
type OpenFrameBuildConfig = {
/** Show the deck index (the frame browser) in the static build. */
showFrameBrowser?: boolean;
/** Show on-canvas UI (toolbar, hints) in the static build. */
showFrameUi?: boolean;
/** Show the "download as HTML" button in the static build. */
allowHtmlDownload?: boolean;
};
type OpenFrameConfig = {
/** Base public path for subpath hosting (leading + trailing slash). Default: '/'. */
base?: string;
/** Folder that contains your decks. Default: 'frames'. */
framesDir?: string;
/** Folder that holds theme markdown + demo files. Default: 'themes'. */
themesDir?: string;
/** Folder for global assets shared across decks. Default: 'assets'. */
assetsDir?: string;
/** Dev server port. Default: first free port from 5173 upward. */
port?: number;
/** UI language for the runtime (home, inspector, presenter, etc.). */
locale?: Locale;
/** Build-time UI toggles. */
build?: OpenFrameBuildConfig;
};Common recipes
Public share
const config: OpenFrameConfig = {
build: {
showFrameBrowser: false,
showFrameUi: false,
allowHtmlDownload: false,
},
};Host under a subpath
Set base to deploy the build under a sub-directory instead of the domain
root — GitHub Pages project sites, a reverse-proxy folder, an intranet path.
Use a leading and trailing slash:
const config: OpenFrameConfig = {
base: '/my-frames/',
};The value is passed straight to Vite's base and to React Router's
basename, so client-side navigation matches the deployed path.
Multiple deck folders
framesDir is a single path today. If you want multiple roots, group them
under one folder and use subfolder ids.
Switch the UI language
import { zhTW } from '@open-frame/core/locale';
const config: OpenFrameConfig = {
locale: zhTW,
};See Locale for the full list of presets and how to ship your own dictionary.