Documentation
Base
Stories

Stories

Description

The Stories component is designed to manage and render a list of stories within your application. It leverages various hooks to access and manage context values related to the viewer, timer, stories, and pages. The component conditionally renders its children based on these context values and handles story transitions. It is also forward-ref compatible, allowing it to be used with refs.

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

<Stories>
  <Story>{...content}</Story>
  <Story>{...content}</Story>
  <Story>{...content}</Story>
  {...stories}
</Stories>

Demo

Single Story

Multiple Stories