Ali Imam

Dot Pattern

Backgrounds 456

About

A background dot pattern made with SVGs, fully customizable using Tailwind CSS. _______________ Comment by 21st.dev - this is version of MagicUI's Dot Pattern https://21st.dev/magicui/dot-pattern

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Dot Pattern to your project and fits it to your theme.

Code

How Dot Pattern is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import {DotPattern} from "@/components/ui/dot-pattern";

import { cn } from "@/lib/utils";

function DotPatternDemo() {
  return (
    <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">
      <p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">
        Dot Pattern
      </p>
      <DotPattern
        cy={1}
        cr={1}
        cx={1}
        className={cn(
          "[mask-image:radial-gradient(400px_circle_at_center,white,transparent)]",
        )}
      />
    </div>
  );
}

export {DotPatternDemo}

More by Ali Imam

View all
  • Liquid Glass Button

    Liquid Glass Button

    6.7K
  • Shader Animation

    Shader Animation

    3.7K
  • WebGL Shader

    WebGL Shader

    2.6K
  • Shader Lines

    Shader Lines

    2.3K
  • Shiny Button

    Shiny Button

    2.2K
  • GLSL Hills

    GLSL Hills

    2.1K
  • Canvas

    Canvas

    1.8K
  • Glowing Shadow

    Glowing Shadow

    1.5K

More in Backgrounds

View all
  • Elegant Dark Pattern

    Elegant Dark Pattern

    811
  • Gradient Backgrounds

    Gradient Backgrounds

    25
  • Jade Sky

    Jade Sky

    85
  • Light theme Tailwind CSS Background Snippet

    Light theme Tailwind CSS Background Snippet

    221
  • Gradient Blur Bg

    Gradient Blur Bg

    34
  • Background snippets

    Background snippets

    16
  • Background Components

    Background Components

    233
  • LivingOrigami bg

    LivingOrigami bg

    134