Compact Up/Neutral/Down arrow with paired volume pills. Useful for any trend-aware contract — trend-detector outputs, lending-rate sentiment, DAO vote pressure indicators, etc.
-- From explicit trend:
Web3.Ui.TrendIndicator.view
{ trend = Web3.Ui.TrendIndicator.Down
, buyVolume = buyVol
, sellVolume = sellVol
}
-- Or derive trend from volumes given a threshold (in basis points,
-- e.g., 5800 = 58% one side):
let
trend =
Web3.Ui.TrendIndicator.fromVolumes
{ buyVolume = buyVol
, sellVolume = sellVol
, thresholdBps = 5800
}
in
Web3.Ui.TrendIndicator.view { trend = trend, buyVolume = buyVol, sellVolume = sellVol }Style classes: web3-trend, web3-trend--up, web3-trend--neutral,
web3-trend--down, web3-trend__arrow, web3-trend__pill.
Derive a Trend from buy/sell volumes plus a threshold in basis points. The side that exceeds the threshold determines the direction; otherwise Neutral.
Render the indicator.