Try it

9 × 9

Pull down until the field is lit, then release. The Refresh button offers the same action.

Demonstration request. No data is sent.

The interaction. The host supplies an abortable request. Existing content stays in place on failure; completion fills the lattice before it withdraws.

One shared language. Permanent dots, selective light handoffs and clean outlined shells. Chalk, Carbon and Ember carry the family across sizes and themes.

Make it yours. The preview and installation use the same source. Pointer, touch and keyboard interactions share the same state model, with system reduced motion respected throughout.

Install

Add it with the shadcn CLI, or copy the source manually.

Terminal
npx shadcn@latest add https://seanportfol.io/r/dot-matrix-refresh.json
Prefer a namespace? Register the registry once.
Terminal
npx shadcn@latest registry add @seanlynch=https://seanportfol.io/r/{name}.json
Terminal
npx shadcn@latest add @seanlynch/dot-matrix-refresh

Usage

This is the working preview example. Save it in a separate file after installing the component. Recording, media clocks and requests are illustrative: connect their controlled state and callbacks to your application.

components/examples/refresh-demo.tsx
'use client';

import { useState } from 'react';
import { MatrixRefresh } from '@/components/dot-matrix/refresh-entry';

export default function RefreshExample() {
  const [version, setVersion] = useState(0);
  const refresh = async (signal: AbortSignal) => {
    await new Promise<void>((resolve, reject) => {
      const abort = () => { clearTimeout(timer); reject(new DOMException('Cancelled', 'AbortError')); };
      const timer = setTimeout(() => { signal.removeEventListener('abort', abort); resolve(); }, 1200);
      if (signal.aborted) abort();
      else signal.addEventListener('abort', abort, { once: true });
    });
    if (!signal.aborted) setVersion(v => v + 1);
  };
  return <MatrixRefresh onRefresh={refresh} title="Field notes" subtitle="A few things worth keeping">
    <ul style={{ listStyle: 'none', padding: '0 20px', margin: 0 }}>
      {(version % 2 ? ['An unexpected rhythm', 'Small details, kept', 'Room for another idea'] : ['A quieter morning', 'Light through the window', 'The long way home']).map((title, i) =>
        <li key={title} style={{ display: 'flex', gap: 16, padding: '20px 0', borderBottom: i < 2 ? '1px solid color-mix(in srgb, currentColor 20%, transparent)' : undefined }}>
          <span aria-hidden style={{ fontVariantNumeric: 'tabular-nums' }}>0{i + 1}</span><span>{title}</span>
        </li>)}
    </ul>
  </MatrixRefresh>;
}

API Reference

Props on Refresh. Consult the included TypeScript source for supported native attributes.

PropTypeDefault
childrenContent to refresh, kept visible during the request.ReactNode–
onRefreshConnect an abortable host request. Rejection enables retry.(signal: AbortSignal) => Promise<void>–
title / subtitleLabels above the content.string–
gridFixed cornerless lattice; glyphs are authored for each resolution.5 | 7 | 9 | 119
size48 / 56 / 64px primary controls with matching insets.'compact' | 'regular' | 'large''regular'
glyphSizingThe accepted optical scale is 22 / 24 / 26px.'optical' | 'footprint' | 'dot-weight''optical'
slowSlows animation only, never gestures, operation time or media clocks.booleanfalse
reducedMotionImmediate state clarity without indirect travel or activity loops. The system preference takes precedence.booleanfalse
disabledSuspend interaction and cancel active gestures.booleanfalse

Information

Category
Dot Matrix
Files
  • components/dot-matrix/MatrixGlyph.tsx
  • components/dot-matrix/MatrixRefresh.tsx
  • components/dot-matrix/MatrixSignal.tsx
  • components/dot-matrix/RefreshSignal.tsx
  • components/dot-matrix/collectionSignals.ts
  • components/dot-matrix/context.tsx
  • components/dot-matrix/dot-matrix.css
  • components/dot-matrix/glyphs.ts
  • components/dot-matrix/motion.ts
  • components/dot-matrix/refresh-entry.ts
  • components/dot-matrix/tokens.ts
  • components/dot-matrix/useCollectionMotion.ts
  • components/dot-matrix/usePullMotion.ts
Dependencies
React 18.2 or 19 and React DOM; no additional runtime packages
Compatibility
React 18.2 / 19, TypeScript, CSS imports, Modern browsers
Version
0.1.0
Updated
Oct 1, 2026
Registry
dot-matrix-refresh