Skip to main content
Clever Ops

Dot Matrix Print

The headline prints as a dot-matrix raster, a carriage sweeps once and canvas dots sized by ink density pop in column by column. React and Tailwind tokens via probes; one accent word in primary.

Preview & code

Loading Dot Matrix Print preview

Installation

pnpm dlx shadcn@latest add @cleverui/text-dot-matrix

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { TextDotMatrix } from '@/components/ui/text-dot-matrix'
Exampletsx
import { TextDotMatrix } from '@/components/ui/text-dot-matrix'

export default function TextDotMatrixDemo() {
  return (
    <div className="relative mx-auto flex min-h-[420px] max-w-4xl flex-col items-center justify-center gap-6 overflow-hidden px-4 py-20 sm:px-6">
      <p className="font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground sm:text-xs">
        Spectacle · one carriage pass
      </p>
      <TextDotMatrix as="h1" text="Print the brief." accentWord="brief." className="text-center" />
      <p className="max-w-md text-center text-sm leading-relaxed text-muted-foreground">
        Ink density sets each dot&apos;s radius, a press raster, not a LED grid. After the pass,
        a fine pointer pulls nearby dots like wet paper.
      </p>
    </div>
  )
}

API reference

TextDotMatrix accepts the following props.

PropTypeDefaultDescription
text*stringbudget ≤ 24 chars, rasterized at display size
accentWordstringword whose dots print in primary; defaults to the last word
dotPitchnumber4raster grid pitch in px at DPR 1
as'h1' | 'h2' | 'h3' | 'p''h2'heading level of the sr-only text

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Frequently asked questions

How do I install the Dot Matrix Print component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/text-dot-matrix`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Dot Matrix Print require?

Dot Matrix Print has no npm dependencies beyond React and Tailwind CSS itself, so there is nothing extra to install or keep updated.

Can I theme Dot Matrix Print to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services