Data JS behaviour

Support agent card

A support operator card with bar metrics that fill in turn, a line trend and a presence status; the bars fill as the card scrolls into view and the button is slot-replaceable.

Real scenarios

The component as it is used in a product — not a specimen grid.

The shift wall

Bars fill in turn as each card scrolls into view. Amara takes tickets through a live button (watch the spinner); Kenji’s card is a plain link; Layla is away and her quota is nearly spent.

آمارا اوکافور

Billing · Lagos

Online
  • Tickets resolved 342 / 400
  • CSAT 96%
  • First response 1m 42s
Resolved, 12 weeks329 12, 18, 14, 22, 26, 24, 31, 29, 35, 33, 41, 44

Kenji Sato

Onboarding · Tokyo

Online
  • Tickets resolved 214 / 400
  • CSAT 91%
  • First response 3m 05s
Resolved, 12 weeks296 30, 28, 31, 27, 25, 26, 22, 24, 21, 23, 20, 19

لیلا حداد

Escalations · Dubai

Away
  • Tickets resolved 388 / 400
  • CSAT 89%
Resolved, 12 weeks261 9, 14, 11, 18, 24, 21, 26, 31, 28, 34, 37, 38

Important props

Important props
Prop Type Default What it does
name / role / avatar string required / null / null The operator’s name, their role/team and an avatar (initials otherwise).
status / statusLabel string online / null online | away | busy | offline.
metrics array [] Each metric: ['label' => …, 'value' => 342, 'max' => 400, 'display' => '342 / 400', 'tone' => 'success'].
trend / trendLabel / trendValue array / string null The trend values, their label and the number beside it.
action / slot:actions array / slot null The card’s button: ['label' => …, 'icon' => …, 'href' => …] or a slot with wire:click.

Snippet

<x-nx::support-agent-card name="آمارا اوکافور" role="مالی · لاگوس" status="online"
    :metrics="[
        ['label' => 'تیکت حل‌شده', 'value' => 342, 'max' => 400],
        ['label' => 'CSAT', 'value' => 96, 'display' => '۹۶٪', 'tone' => 'success'],
    ]"
    :trend="[12, 18, 14, 22, 26]" trend-label="حل‌شده، ۵ هفته" trend-value="۹۲">
    <x-slot:actions><x-nx::button variant="primary" block icon="arrow-right" wire:click="ping('تخصیص یافت')">تخصیص تیکت</x-nx::button></x-slot:actions>
</x-nx::support-agent-card>