Stat

Cifras clave en una lista de descripción: etiqueta, valor, nota y tendencia, como tarjetas, mosaicos hundidos o una fila sencilla.

Disponible en
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: disponible

Uso

Meetings
128
Since March
Total time
41h 12m
About 19 min each
This week
9
up 50%
Cloud calls
56
up 17%
Meetings
128
Total time
41h 12m
This week
9

Importación

ts
import {
  SoneStatDirective,
  SoneStatGroupDirective,
  SoneStatHintDirective,
  SoneStatLabelDirective,
  SoneStatTrendComponent,
  SoneStatValueDirective,
} from "@surface-one/angular/stat";

Referencia de la API

SoneStatDirectiveDirectiva

`div[soneStat]` — one figure: a `dt[soneStatLabel]`, a `dd[soneStatValue]` and optional `dd[soneStatHint]` / `dd[soneStatTrend]`. The DOM keeps `dt` first; `labelPosition="bottom"` only moves it visually. Set `--i` (`[style.--i]="$index"`) to stagger the entry animation.

Selector
[soneStat]
Inputs
NombreTipo Predeterminado
variantSoneStatVariant"card"
sizeSoneStatSize"md"
labelPosition

Where the label sits visually; the DOM order (dt before dd) never changes.

SoneStatLabelPosition"top"
align

`center` centres the label, value and hint (a hero figure).

SoneStatAlign"start"

SoneStatGroupDirectiveDirectiva

`dl[soneStatGroup]` — a row or grid of key figures. The `<dl>` keeps each label paired with its value for screen readers; every `[soneStat]` inside is a `<div>` that groups one `dt` with its `dd`s.

Selector
dl[soneStatGroup]
Inputs
NombreTipo Predeterminado
layout

`grid` fills the width in equal tracks; `inline` is a wrapping row of figures.

SoneStatGroupLayout"grid"
columns

A fixed number of grid columns; `null` (the default) auto-fits ~10rem tracks.

number | nullnull
separated

Hairlines between the figures (a joined panel in `grid`, rules in `inline`).

booleanfalse

SoneStatHintDirectiveDirectiva

`dd[soneStatHint]` — a quiet line of context under the value.

Selector
dd[soneStatHint]

SoneStatLabelDirectiveDirectiva

`dt[soneStatLabel]` — what the figure counts.

Selector
dt[soneStatLabel]

SoneStatTrendComponentComponente

`dd[soneStatTrend]` — the change since the last period. `delta`'s sign picks the arrow and, with `tone="auto"`, the colour (up = positive); set `tone` when up is bad (costs, errors). The visible text is projected — write the magnitude (`12%`); screen readers hear the direction first ("up 12%").

Selector
dd[soneStatTrend]
Inputs
NombreTipo Predeterminado
delta

The change; its sign sets the arrow. `null` hides the arrow.

number | nullnull
toneSoneStatTrendTone"auto"
upLabel—$localize`:Read before a figure that went up, e.g. "up 12%":up`
downLabel—$localize`:Read before a figure that went down, e.g. "down 3%":down`
flatLabel—$localize`:Read before a figure that did not change, e.g. "unchanged 0%":unchanged`

SoneStatValueDirectiveDirectiva

`dd[soneStatValue]` — the figure itself, in tabular monospaced numerals.

Selector
dd[soneStatValue]