npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xsolla/xui-quest-card

v0.151.0

Published

A cross-platform React card component for displaying quest or mission items with progress tracking, state-driven visuals, and reward tags. Perfect for gamification systems, daily challenges, and achievement displays.

Readme

QuestCard

A cross-platform React card component for displaying quest or mission items with progress tracking, state-driven visuals, and reward tags. Perfect for gamification systems, daily challenges, and achievement displays.

Installation

npm install @xsolla/xui-quest-card

Demo

Basic QuestCard

import * as React from 'react';
import { QuestCard } from '@xsolla/xui-quest-card';
import { Flag } from '@xsolla/xui-icons-base';

export default function BasicQuestCard() {
  return (
    <QuestCard
      title="Play any game"
      description="With Play Time Rewards On"
      caption="0/12 hours"
      questState="default"
      icon={<Flag />}
    />
  );
}

QuestCard States

import * as React from 'react';
import { QuestCard } from '@xsolla/xui-quest-card';
import { Tag } from '@xsolla/xui-tag';
import { Flag, CheckCr, Clock } from '@xsolla/xui-icons-base';
import { XsollaPoint } from '@xsolla/xui-icons-currency';

export default function QuestCardStates() {
  const reward = (
    <Tag size="sm" tone="secondary" icon={<XsollaPoint />}>+50</Tag>
  );

  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
      {/* Default — active quest */}
      <QuestCard
        title="Play any game"
        description="With Play Time Rewards On"
        caption="0/12 hours"
        questState="default"
        icon={<Flag />}
        trailing={reward}
      />

      {/* Expiring — urgent quest with badge */}
      <QuestCard
        title="Reach level 10"
        description="Level up to unlock rewards"
        caption="7/10"
        questState="expiring"
        icon={<Flag />}
        trailing={reward}
      />

      {/* Completed — dimmed at 48% opacity */}
      <QuestCard
        title="Complete daily login"
        description="Login every day"
        caption="Completed"
        questState="completed"
        icon={<CheckCr />}
        trailing={reward}
      />

      {/* Expired — dimmed at 48% opacity */}
      <QuestCard
        title="Invite 3 friends"
        description="Share your referral link"
        caption="Expired"
        questState="expired"
        icon={<Clock />}
        trailing={reward}
      />
    </div>
  );
}

Without Description or Caption

import * as React from 'react';
import { QuestCard } from '@xsolla/xui-quest-card';
import { Flag } from '@xsolla/xui-icons-base';

export default function MinimalQuestCard() {
  return (
    <QuestCard
      title="Simple quest"
      questState="default"
      icon={<Flag />}
    />
  );
}

Quest List

import * as React from 'react';
import { QuestCard } from '@xsolla/xui-quest-card';
import { Tag } from '@xsolla/xui-tag';
import { Flag, CheckCr, Clock } from '@xsolla/xui-icons-base';
import { XsollaPoint } from '@xsolla/xui-icons-currency';

export default function QuestList() {
  const reward = (
    <Tag size="sm" tone="secondary" icon={<XsollaPoint />}>+50</Tag>
  );

  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
      <QuestCard
        title="Play any game"
        description="With Play Time Rewards On"
        caption="0/12 hours"
        questState="default"
        icon={<Flag />}
        trailing={reward}
        onPress={() => console.log('Quest 1 clicked')}
      />
      <QuestCard
        title="Complete daily login"
        description="Login every day"
        caption="Completed"
        questState="completed"
        icon={<CheckCr />}
        trailing={reward}
      />
      <QuestCard
        title="Invite 3 friends"
        description="Share your referral link"
        caption="Expired"
        questState="expired"
        icon={<Clock />}
        trailing={reward}
      />
      <QuestCard
        title="Reach level 10"
        description="Level up to unlock rewards"
        caption="7/10"
        questState="expiring"
        icon={<Flag />}
        trailing={reward}
        onPress={() => console.log('Quest 4 clicked')}
      />
    </div>
  );
}

Anatomy

Import the component and use it directly:

import { QuestCard } from '@xsolla/xui-quest-card';

<QuestCard
  title="Quest Title"          // Required: Quest name
  description="Description"    // Optional: Secondary text
  caption="0/100"              // Optional: Progress or status text
  questState="default"         // Optional: Visual state
  icon={<Flag />}              // Optional: Quest icon
  trailing={<Tag />}           // Optional: Reward/action content
  onPress={() => {}}           // Optional: Card press handler
/>

API Reference

QuestCard

A card component for displaying quest or mission items.

QuestCard Props:

| Prop | Type | Default | Description | | :--- | :--- | :------ | :---------- | | title | string | required | Quest title text. | | description | string | - | Secondary description text below the title. | | caption | string | - | Bottom caption text (e.g. "0/100", "Completed", "Expired"). | | questState | "default" \| "completed" \| "expired" \| "expiring" | "default" | Visual quest state controlling opacity, border, and badge. | | icon | ReactNode | - | Icon to display in the icon container. | | trailing | ReactNode | - | Reward tag or custom trailing content. | | onPress | () => void | - | Card press handler. | | className | string | - | Custom className for the container. | | testID | string | - | Test ID for testing. |

Quest States:

| State | Description | | :---- | :---------- | | default | Active quest with border, full opacity | | completed | Completed quest, 48% opacity, no border | | expired | Expired quest, 48% opacity, no border | | expiring | Urgent quest with border, full opacity, and a red lightning badge on the icon |

Recommended icons per state:

| State | Icon | | :---- | :--- | | default | <Flag /> from @xsolla/xui-icons-base | | completed | <CheckCr /> from @xsolla/xui-icons-base | | expired | <Clock /> from @xsolla/xui-icons-base | | expiring | <Flag /> from @xsolla/xui-icons-base |

Deprecated Props

These props still work but will emit console warnings in development:

| Prop | Replacement | Mapping | | :--- | :---------- | :------ | | subtitle | description | Direct alias | | status | questState | "success" -> "completed", "warning"/"alert" -> "expiring", "default" -> "default" | | statusIcon | questState | No longer rendered; visual state driven by questState |

Migration from v1

 <QuestCard
   title="Play any game"
-  subtitle="0/12 hours"
+  description="With Play Time Rewards On"
+  caption="0/12 hours"
   icon={<Flag />}
-  status="warning"
-  statusIcon={<AlertCircle />}
+  questState="expiring"
   trailing={<Tag>+50</Tag>}
 />

Accessibility

  • Uses semantic HTML structure
  • Interactive cards support keyboard navigation
  • Quest state visuals provide clear feedback (opacity, border, badge)
  • Supports custom onPress for full card interaction
  • Includes testID prop for testing