Skip to content

Getting started with Histoire ​

Overview ​

Histoire is the French word for "Story" and is pronounced /is.twaʁ/, like "is·twar"

Use Node.js 22.12 or later and Vite 7 or 8. Check your framework's Node.js requirements as well.

Choose your framework to install Histoire and write your first story.

Learn what you can build with Histoire.

Sponsors ​

Our sponsors support Histoire's open-source development.

See our sponsors »

Supported frameworks ​

Titles marked 1.0-beta.2+ describe features available from Histoire 1.0.0-beta.2. Use continuous releases to try changes between releases.

FrameworkVersionStory supportGenerated sourceAutomatic docs
Vue →3.5.26+✅✅✅
Svelte →4 / 5✅-🏗️
Solid----
Angular----
React →18 / 19✅--

Story support includes story discovery, rendering, built-in controls, synchronized custom controls, and static source. Generated source reflects the current state and can be copied. Automatic docs generate documentation and controls from component definitions.

Nuxt 3 / 4 uses @histoire/plugin-nuxt alongside the Vue plugin. SvelteKit 2 / 3 uses the Svelte plugin.

Vite 8 support 1.0-beta.2+ ​

Vite 8 is supported alongside Vite 7. Use a framework Vite plugin compatible with your project's Vite version.

Explore the workbench 1.0-beta.2+ ​

Open the demo to browse stories, select variants, edit props, read docs, and inspect generated source. The demo is a static book. To try project tests, comments, canvas screenshots, or MCP activity, run a development server.

Start with workbench layout, navigation and search, the inspector, and props matrix.

Dev console 1.0-beta.2+ ​

histoire dev opens an interactive panel in supported terminals. Logs scroll above the workbench address, startup progress, story and variant counts, and test activity. Press ? to see available shortcuts.

KeyAction
r / RRestart / fresh restart (ignores the cached catalog and forces dependency optimization once)
oOpen the workbench
yCopy the workbench address
iSession information: versions, root, config, counts, addresses, MCP state
lLogs
eLatest error
nHTTP requests through the workbench address since the console started (method, path, status, duration; query strings, headers and WebSocket traffic are not kept)
pStories and variants
tTests, see Terminal tests
cClear visible output
xDelete retained log and request history (test results are kept)
qQuit

In full-screen views, scroll with the arrow keys, Page Up, Page Down, Home, or End. Press / to search, Enter to open an entry, y to copy it, or Y to copy all filtered entries.

Press Esc (or Enter again) to return from a log or error detail to its list, or from a list to the main screen. Press q to return to the main screen. Ctrl+C always quits.

In session information, Up/Down select an address, y copies it, o opens it, r shows its QR code to scan from a phone and u refreshes the runtime facts. Network addresses are listed only when the server listens beyond loopback (--host).

In the stories view, Enter lists a story's variants and opens a variant in the workbench. o opens the selected story or variant, t opens Tests for it and runs it, and u reloads the catalog.

Activation ​

The panel starts automatically outside CI and without a Node inspector. It needs interactive stdin and stdout, raw input, at least 40 columns by 10 rows, and a usable TERM on non-Windows systems. To choose a mode explicitly:

  • --tui forces the panel, ignoring CI and inspector detection. A missing TTY, raw input or terminal size still falls back to plain output.
  • --no-tui always uses plain output.
  • HISTOIRE_TUI=plain|auto|1 sets the default (1 forces, auto is the default). A flag wins over the variable. Other values fail before the project loads.

If the terminal shrinks below 40 × 10, Histoire switches to plain output and restores the panel when the terminal grows. If the renderer fails, Histoire uses plain output for the rest of the session. On Unix, Ctrl+Z restores the terminal and Histoire checks the mode again on resume.

Plain mode ​

Plain mode prints the Histoire:, Local: and MCP: address lines, restart and ready lines, and project output, with no control sequences. When stdin is interactive it reads these newline-terminated commands: help, restart, restart fresh, open, tests, watch, stop, quit. With piped or closed stdin no reader is installed.

Community ​

If you have questions or need help, reach out to the community at Discord and GitHub Discussions.

Released under the MIT License.