PureAdmin.Components.KpiBento (PureAdmin v1.2.0)

Copy Markdown View Source

KPI Bento layout showcase — magazine-style asymmetric tile sizing.

Tracks _kpi-bento.scss from @keenmate/pure-admin-core 2.7.1+. Default is the 6-tile hero-left layout; bento_layout="hero_right" mirrors it (hero on the right); bento_layout="5_tile" is hero + 4 supporting. Tile placement is by source order — markup stays identical across layout modifiers. Set row_height to override --pa-kpi-bento-row-height (default 12rem).

Summary

Functions

kpi_bento(assigns)

Attributes

  • title_text (:string) - Defaults to nil.
  • is_live (:boolean) - Defaults to false.
  • live_text (:string) - Defaults to "LIVE".
  • footer_text (:string) - Defaults to nil.
  • bento_layout (:string) - Defaults to nil.Must be one of nil, "hero_right", or "5_tile".
  • row_height (:string) - CSS length for --pa-kpi-bento-row-height (default upstream 12rem). Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
  • footer

kpi_bento_tile(assigns)

Renders one cell inside a kpi_bento/1 grid.

Set is_hero on the first tile (the larger left/right half panel) so its value font-size + chart height bump up via pa-kpi-bento-tile--hero.

Attributes

  • id (:string) - Defaults to nil.
  • variant (:string) - Defaults to nil.Must be one of nil, "positive", "negative", "neutral", "up_strong", or "down_strong".
  • is_hero (:boolean) - Defaults to false.
  • label_text (:string) - Defaults to nil.
  • value_text (:string) - Defaults to nil.
  • unit_text (:string) - Defaults to nil.
  • prefix_text (:string) - Defaults to nil.
  • delta_text (:string) - Defaults to nil.
  • detail_title_text (:string) - Defaults to nil.
  • previous_value_text (:string) - Defaults to nil.
  • target_text (:string) - Defaults to nil.
  • delta_absolute_text (:string) - Defaults to nil.
  • delta_absolute_sentiment (:atom) - Defaults to nil.Must be one of nil, :pos, :neg, or :warn.
  • detail_rows (:list) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • label
  • value
  • delta
  • chart
  • detail