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-TW
Usage (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

PropTypeDefaultDescription
slatCountnumber44Number of vertical slats.
colorstring (hex)"#A855F7"Ambient louver color.
highlightColorstring (hex)"#FF9FFC"Hovered slat peak highlight.
reactivitynumber1.2Width modulation strength.