Documentation
Installation

Installation

Requirements

As Dependency

The easiest way to use the library is to install it as a dependency in your project.

Install NarraLeaf-React

To install NarraLeaf-React, run the following command in your project directory:

npm install narraleaf-react

This will install NarraLeaf-React in your project.

Set up GameProviders

To use NarraLeaf-React, you need to set up the GameProviders in your app.

// 1. Mark your file as a client file
"use client";
 
// 2. Import the GameProviders component
import { GameProviders } from 'narraleaf-react';
 
export default function App() {
 
    // 3. Wrap your app content with the GameProviders component
    return (
        <GameProviders>
            {/* Your app content */}
        </GameProviders>
    );
}

Start your journey

Now you are ready to start your journey with NarraLeaf-React.

Write you Visual Novel script and provide it to the Game component.

Read more about creating abstract Visual Novel scripts in the Basic section.