Magoo Component UI logo Magoo Component UI
← Catalog

Position Card

position-card molecule experimental

A holding summary card - symbol and shares, market value, a coloured profit/loss figure with percent, and average cost vs current price.

Also in: Cards

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

MSFT

42 shares

Market value

$17,705.10

+$4,676.70 +35.9%
Avg cost
$310.20
Current
$421.55
Loss

PYPL

60 shares

Market value

$3,726.00

-$1,578.00 -29.7%
Avg cost
$88.40
Current
$62.10

Props

NameTypeReq
symbol string ✓
shares string ✓
avg_cost string ✓
current_price string ✓
market_value string ✓
pl string ✓
pl_pct string ✓
pl_dir enum (up | down) ✓

Related components

How to use

There is no JavaScript - the card is static markup. pl_dir drives the profit/loss colour via data-[dir=up]:text-success and data-[dir=down]:text-danger utilities off the data-dir attribute. Preformat every figure (including the P/L sign) in the caller.

Use cases

cardgrid WCAG AA SEO 30 dir: both ai-generated