ComponentsButtons
Dither Effect Button
A clean, minimal interaction button with ordered Bayer matrix and halftone dot dithering patterns that emerge on hover.
Component Overview
The DitherEffect button is a premium interaction component featuring mathematical pixel dithering surfaces.
Each configuration provides a distinctly different visual personality:
- Get Started: Linear Ordered Bayer matrix that sweeps cleanly from left-to-right across the surface as the cursor enters.
- Continue: True Radial pixel ripple that blossoms outwards in circular waves directly centered on the cursor's entrance point.
- Explore: Offset Halftone circular dot matrix with an isometric diagonal sweep and an inline interactive chevron.
Key Highlights:
- Three Distinct Dither Physics:
pattern="ordered": Crisp 4×4 Bayer matrix blocks.pattern="noise": Fine-grain blue-noise stochastic pixels.pattern="halftone": Organic circular dot screen lithography.
- Three Distinct Reveal Geometries:
direction="left-to-right": Progressive horizontal sweep.direction="radial": Expands circular dither ripples directly from the pointer.direction="diagonal": 45° dynamic corner-to-corner wash.
- Maximum Text Legibility: The dither matrix lives behind the text with calibrated contrast and micro-shadows, ensuring text stays razor-sharp and effortlessly readable in every state.
- Zero-Latency Click Response: Instant micro-pulse feedback on click without delaying the native button handler.
- Full Accessibility Support: Native
<button>semantics, keyboard navigation (Tab, Enter, Space), standard focus rings, and reduced motion detection.
Installation
bunx shadcn@latest add https://jackui.com/r/dither-effect.jsonnpx shadcn@latest add https://jackui.com/r/dither-effect.jsonpnpm dlx shadcn@latest add https://jackui.com/r/dither-effect.jsonThe component will be placed in your project at:
components/jackui/buttons/dither-effect.tsxUsage
"use client";
import React from "react";
import DitherEffect from "@/components/jackui/buttons/dither-effect";
export function DitherEffectDemo() {
return (
<div className="flex min-h-[14rem] w-full flex-wrap items-center justify-center gap-4 p-8 bg-zinc-950">
{/* 1. Linear Bayer Matrix */}
<DitherEffect variant="default" pattern="ordered" direction="left-to-right">
Get Started
</DitherEffect>
{/* 2. Pointer-Anchored Radial Ripple */}
<DitherEffect variant="dark" pattern="noise" direction="radial">
Continue
</DitherEffect>
{/* 3. Halftone Dots with Arrow */}
<DitherEffect variant="outline" pattern="halftone" direction="diagonal" showArrow>
Explore
</DitherEffect>
</div>
);
}Component Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "dark" | "outline" | "default" | Button surface and border styling. |
pattern | "ordered" | "halftone" | "noise" | "ordered" | Dither matrix geometry (ordered pixels, halftone dots, or noise). |
direction | "left-to-right" | "radial" | "diagonal" | "left-to-right" | Pattern sweep geometry across the button. |
intensity | "subtle" | "medium" | "strong" | "medium" | Dither matrix contrast level. |
duration | number | 280 | Reveal duration in milliseconds. |
showArrow | boolean | false | Shows an inline interactive action chevron. |
disabled | boolean | false | Disables interaction and hover effects. |
className | string | undefined | Custom CSS classes. |
onClick | (e: MouseEvent) => void | undefined | Standard button click handler. |
Accessibility & Performance
- Reduced Motion: Automatically detects
prefers-reduced-motionand avoids animated sweeps. - Low-Overhead Canvas: When the button is not being hovered or clicked, the canvas loop completely shuts down, drawing zero frames and consuming zero idle CPU/GPU resources.
- Accessible Text: Built to WCAG standards with high-contrast text layering that maintains clarity across all hover states.
Interactive Terminal
A highly polished, self-playing developer terminal featuring smooth typewriter loops, 3D hover elevations, and dynamic console output simulations.
Ink Fill Button
A tactile interactive button with gesture-tracked radial ink expansion, pointer-reactive particle trails, shockwave bursts, and dynamic text contrast inversion.