Skip to content
Effects Fancy Stable

InteractiveGridPattern

.md

SVG grid of squares that highlight on hover with smooth fade transitions

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { InteractiveGridPattern } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
  import { InteractiveGridPattern } from 'fancy-ui-svelte';
</script>

<InteractiveGridPattern width={60} height={60} />

Examples

Basic Usage

Colored Variant

Custom hover color.

Static Graph Paper

Non-interactive grid with no per-rect listeners, for hard-edge art directions.

Props

PropTypeDefaultDescription
squaresClassName string-Additional CSS classes for individual squares
strokeClassName string"stroke-gray-400/30"Additional CSS classes controlling the square outline color
width number40Width of each square in pixels
height number40Height of each square in pixels
squares [number, number][24, 24]Grid dimensions as [columns, rows]
interactive booleantrueWhether squares respond to hover; when false, renders a static graph-paper grid with no per-rect listeners