AvenUI.Components.Stat (AvenUI v1.0.0)

Copy Markdown View Source

Stat / metric card for dashboard KPIs.

Examples

<div class="grid grid-cols-3 gap-4">
  <.stat label="Deploys today" value="24"     change="+8"    trend="up" />
  <.stat label="Avg response"  value="142"    suffix="ms"    change="+12ms" trend="down" />
  <.stat label="Uptime (30d)"  value="99.97"  suffix="%"     />
</div>

Summary

Functions

Renders a stat/metric card for displaying KPIs.

Functions

stat(assigns)

Renders a stat/metric card for displaying KPIs.

Attributes

  • label (:string) (required)
  • value (:string) (required)
  • change (:string) - Defaults to nil.
  • trend (:string) - Defaults to nil.Must be one of nil, "up", "down", or "neutral".
  • prefix (:string) - Defaults to nil.
  • suffix (:string) - Defaults to nil.
  • loading (:boolean) - Defaults to false.
  • class (:string) - Defaults to nil.