Documentation
Base
Pages

Pages

Description

The Pages component manages and renders a series of pages within a story. It leverages multiple hooks to access and manage context values related to the viewer, pages, timer, and stories. Additionally, it uses a hook to order and render its children elements, ensuring the correct sequence and transitions between pages.

Properties

Component

PropTypeDescription
asReact.ElementTypeSpecifies the component type to render (by default, div).
...eventsPaginationEventsOptional callback events for component.
...propsReact.HTMLAttributesStandard HTML attributes for an HTML element.

Contexts Available

Usage

<Pages>
  <Page>{...content}</Page>
  <Page>{...content}</Page>
  <Page>{...content}</Page>
  {...pages}
</Pages>

Demo