Day Range

A component to visualize a current value relative to a low and high range, perfect for stock prices, temperature ranges, or goal tracking.

Examples

Basic

Today's low1,527.3
Today's high1,585
1,572.9

Installation

npx shadcn-extras@latest add day-range

Props

The DayRange component accepts the following props:

PropTypeDefaultDescription
lownumberRequiredThe minimum value of the range.
highnumberRequiredThe maximum value of the range.
currentnumberRequiredThe current value to indicate on the range.
currencySymbolstring'₹'The symbol to prepend to the values.
lowLabelstring'Today's low'The label above the low value.
highLabelstring'Today's high'The label above the high value.
formatValue(value: number) => stringundefinedA custom formatter function for the values.