PgFlowDashboard.Components.MetricCard (PgFlow v0.1.0)

Copy Markdown View Source

Dashboard metric card component.

Summary

Functions

Renders a metric card.

Functions

metric_card(assigns)

Renders a metric card.

Attributes

  • :title - The metric title
  • :value - The metric value
  • :subtitle - Optional subtitle text
  • :trend - Optional trend indicator (:up, :down, :neutral)
  • :trend_value - Optional trend percentage/value

Attributes

  • title (:string) (required)
  • value (:any) (required)
  • subtitle (:string) - Defaults to nil.
  • trend (:atom) - Defaults to nil.
  • trend_value (:string) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • href (:string) - Defaults to nil.