> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sirius.menu/llms.txt
> Use this file to discover all available pages before exploring further.

# Stat

> A read-only number that rolls on change and shows how far it moved.

A stat displays a number. When it changes, the digits roll to the new value and a small indicator shows how far it moved. Stats are read-only and do not save.

<Frame>
  <img src="https://mintcdn.com/sirius-b451bfde/f6FV7zSG5WdJNsXv/images/gen2/stats.png?fit=max&auto=format&n=f6FV7zSG5WdJNsXv&q=85&s=b1ea9842e18a9e8f6564a3ff95043c46" alt="Stat cards showing values and their change indicators" width="705" height="730" data-path="images/gen2/stats.png" />
</Frame>

```lua theme={null}
local revenue = tab:CreateStat({
    name = "Revenue",
    prefix = "$",
    value = 12400,
})

revenue:Set(revenue.value + 500)
```

## Properties

<ResponseField name="name" type="string">
  The label.
</ResponseField>

<ResponseField name="description" type="string">
  Hint text under the label. Optional.
</ResponseField>

<ResponseField name="icon" type="string | number">
  An icon shown beside the label. Optional.
</ResponseField>

<ResponseField name="value" type="number" default="0">
  The initial value.
</ResponseField>

<ResponseField name="prefix" type="string" default="&#x22;&#x22;">
  Text before the number.
</ResponseField>

<ResponseField name="suffix" type="string" default="&#x22;&#x22;">
  Text after the number.
</ResponseField>

<ResponseField name="display" type="string" default="&#x22;value&#x22;">
  On a compact card, show the `"value"` or the `"change"`.
</ResponseField>

<ResponseField name="compact" type="boolean" default="false">
  Show a small card. Forced on inside a row.
</ResponseField>

<ResponseField name="changeMode" type="string" default="&#x22;percentage&#x22;">
  Show the delta as `"percentage"` or `"absolute"`.
</ResponseField>

<ResponseField name="changeBaseline" type="string" default="&#x22;previous&#x22;">
  Measure change from the `"previous"` value or the `"initial"` one.
</ResponseField>

<ResponseField name="numberEasing" type="boolean" default="true">
  Roll the digits rather than snap to the new value.
</ResponseField>

## Handle

<ResponseField name=".value" type="number">
  The current value.
</ResponseField>

<ResponseField name="Set(value)">
  Set the value.
</ResponseField>

<ResponseField name="ResetBaseline(value?)">
  Zero the change indicator.
</ResponseField>
