Skip to content

    Browse components

    Pixel Shock

    A dithered field of tiny pixels that breathes with noise and bursts into shockwave rings on click. WebGL.

    Pixel Shock

    Open
    Customize

    square
    circle

    Installation

    npx shadcn@latest add @glint-ui/pixel-shock

    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/pixel-shock.json

    Usage

    import { PixelShock } from "@/components/ui/pixel-shock";
    
    <div className="relative h-96">
      <PixelShock color="#a78bfa" shape="square" />
    </div>

    Props

    PropTypeDefaultDescription
    colorstring"#a78bfa"Pixel color.
    shape"square" | "circle""square"Pixel shape.
    pixelSizenumber6Cell size in px.
    densitynumber0.5How much of the field is lit.
    speednumber1Animation speed multiplier.
    interactivebooleantrueBlast rings on click.
    autoBlastbooleantrueFire a blast at a random spot every few seconds.
    classNamestring—Extra classes for the root element.