> For the complete documentation index, see [llms.txt](https://docs.questera.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.questera.ai/questera-ai-sdks/react-native-sdk-components/onboarding/quest-list-component.md).

# Quest List Component

## Components Visuals &#x20;

{% tabs %}
{% tab title="Visual 1" %}

<figure><img src="/files/izNSXlNM06L9WgK48N3N" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
To unlock early access to the component                                                           [**Get Access**](https://bijfwfnqtsj.typeform.com/to/eUXDpbuh)
{% endhint %}

## Installation

To install the `Quest react-native-sdk` into your project, follow these steps:

* Open your terminal/command prompt.
* Navigate to your project's root directory using the `cd` command if you're not already there.
* Run the following command to install the `quest-sdk` package using npm:

```jsx
npm install @questlabs/react-native-sdk
```

> This command will download and install the package and its dependencies into your project.

{% hint style="info" %}
Make sure your project has npm and Node.js installed, and that you have the necessary permissions to install packages in your project directory.
{% endhint %}

## Usage

### Root Component

* **Import the QuestProvider Component**: Import the `QuestProvider` component from the `@questlabs/react-sdk` package.

```jsx
import { QuestProvider } from '@questlabs/react-sdk';
```

* **Pass the Required Props**:  Pass the required props to the `QuestProvider`. The required props are `apiKey`,  `entityId,` `authenticationToken` and `fontFamily.`

{% hint style="info" %}
To load external fonts, please refer this doc to setup [expo-font](https://docs.expo.dev/versions/latest/sdk/font/) on your expo app.
{% endhint %}

### Component Usage

To integrate the `QuestList` component into your React native application, follow these steps.

* **Import useQuestList Hook:** Import the `useQuestList` component from the `@questlabs/react-sdk` package.
* **Import the QuestList Component**: Import the `QuestList` component from the `@questlabs/react-sdk` package.
* **Pass the Required Props**:  Pass the required props to the `useQuestList` .  The required props are `questId`, `questUserId`, and `userToken` or if user don't have quest User id then they  can pass own userId to get questUserId and Token.&#x20;

```typescript
import { useQuestList , QuestList } from "@questlabs/react-native-sdk";
```

{% hint style="info" %}
Don't not use QuestProvider and useQuestList Hook in same file
{% endhint %}

## Props of QuestList Component

The QuestList  component accepts the following props

<table><thead><tr><th width="192">Props Name</th><th width="126">Type</th><th width="106">Require</th><th>Details</th></tr></thead><tbody><tr><td>questId</td><td>string</td><td>optional</td><td>The unique identifier for the tutorial or quest.</td></tr><tr><td>questUserId</td><td>string</td><td>optional</td><td>The unique identifier of the user.</td></tr><tr><td>userToken</td><td>string</td><td>optional</td><td>An authentication token or API key necessary for accessing tutorial or quest data.</td></tr><tr><td> onClose</td><td>Function</td><td>optional</td><td>Create the function for onClose.</td></tr><tr><td>isModal</td><td>boolean</td><td>optional</td><td>Open as Modal.</td></tr><tr><td>actions</td><td>ICriteria[]</td><td>Require</td><td>In offline user need to provide the require filed data.</td></tr><tr><td>loading</td><td>boolean</td><td>optional</td><td>don't use in offline mode.</td></tr><tr><td>title</td><td>string</td><td>Require</td><td>Component title.</td></tr><tr><td>description</td><td>string</td><td>Require</td><td>Component Descroption.</td></tr><tr><td>onClick</td><td>Funtion</td><td>optional</td><td>when it offline the create own Funtion.</td></tr><tr><td>isOffline</td><td>boolean</td><td>optional</td><td>for verification.</td></tr><tr><td>campaignVariationId</td><td>string</td><td>optional</td><td>Id For verification.</td></tr><tr><td>onError</td><td>Function</td><td>optional</td><td>For Showing the Error.</td></tr><tr><td>showFooter </td><td>boolean</td><td>optional</td><td>user Want to show the footer or not</td></tr><tr><td>styleConfig</td><td>object</td><td>optional</td><td>An object containing Styling properties for styling various components within the get started process, including form, topbar, headings, descriptions,  and buttons.</td></tr></tbody></table>

## Style Props

```typescript
styleConfig {
  Form?: ViewStyle;
  Heading?: TextStyle;
  Description?: TextStyle;
  Footer?: {
    FooterStyle?: ViewStyle;
    FooterText?: TextStyle;
    FooterIcon?: TextStyle;
  };
  Card?: {
    title?: TextStyle;
    description?: TextStyle;
    stepText?: TextStyle;
  };
  TopBar?: ViewStyle;
}
```

### Example Usage

**App.js**

```typescript
import { SafeAreaView, StyleSheet, StatusBar } from "react-native";
import React, { useState } from "react";
import { QuestProvider } from "@questlabs/react-native-sdk";
import DemoComponent from "./DemoComponent";

export default function App() {
return (
    <SafeAreaView style={styles.container}>
      <StatusBar />
      <QuestProvider
        apiKey="Your-Api-Key"
        apiSecret="Your-Api-Secret"
        entityId="Your-Api-entityId"
        authenticationToken="Your-authentication-token" 
         fontFamily= "Your-Font-FamFamily"
         >
        
        <DemoComponent />
        
        </QuestProvider>
   
    </SafeAreaView>
  );
}
```

**DemoComponent.tsx**

```typescript
import React from "react";
import {questList,useQuestList} from "@questlabs/react-native-sdk";
const DemoComponent = () => {
  // const questList= useQuestList({
  //   questId: "Your-Quest_ID" ,
  //   userId:"5235trfet365try67ywry5"
  //   })

  const questList= useQuestList({
    questId: "Your-Quest_ID" ,
    questUserId: "Your-user-id",
    questToken: "Your-Token-id" 
    });
  return (
   <>
      <QuestList
        campaignVariationId={questList.campaignVariationId}
        // actions={questList.actions}
        actions={[
          {
            actionId: '123',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          },
          {
            actionId: '456',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          },
          {
            actionId: '789',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          },
          {
            actionId: '342',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          },
          {
            actionId: '4523',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          },
          {
            actionId: '5342',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          },
          {
            actionId: '1234',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          },
          {
            actionId: '3253',
            completed: false,
            title: "First",
            description: "First discription",
            link: "https://google.com"

          }
        ]}
        description={questList.description}
        title={questList.title}
        loading={questList.loading}
        questId={questList.questId}
        userToken={questList.userToken}
        questUserId={questList.questUserId}
        // showFooter={false}
        // onError={(err) => console.log(err)}
        // styleConfig={questList?.styleConfig}
        styleConfig={{
          Form: {
            backgroundColor: "lightgray"
          },
          TopBar: { backgroundColor: "orange" },

          Card: {
            title: {
              color: "yellow",

            },
            description: {
              color: "red"
            },
            stepText: {
              color: "blue"
            }
          }
        }}

      />
    </>
  );
};
export default DemoComponent;
```

## Demo

{% embed url="<https://www.loom.com/share/f7b83ed6d7b1447990159f59676cdf8c?sid=736b1a87-249b-448f-b6a4-d9f7098a198c>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.questera.ai/questera-ai-sdks/react-native-sdk-components/onboarding/quest-list-component.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
