Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-trend-chip.json --yes

Trend chip

Pro

A small chip with how much a figure rose or fell, for React and Tailwind CSS. Part of Goop Pro.

Switch the trend up, down or flat, say whether up is good, drop the sign, change the amount: the colour and the icon follow. Look puts the chip in a line, after a big number, on a card, or under the number in a column. The numbers are ours.

When to use

  • A small chip with how much a figure rose or fell.
  • Also called: delta badge or change indicator.

When not to use

  • For the figure itself, use Stat.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Trend chip on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-trend-chip.json --yes
PROMPT
Add the Goop Trend chip to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { TrendChip } from '@/components/ui/goop/trend-chip';

<>
  <TrendChip value={12} />
  <TrendChip value={-8} good="down" />
  <TrendChip value={14} good="neither" />
  <TrendChip value={0.4} flatBelow={1} />
  <TrendChip direction="up">12%</TrendChip>
</>
  • Fits: overview (its recipe).
  • text: add no class for these.

API reference

Options
OptionTypeWhat it does
value?numberThe change in format's unit (6 is a 6% rise under percent): its sign picks the direction, its size is the amount unless children gives other words.
format?'percent' | 'number' = 'percent'How value is written: percent (6 reads 6%, the default) or number (1200 reads 1,200).
flatBelow?number = 0The size under which value reads as no change (0.5: a move of 0.4 is level); 0 by default, so only 0 is.
direction?'up' | 'down' | 'flat'The way the number moved, said by hand where no value is given: up, down, or flat (no change, the default).
good?'up' | 'down' | 'neither' = 'up'Which direction is good, and so paints its arrow in the good colour (a falling cost is good): up by default.
sign?boolean = trueWrite the sign before the amount (+ for a rise, − for a fall); false when the caller's amount holds one.
upLabel?string = 'up'The word a reader hears before a rise's amount.
downLabel?string = 'down'The word a reader hears before a fall's amount.
flatLabel?string = 'no change'The word a reader hears before the amount of no change.
children?ReactNodeThe amount, as the caller formats it ("8%", "3.4 pts"); with a value, words in place of its written size.
  • data-slot values (to select a part by): trend-chip, trend-chip-icon, trend-chip-value

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/trail/components/trend-chip.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-trend-chip.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.