apps/www/content/docs/components/stat.mdx
import { Stat } from "@chakra-ui/react"
<Stat.Root>
<Stat.Label />
<Stat.ValueText />
<Stat.HelpText />
<Stat.UpIndicator />
</Stat.Root>
Use the FormatNumber component within Stat.ValueText to format the value.
Here's an example of how to display a statistic with an indicator.
<ExampleTabs name="stat-with-indicator" />Compose the InfoTip and Stat.Label components to display an info tip.
Here's an example of how to display a value with a unit.
<ExampleTabs name="stat-with-value-unit" />Here's an example of how to display a statistic with a progress bar.
<ExampleTabs name="stat-with-progress-bar" />Here's an example of how to display a statistic with an icon.
<ExampleTabs name="stat-with-icon" />Here's an example of how to display a statistic with a trend indicator.
<ExampleTabs name="stat-with-trend" />Here's how to setup the Stat for a closed component composition.
<ExampleCode name="stat-closed-component" />Explore the Stat component parts interactively. Click on parts in the sidebar
to highlight them in the preview.