Ali Imam

Dot Sphere

Component 97

About

Dot Sphere with props

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

Code

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

Usage.tsx

import { DotSphere } from "@/components/ui/dot-sphere";

const settings = {
  dotGap: 10,
  sphereRadius: 200,
  dotRadiusMax: 5,
  speed: 1,
  followMouse: true,
};

export default function DemoOne(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <main className="h-screen w-screen">
      <DotSphere
        dotGap={s.dotGap}
        sphereRadius={s.sphereRadius}
        dotRadiusMax={s.dotRadiusMax}
        speed={s.speed}
        bgColor="blue"
        dotColor="white"
        followMouse={s.followMouse}
      />
    </main>
  );
}

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