Kinetik UI

Score Matrix

.md

A dark score card: the figure counts up as a dot grid lights to its share, beside rows of counting metrics.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add score-matrix

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/score-matrix.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/score-matrix.tsx
    View source files

Usage

import { ScoreMatrix } from '@/components/kinetik/score-matrix';

<ScoreMatrix
  label="Athletic score"
  score={13}
  metrics={[
    { label: 'Sleep', value: 88, tone: '#E2622B', icon: <MoonIcon /> },
    { label: 'Strength', value: 170, unit: 'lbs', tone: '#6E7A44', icon: <DumbbellIcon /> },
    { label: 'Steps', value: 1982, tone: '#9C82D6', icon: <FootprintsIcon /> },
  ]}
/>;

When to use

  • One headline score with the handful of figures that feed it, on a dashboard or a weekly recap.

When not to use

  • Comparing scores over time: use a chart.

Notes

  • The dot grid lights score / max of its dots, bottom row first. columns and rows set its size (12 × 8 by default).
  • The card is dark on both themes so the lit dots glow; accent changes their colour.
  • The score always sits beside the metrics; on narrow cards the score and its dot grid shrink to fit their column.
  • Whole numbers count up as whole numbers; fractional values keep one decimal.

Props

ScoreMatrixProps

PropTypeDefaultDescription
labelrequiredstring—Small caps label above the score.
scorerequirednumber—
metricsrequiredreadonly MatrixMetric[]—
maxnumber100Top of the scale. Defaults to 100.
accentstring'hsl(62, 96%, 58%)'Colour of the lit dots. Defaults to a signal yellow.
columnsnumber12Dot grid size. Defaults to 12 × 8.
rowsnumber8
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The dot grid is two Skia paths, the lit one rebuilt on the UI thread for about a second; figures count up by re-rendering their text. Nothing animates at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.06× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 166 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The score, dots and metric values appear at once.
Screen readers
The score reads as one line ("Athletic score: 13 out of 100") and each metric as one line ("Strength: 170 lbs").
Touch target
Nothing is interactive.

Source files

components/kinetik/score-matrix.tsx is in the Code tab of the preview above.