Components
Dot Matrix Display
A retro dot matrix display component with animated scrolling text, customizable colors, and authentic LED-style visual effects.
Installation
Loading installation instructions...
Usage
import { DotMatrixDisplay } from "@/components/pluto-ui/dot-matrix-display"<DotMatrixDisplay text="You can get it all here" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | ReactNode | - | The text or content to display |
className | string | - | Additional CSS classes |
size | number | 4 | Size of each dot in pixels |
hue | number | 30 | Hue value for the color (0-360) |
bgLightness | number | 0.5 | Background lightness (0-1) |
blur | number | 1 | Blur amount for the dot effect |
duration | number | 10 | Animation duration in seconds |
width | string | number | 400 | Width of the display (px or CSS value) |
fontSize | string | number | 100 | Font size (px or CSS value) |
Examples
Basic Usage
Custom Colors and Size
<DotMatrixDisplay
text="Custom Display"
hue={200}
size={6}
fontSize={120}
/>Custom Animation Speed
<DotMatrixDisplay
text="Faster Animation"
duration={5}
/>Features
- Retro LED Effect: Authentic dot matrix display appearance using CSS masks and filters
- Animated Scrolling: Smooth infinite scrolling text animation
- Customizable Colors: Adjust hue, background lightness, and blur effects
- Responsive: Adapts to different container sizes
- Type-safe: Full TypeScript support
- Pure CSS: No JavaScript required for animations
Styling
The component uses CSS custom properties for easy customization:
--size: Size of each dot in pixels (default: 4px)--hue: Hue value for the color (default: 30)--bg-lightness: Background lightness (default: 0.5)--blur: Blur amount (default: 1)--duration: Animation duration in seconds (default: 10)
You can override these by passing props or using CSS variables.
Notes
- The component uses the 'Teko' font family - ensure it's loaded in your project
- The dot matrix effect is created using CSS
maskandradial-gradient - The scrolling animation uses CSS
translatetransform for smooth performance - The component uses
oklchcolor space for vibrant, perceptually uniform colors - Multiple filter effects are applied to create the authentic LED appearance
- The text is duplicated internally to create seamless infinite scrolling