Micro Slats
High-density architectural slats that widen and brighten in response to cursor sweeps and ambient harmonic waves—ideal for dark SaaS backdrops.
#slats#matrix#interactive#canvas
Customize
44
#A855F7
#FF9FFC
1.2
Installation
$pnpm dlx yourbrand@latest add @yourbrand/MicroSlats-TS-TWUsage (synced with live props)
<MicroSlats
slatCount={44}
color="#A855F7"
highlightColor="#FF9FFC"
reactivity={1.2}
/>Source Code
MicroSlats.tsx"use client";
import React from "react";
export interface MicroSlatsProps {
slatCount?: number;
color?: string;
highlightColor?: string;
reactivity?: number;
}
export function MicroSlats({
slatCount = 44,
color = "#A855F7",
highlightColor = "#FF9FFC",
reactivity = 1.2,
}: MicroSlatsProps) {
return (
<div
className="relative h-full w-full overflow-hidden rounded-2xl bg-[#0E0B13]"
data-slats={slatCount}
data-color={color}
data-highlight={highlightColor}
data-reactivity={reactivity}
/>
);
}
Props API
| Prop | Type | Default | Description |
|---|---|---|---|
| slatCount | number | 44 | Number of vertical slats. |
| color | string (hex) | "#A855F7" | Ambient louver color. |
| highlightColor | string (hex) | "#FF9FFC" | Hovered slat peak highlight. |
| reactivity | number | 1.2 | Width modulation strength. |