Skip to content

view: 'scroll' turns everything into a single slide #3858

Open

Description

@shaibruhis

I'm using Chrome 144.0.7559.133 on MacOS 15.7.3.

I'm using the example from the React Framework page. It works as expected but after adding view:'scroll' to the config, the page renders as a single slide (as seen in clip below). How can i get the scroll view to work with multiple slides?

export default function Deck() {
  const deckDivRef = useRef<HTMLDivElement>(null); // reference to deck container div
    const deckRef = useRef<Reveal.Api | null>(null); // reference to deck reveal instance

    useEffect(() => {
        // Prevents double initialization in strict mode
        if (deckRef.current) return;

        deckRef.current = new Reveal(deckDivRef.current!, {
            view: 'scroll',
            // other config options
        });

        deckRef.current.initialize().then(() => {
            // good place for event handlers and plugin setups
        });

        return () => {
            try {
                if (deckRef.current) {
                    deckRef.current.destroy();
                    deckRef.current = null;
                }
            } catch (e) {
                console.warn("Reveal.js destroy call failed.");
            }
        };
    }, []);

    return (
        // Your presentation is sized based on the width and height of
        // our parent element. Make sure the parent is not 0-height.
        <div className="reveal" ref={deckDivRef}>
            <div className="slides">
                <section>Slide 1</section>
                <section>Slide 2</section>
            </div>
        </div>
    );
}
Screen.Recording.2026-02-18.at.3.40.24.PM.mov

Activity

  1. changed the title [-]view: 'scroll' turns everything into a single slide[/-] [+]`view: 'scroll'` turns everything into a single slide[/+] on Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions