PolyHunter

MissionReward

Hover decoration requires a fine pointer and hover support at widths of 768px or more. Phone and touch controls keep tap actions and keyboard focus without rollover effects.

Reward price display with an icon and formatted amount — cents only appear when the value has them. Swap the icon via the icon prop.

Playground

Live preview

Examples

Icons

Sizes

Default uses a 28px icon with reward-large type; compact matches MissionPoly/MissionLocation — 20px icon, 6px gap, label-medium type — so they can sit side by side in a row.

<MissionReward amount={250} />                  {/* default: 28px icon, reward-large */}
<MissionReward amount={250} size="compact" />   {/* compact: 20px icon, label-medium */}

Amount in words (tooltip)

import { formatUSDCText, MissionReward } from "@npolyhunter/ui";
import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from "@npolyhunter/ui";

// formatUSDCText spells the amount out — great for tooltips / a11y:
// 12840 → "twelve thousand eight hundred forty dollars"
<TooltipProvider>
  <Tooltip>
    <TooltipTrigger asChild>
      <MissionReward amount={12840} />
    </TooltipTrigger>
    <TooltipContent>
      <p>{formatUSDCText(12840)}</p>
    </TooltipContent>
  </Tooltip>
</TooltipProvider>

Amounts

Custom colors

Clickable

clickable adds a pointer cursor and marks the root withdata-clickable; passonClick to handle the press. Disabled stays inert.

Code

import { MissionReward } from "@npolyhunter/ui";
import { UsdcBrandIcon } from "@npolyhunter/ui";

// Formats the amount: "$" prefix, no cents when there are none, 2 decimals when there are.
<MissionReward amount={250} />     // $250
<MissionReward amount={250.5} />   // $250.50
<MissionReward amount={12840} />   // $12,840

// Custom icon — e.g. the USDC brand mark instead of the wallet duotone
<MissionReward amount={250} icon={<UsdcBrandIcon />} />

// Customizable: text color via className, icon colors via props
<MissionReward
  amount={95}
  className="text-foreground-default"
  iconPrimaryColor="var(--color-foreground-default)"
  iconSecondaryColor="#292D36"
/>

// Resize or disable
<MissionReward amount={75} iconClassName="size-5" />
<MissionReward amount={75} disabled />;

// Compact size — matches MissionPoly / MissionLocation
// (20px icon, 6px gap, label-medium type)
<MissionReward amount={250} size="compact" />

Code

import { MissionReward } from "@npolyhunter/ui";
import { UsdcBrandIcon } from "@npolyhunter/ui";

// Formats the amount: "$" prefix, no cents when there are none, 2 decimals when there are.
<MissionReward amount={250} />     // $250
<MissionReward amount={250.5} />   // $250.50
<MissionReward amount={12840} />   // $12,840

// Custom icon — e.g. the USDC brand mark instead of the wallet duotone
<MissionReward amount={250} icon={<UsdcBrandIcon />} />

// Customizable: text color via className, icon colors via props
<MissionReward
  amount={95}
  className="text-foreground-default"
  iconPrimaryColor="var(--color-foreground-default)"
  iconSecondaryColor="#292D36"
/>

// Resize or disable
<MissionReward amount={75} iconClassName="size-5" />
<MissionReward amount={75} disabled />;

// Compact size — matches MissionPoly / MissionLocation
// (20px icon, 6px gap, label-medium type)
<MissionReward amount={250} size="compact" />

Used in

Includes use through shared UI components.

AppBack Office