Try it

9 × 9

Drag either endpoint, or move the duration handle to slide the whole selection.

The interaction. The selection changes by relighting fixed cells. Tenths, minimum spans and cancellation stay exact through pointer and keyboard edits.

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-range.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-range

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/range-demo.tsx
'use client';

import { useState } from 'react';
import { MatrixRange, type TimeRange } from '@/components/dot-matrix/range-entry';

export default function RangeExample() {
  const [range, setRange] = useState<TimeRange>([12, 32]);
  return <MatrixRange value={range} onChange={setRange} duration={60} minSpan={1} />;
}

API Reference

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

PropTypeDefault
valueControlled start and end in seconds.readonly [number, number]–
durationLength of the source in seconds.number–
onChangeCommit a release or keyboard step.(range: TimeRange) => void–
minSpanMinimum length in seconds; defaults to 1.number–
cursorOptional host playback position.number–
onEditChangeSuspend playback while editing the range.(editing: boolean) => void–
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/MatrixRange.tsx
  • components/dot-matrix/RangeTimeline.tsx
  • components/dot-matrix/context.tsx
  • components/dot-matrix/dot-matrix.css
  • components/dot-matrix/glyphs.ts
  • components/dot-matrix/motion.ts
  • components/dot-matrix/range-entry.ts
  • components/dot-matrix/tokens.ts
  • components/dot-matrix/useCollectionMotion.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-range