This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@recital/recital
TypeScript icon, indicating that this package has built-in type declarations

1.6.3 • Public • Published

Recital

An interactive / dynamic story engine, powered by React and Redux. Stories are written in the recital .stage format, which is a superset of Markdown.

It is absolutely not ready for production use, not in the least because the stage format is not even documented yet, but if you want to anyway, there's three different ways to create a Recital story:

With a stage source

You can use the source prop to add a string representing a stage file directly to Recital, and this will be parsed at runtime:

import Recital from '@recital/recital'

...
<Recital
    source={text} />

With an MDX source

You can use @recital/stage-parser-cli to convert a stage script into an MDX file, and include that in the sourceMDX prop to avoid having to do that parsing step at runtime:

import Recital from '@recital/recital'

...
<Recital
    source={text} />

With React components

...or you can import all of the base building blocks of Recital stories, and manually add children instead of dealing with the stage format:

import Recital, { Scene, Block, StoryLink } from '@recital/recital'

...
<Recital>
    <Scene id="scene1" enter="next">
        <Block id="block1>
            <h1>This is some story content</h1>
            <StoryLink to=".block2">This is a link to the second block</StoryLink>
        </Block>
        <Block id="block2>
            This will only show up once the first link is clicked
        </Block>
    </Scene>
</Recital>

/@recital/recital/

    Package Sidebar

    Install

    npm i @recital/recital

    Weekly Downloads

    0

    Version

    1.6.3

    License

    MIT

    Unpacked Size

    1.72 MB

    Total Files

    142

    Last publish

    Collaborators

    • amorphous