reveal.js is an open-source framework for creating interactive, browser-based presentations using HTML, CSS, and JavaScript. The current stable version is 6.0.1, with frequent minor and patch releases addressing bugs and introducing new features, and major versions typically bringing significant architectural or feature additions (e.g., v5.0 introduced scroll view, v6.0 introduced an official React wrapper). Key differentiators include its extensibility via a rich API and plugins, support for nested slides, Markdown, Auto-Animate, PDF export, speaker notes, LaTeX typesetting, and syntax-highlighted code. It stands out by allowing presentations to be consumed as traditional slides or as a scrollable web page, providing flexibility for different viewing contexts. The recent introduction of an official React wrapper (`@revealjs/react`) offers a component-based approach for building decks, appealing to modern web development workflows.
npm install reveal.jsVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes a basic reveal.js presentation with two slides, demonstrating HTML and Markdown content, and integrating the Markdown and Highlight plugins. It shows how to set up the HTML structure and configure Reveal.js programmatically using ESM imports.
For new React projects, consider using `@revealjs/react` for a more streamlined and idiomatic integration. For existing projects, ensure your custom React wrappers are compatible with the core library's API changes.
Review your presentation's layout and content for optimal display in scroll view if you plan to enable `scrollMode`. Test thoroughly, especially with images, videos, and complex layouts.
Always keep reveal.js updated to the latest stable version to benefit from security patches. Review any custom content injected into slides or through the API to ensure it's properly sanitized.
Refer to the official documentation for the correct import paths for each plugin. Ensure you are using the `.esm.js` variant for ES Modules in modern build setups.
Consult the PDF export documentation (`revealjs.com/pdf-export/`) for best practices. Ensure your browser is up-to-date and consider adjusting `print` related CSS or `Reveal.config` options for better output.
Ensure `import Reveal from 'reveal.js';` is at the top of your module and that `new Reveal({...}).initialize()` is called after the DOM is ready.Verify the exact path for the plugin import. Most modern setups require `.esm.js` suffix, e.g., `import Markdown from 'reveal.js/plugin/markdown/markdown.esm.js';`.
Switch to ES Module imports: `import Reveal from 'reveal.js';` instead of `const Reveal = require('reveal.js');`.Ensure `reveal.js` base and theme CSS files are linked correctly (`<link rel="stylesheet" href="dist/reveal.css">` and `<link rel="stylesheet" href="dist/theme/black.css">`). Verify your HTML structure matches the `div.reveal > div.slides` expected by the framework.
No dependency data recorded yet.