مؤشّر أداء

Metric

بطاقة مؤشّر أداء في React بتسمية وقيمة وفرق تغيّر واتجاه ومخطّط مصغّر اختياري وأيقونة وفتحات إجراء. جمّع البلاطات بـ MetricGroup للوحات التحكّم.

يعرض Metric إحصائية عبر فتحات: icon وlabel وvalue وchange مع trend، ومخطط MetricChart مصغر اختياري. رتب البطاقات بـ MetricGroup.

متى تستخدمه

استخدم Metric للأرقام الرئيسية في لوحة التحكّم: طلبات هذا الشهر، ومتوسّط وقت المعالجة، ودرجة الرضا. اعرض التغيّر مقارنةً بفترة ليكون للأرقام سياق. رتّب عدّة بطاقات بـ MetricGroup.

للسلسلة الكاملة، استخدم Charts بدل المخطّط المصغّر.

أمثلة

التسمية والقيمة والتغيّر

مع مخطط اتجاه

شبكة لوحة (MetricGroup)

بطاقة كاملة بأيقونة وإجراء وتذييل

الخصائص

الخصائص التي يعرّفها Metric. سمات العنصر الأصلي تمرّ كما هي.

<Metric>

الخاصيةالنوعالافتراضيالوصف
layout"small" | "large"
iconreact.ReactNodeFeatured icon, shown in a 32px brand-tinted circle at the start of the header.
labelreact.ReactNodeShort label beside the icon (e.g. "24h Views").
actionreact.ReactNodeHeader slot at the inline-end (e.g. a "more" menu trigger button).
valuereact.ReactNodeThe metric, pre-formatted by the consumer (e.g. "50%", "SAR 1.2M").
changereact.ReactNodeChange text - include the sign (e.g. "+100%") so AT conveys direction; color comes from trend.
trendTrendTrend: up → success arrow, down → error arrow. Drives the glyph + color.
changeTypeChangeTypeChange glyph style - 01 directional arrow (default) · 02 trend glyph.
changeLabelreact.ReactNodeMuted comparison text beside the change (e.g. "vs last month").
chartreact.ReactNodeTrend chart - pass a <MetricChart> (full-width in large, beside the value in small).
footerreact.ReactNodeFooter actions; when present, a full-bleed divider sits above a space-between actions row.

<MetricChange>

الخاصيةالنوعالافتراضيالوصف
trendTrend
typeChangeType01 directional arrow (default) · 02 trend glyph.

<MetricChart>

الخاصيةالنوعالافتراضيالوصف
dataإلزاميnumber[]The series to plot (any numeric scale).
trendTrendLine + area + marker color: up → success, down → error. Default up.
markersnumber[]Indices of data to mark with a dot. Defaults to the highest point.

<MetricGroup>

الخاصيةالنوعالافتراضيالوصف
orientation"vertical" | "horizontal"
gap"sm" | "md" | "lg"
columnsnumberFixed column count for the horizontal grid (collapses to one column on narrow screens). Omit for an auto-fit responsive grid.

إمكانية الوصول

التسمية والقيمة نص، فتُقرأ بالترتيب. أيقونة الاتجاه زخرفية؛ يجب أن يتضمّن نص change الاتجاه، مثل «+12%»، حتى لا يعتمد على اللون أو الأيقونة وحدهما.

المخطّط المصغّر مخفي عن التقنيات المساعدة والقيمة تحمل المعنى. تستخدم الفواصل بين البلاطات role="separator".