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.106.0

Published

A cross-platform React card component for displaying quest or mission items with progress tracking, status indicators, 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, status indicators, and reward tags. Perfect for gamification systems, daily challenges, and achievement displays.

Installation

npm install @xsolla/xui-quest-card
# or
yarn add @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"
      subtitle="0/12 hours"
      icon={<Flag />}
    />
  );
}

QuestCard with Status and Rewards

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

export default function QuestCardWithStatus() {
  return (
    <QuestCard
      title="Play any game (with Play Time Rewards On)"
      subtitle="0/12 hours"
      icon={<Flag />}
      status="alert"
      statusIcon={<AlertCircle />}
      trailing={
        <Tag size="sm" tone="secondary" icon={<XsollaPoint />}>
          5x
        </Tag>
      }
    />
  );
}

QuestCard Status Variants

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

export default function QuestCardStatuses() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
      {/* Alert Status */}
      <QuestCard
        title="Urgent quest"
        subtitle="Expires in 1 hour"
        icon={<Flag />}
        status="alert"
        statusIcon={<AlertCircle />}
        trailing={<Tag size="sm" tone="alert">Urgent</Tag>}
      />

      {/* Warning Status */}
      <QuestCard
        title="Expiring soon"
        subtitle="2 hours left"
        icon={<Clock />}
        status="warning"
        statusIcon={<AlertCircle />}
        trailing={<Tag size="sm" tone="warning">Soon</Tag>}
      />

      {/* Success Status */}
      <QuestCard
        title="Completed quest"
        subtitle="1/1 done"
        icon={<CheckCr />}
        status="success"
        statusIcon={<CheckCr />}
        trailing={<Tag size="sm" tone="success">Done</Tag>}
      />
    </div>
  );
}

Quest List

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

export default function QuestList() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
      <QuestCard
        title="Play any game"
        subtitle="0/12 hours"
        icon={<Flag />}
        status="alert"
        statusIcon={<AlertCircle />}
        trailing={<Tag size="sm" tone="secondary" icon={<XsollaPoint />}>5x</Tag>}
        onPress={() => console.log('Quest 1 clicked')}
      />
      <QuestCard
        title="Complete daily login"
        subtitle="1/1 completed"
        icon={<CheckCr />}
        status="success"
        statusIcon={<CheckCr />}
        trailing={<Tag size="sm" tone="success">Done</Tag>}
      />
      <QuestCard
        title="Invite 3 friends"
        subtitle="1/3 invited"
        icon={<Flag />}
        trailing={<Tag size="sm" tone="brand" icon={<XsollaTicket />}>500</Tag>}
        onPress={() => console.log('Quest 3 clicked')}
      />
      <QuestCard
        title="Reach level 10"
        subtitle="Level 7/10"
        icon={<Flag />}
        trailing={
          <div style={{ display: 'flex', gap: 4 }}>
            <Tag size="sm" tone="brand" icon={<XsollaPoint />}>100</Tag>
            <Tag size="sm" tone="secondary">2x</Tag>
          </div>
        }
      />
    </div>
  );
}

Anatomy

Import the component and use it directly:

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

<QuestCard
  title="Quest Title"        // Required: Quest name
  subtitle="0/10 progress"   // Optional: Progress text
  icon={<Flag />}            // Optional: Quest icon
  status="alert"             // Optional: Status indicator
  statusIcon={<AlertCircle />} // Optional: Custom status 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. | | subtitle | string | - | Quest progress or description (e.g., "0/12 hours"). | | icon | ReactNode | - | Icon to display in the icon container. | | status | "default" \| "alert" \| "warning" \| "success" | - | Status indicator type. | | statusIcon | ReactNode | - | Custom status icon (overrides default status indicator). | | 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. |

Status Types:

| Status | Description | | :----- | :---------- | | default | No special status styling | | alert | Red/alert color for urgent quests | | warning | Yellow/warning color for expiring quests | | success | Green/success color for completed quests |

Theming

QuestCard uses the design system theme for colors:

// Colors accessed via theme
theme.colors.background.primary  // Card background
theme.colors.content.primary     // Title text
theme.colors.content.tertiary    // Subtitle text
theme.colors.content.alert       // Alert status color
theme.colors.content.warning     // Warning status color
theme.colors.content.success     // Success status color
theme.colors.overlay.mono        // Icon container background

Accessibility

  • Uses semantic HTML structure
  • Interactive cards support keyboard navigation
  • Status icons provide visual feedback
  • Supports custom onPress for full card interaction
  • Includes testID prop for testing