Slide Numbers

You can display the page number of the current slide by setting the slideNumber config option to true.

Reveal.initialize({ slideNumber: true });
Slide 1
Slide 2

Format

The slide number format can be customized by setting slideNumber to one of the following values.

ValueDescription
h.vHorizontal . Vertical slide number (default)
h/vHorizontal / Vertical slide number
cFlattened slide number, including both horizontal and vertical slides
c/tFlattened slide number / total slides
Reveal.initialize({ slideNumber: 'c/t' });
Slide 1
Slide 2

If none of the existing formats are to your liking, you can provide a custom slide number generator.

Reveal.initialize({
  slideNumber: (slide) => {
    // Ignore numbering of vertical slides
    return [Reveal.getIndices(slide).h];
  },
});

Context

When slide numbers are enabled, they will be included in all contexts by default. If you only want to show slide numbers in a specific context you can set showSlideNumber to one of the following:

ValueDescription
allShow slide numbers in all contexts (default)
printOnly show slide numbers when printing to PDF
speakerOnly show slide numbers in the speaker view
Reveal.initialize({ showSlideNumber: 'print' });