Skip to content

    Browse components

    Swirl

    A psychedelic paint swirl in two bold colors outlined with ink, with an optional chunky-pixel mode. WebGL.

    Swirl

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/swirl

    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/swirl.json

    Usage

    import { Swirl } from "@/components/ui/swirl";
    
    <div className="relative h-96">
      <Swirl pixelated pixelSize={5} />
    </div>

    Props

    PropTypeDefaultDescription
    color1string"#ff4b3e"First paint color.
    color2string"#1f7ae0"Second paint color.
    color3string"#0f1a24"Ink color outlining the swirls.
    speednumber1Flow speed multiplier.
    scalenumber1Zoom; higher means larger swirls.
    twistnumber1Spiral twist around the center.
    pixelatedbooleanfalseRender in chunky pixels.
    pixelSizenumber5Pixel size in px when pixelated.
    classNamestring—Extra classes for the root element.