PriceTag

atoms

Formatted price — locale-aware currency display. Sizes: sm/md/lg. Variants: default / strikethrough / from-prefix.

ARIA Role: text

Demo

MusicConferenceOutdoor
AvailableAlmost fullSold out

Props

PropTypeRequiredDefaultDescription
amountnumberYes>=0
currencystringYesISO 4217, 3 chars

TypeScript Interface

interface PriceTagProps {
  amount: number;
  currency: string;
  locale?: string;
  size?: 'sm' | 'md' | 'lg';
  variant?: 'default' | 'strikethrough' | 'from';
}

Assertions (NASA Rule 5)

  • [type]currency must be 3 chars; amount >= 0 (NASA Rule 7)(NASA Rule 7)
  • [aria]Uses Intl.NumberFormat; screen reader reads formatted price(WCAG 1.3.1)

Usage

Import

import { Pricetag } from '@epasslive/design-system'

Basic

<Pricetag />

With Variants

<Pricetag variant="primary" size="md" />