Reference

Architecture

Récit keeps a single chain, whatever the output:

Code
Markdown / MDX ──parse──► Story (a list of Scenes) ──render──► format

A scene is the common unit: a slide in a deck, a shot in a video, a section in a report, a panel in a webtoon, a chapter in a book.

From source to formats

Around the chain, in every format:

  • @recit/components: the same Callout, Grid, Code, Mermaid… everywhere
  • @recit/theme: tokens and the CSS of each format
  • @recit/cli: the recit command — every one of them is on the CLI reference, which this page does not copy

The same compiled HTML is displayed by recit dev, recit build, the HTML export, the PDF and the sites: a deck looks the same everywhere.

The Story model

The compiler produces a Story. Fields specific to a format live under a dedicated key: the core knows no format.

TypeScriptTypeScript
type StoryFormat = | "deck" | "motion" | "docs" | "report" | "toon" | "book" | "roadmap" | "calendar" | "stories"; type Story = { version: 1; format: StoryFormat; // front matter `format:`, "deck" by default meta: { title: string; description?: string; author?: string; lang: string }; settings: ResolvedConfig; // recit.config.ts + front matter, after mergeConfig design: { width: number; height: number; aspectRatio: string }; themeCss: string; scenes: Scene[]; diagnostics: Diagnostic[]; summary: { totalDurationMs: number; formattedTotalDuration: string }; }; type Scene = { id: string; // explicit `id=`, otherwise s1, s2… index: number; source: { file: string; line: number; endLine: number }; // for diagnostics attrs: Record<string, string>; // separator attributes: layout, cols… html: string; // sanitized HTML (deck, docs) mdast?: Root; // kept for formats that reinterpret the scene (motion) steps: number; notesHtml?: string; durationMs?: number; density: DensityReport; accessibility: A11yReport; };
  • The deck uses scene.html, steps and notesHtml.
  • The motion format will read scene.mdast and scene.attrs to build its shots.
  • MDX components are compiled by the CLI or by Vite, one module per scene (<file>.recit-scene-N.jsx).

compileDeck, CompiledDeck and CompiledSlide, the former names, stay exported as deprecated aliases of compileStory, Story and Scene. compileDeck still accepts format and deckId, and its result keeps slides next to scenes.

Packages

The monorepo is split into groups: foundations (packages/core, theme, components), packages/formats/*, packages/integrations/*, distribution (packages/cli), packages/tools/*, one site per sub-domain in sites/*, and examples/*.

Available

PackageGroupRole
@recit/componentsfoundationsDefault components of Récit (callout, code group, media, diagrams…), the same in every format
@recit/corefoundationsMarkdown and MDX parser and compiler of Récit: one source, many formats
@recit/site (private)foundationsThe site framework of Récit: routing, prerendering, search and the MDX shell
@recit/themefoundationsDesign tokens, named themes and stylesheets shared by every Récit format
@recit/deckformatsPresentation format of Récit: deck, presenter console, remote and runtime
@recit/motionformatsMotion format of Récit: film schema, ops, timing, animation presets, handover extraction, and the Markdown and JSON sources of a film
@recit/motion-blocksformatsAnimated blocks, UI-scene renderer and themes of the Récit motion format
@recit/motion-renderformatsMP4 and still rendering of Récit motion decks with Remotion
@recit/site-storiesintegrationsPublishes Récit stories in a Récit site: pages, embeds, fullscreen and search
@recit/clidistributionCommand line of Récit: recit dev, build, export, and render for motion stories
recitdistributionRécit: write once in Markdown, tell it everywhere. Alias of @recit/cli, with defineConfig (recit/config)
@recit/apptoolsDesktop and mobile applications of Récit sites: one Tauri 2 shell around the prerendered site
@recit/mcptoolsMCP server of Récit: build, validate, edit and render motion decks from an agent
@recit/site-kit (private)toolsShared configuration, header, footer and MDX components of the Récit sites

Planned

PackagePhaseRole
@recit/studio (private)P4Editor and live preview of Récit stories
create-recit (private)P5Create a Récit project: npm create recit
@recit/data (private)P6Data loading and charts shared by Récit formats
@recit/paged (private)P6Shared pagination and PDF output of the Récit report and book formats
@recit/report (private)P6Data report format of Récit: HTML and paginated PDF
@recit/toon (private)P7Webtoon format of Récit: vertical strip of panels
@recit/book (private)P8Book format of Récit: chapters, PDF and EPUB
@recit/roadmap (private)P9Roadmap format of Récit: now / next / later, timeline and kanban
@recit/time (private)P9Dates, time zones, recurrences and ICS shared by Récit formats
@recit/calendar (private)P10Calendar format of Récit: events, agenda views and ICS
@recit/stories (private)P11Web stories format of Récit: full-screen cards

The status of each format is on the formats overview.

The site framework

packages/site (@recit/site) is the site framework: routing, prerendering, Pagefind search and the MDX shell that every site of the project, including this documentation, is built on. It is never published on its own.

Récit still reaches it through its plugin API, @recit/site-stories, because a plugin is easier to test and to move than a patch. See the integration.

One configuration file

Each project has a single recit.config.ts, read by the sites, the CLI and the Vite plugin:

  • the framework's config loader looks for recit.config.*;
  • defineConfig (recit/config, @recit/core/config) validates the Récit sections with zod 4, takes them out of the framework's options and attaches them to the result;
  • @recit/site-stories then adds recitPlugin to plugins. Its transformConfig hook lists the package's vite.config.mjs in __pluginDirs, which the framework merges into the site's Vite config: that is how recitVitePlugin is added without a vite.config.ts;
  • recit dev | build load the same file and keep only its Récit sections.