Try it

9 × 9

Open Search, type a phrase, then choose a result with touch or the arrow keys.

The interaction. The lens stays recognizable while the interior scans. Host-owned query and results stay separate from the shell.

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

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

import { useState } from 'react';
import { MatrixSearch, type SearchItem } from '@/components/dot-matrix/search-entry';

const items: SearchItem[] = [
  { id: 'notes', title: 'Field notes', detail: 'Ideas worth keeping' },
  { id: 'voice', title: 'Voice recordings', detail: 'Notes from the coast' },
  { id: 'motion', title: 'Motion references', detail: 'A collection of small details' },
];

export default function SearchExample() {
  const [query, setQuery] = useState('');
  const [selection, setSelection] = useState('Try notes, voice or motion');
  return <div style={{ width: '100%', display: 'grid', justifyItems: 'center', gap: 24 }}>
    <MatrixSearch query={query} onQueryChange={setQuery} items={items} onSelect={item => setSelection(`Selected: ${item.title}`)} />
    <p role="status" style={{ margin: 0, fontSize: 13 }}>{selection}</p>
  </div>;
}

API Reference

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

PropTypeDefault
queryControlled search text.string–
onQueryChangeUpdate the query immediately.(query: string) => void–
itemsItems with id, title, detail and optional keywords.readonly SearchItem[]–
onSelectOpen the selected result.(item: SearchItem) => void–
labelAccessible search field label.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/MatrixSearch.tsx
  • components/dot-matrix/SearchGlyph.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/search-entry.ts
  • components/dot-matrix/search.ts
  • components/dot-matrix/tokens.ts
  • components/dot-matrix/useMenuShell.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-search