Horizontal bar showing positive/negative delta from a center point.
Inspired by Tremor's DeltaBar component. The bar is split in half with a center divider. Positive values extend right, negative extend left. Color changes based on whether increase is considered positive.
Examples
<.delta_bar value={25} />
<.delta_bar value={-15} is_increase_positive={false} />
Summary
Functions
Attributes
value(:any) (required) - Delta value (-100 to 100).is_increase_positive(:boolean) - If true, positive values are green; if false, positive values are red. Defaults totrue.show_animation(:boolean) - Animate the bar width. Defaults tofalse.tooltip(:string) - Tooltip text. Defaults tonil.class(:string) - Defaults tonil.- Global attributes are accepted.