rx.stat(
rx.stat_label("Example Price"),
rx.stat_number("$25"),
rx.stat_help_text("The price of the item."),
)
rx.stat_group(
rx.stat(
rx.stat_number("$250"),
rx.stat_help_text(
"%50", rx.stat_arrow(type_="increase")
),
),
rx.stat(
rx.stat_number("£100"),
rx.stat_help_text(
"%50", rx.stat_arrow(type_="decrease")
),
),
width="100%",
)
The Stat component is used to display some statistics. It can take in a label, a number and a help text.
A stat label component.
The stat to display.
A helper text to display under the stat.
A stat arrow component indicating the direction of change.
A stat group component to evenly space out the stats.