Skip to content

    Browse components

    Tilt Blocks

    A field of 3D cubes that tilt toward the cursor and flip in a glowing ripple when clicked.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/tilt-blocks

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/tilt-blocks.json

    Usage

    import { TiltBlocks } from "@/components/ui/tilt-blocks";
    
    <TiltBlocks grid={8} className="w-96" />

    Props

    PropTypeDefaultDescription
    gridnumber8Cubes per row and column.
    maxAnglenumber45Max tilt in degrees.
    radiusnumber3Radius of the cursor's influence, in cells.
    gapnumber8Gap between cubes in px.
    rippleColorstring"#c6ff3d"Color the cubes flash as a ripple passes.
    rippleSpeednumber1Ripple travel speed multiplier.
    autoAnimatebooleantrueWander and ripple on their own while the pointer is away.
    classNamestring—Extra classes for the root element.