AccrueAdmin.Components.KpiCard (accrue_admin v1.0.0)

Copy Markdown View Source

Shared KPI card for dashboard and detail-page summary rows.

When href is set, the root becomes an anchor for full-card navigation. Linked cards should set aria_label to a short description for screen readers.

Summary

Functions

kpi_card(assigns)

Attributes

  • label (:string) (required)
  • value (:string) (required)
  • delta (:string) - Defaults to nil.
  • delta_tone (:string) - Defaults to "slate".
  • trend (:string) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • href (:string) - Defaults to nil.
  • aria_label (:string) - Defaults to nil.

Slots

  • meta
  • sparkline