Docs
Doodle Background Effect

Doodle Background Effect

Displays a beautiful Doodle Pure CSS Background Effect.

Click Me

Installation

Copy and paste the Event Calendar code into your project.

API Reference

Props

PropTypeDescriptionDefault
widthstringContainer width"100vw"
heightstringContainer height"100vh"
shapeCountnumberNumber of shapes to generate20
blurAmountnumberBlur intensity in pixels100
colorsstring[]Array of color hex codes[Array of 20 colors]

I've created a React component called ColorfulShapes that recreates the functionality of the original CSS Doodle code using React and Tailwind CSS. The component generates random polygon shapes with vibrant colors that animate when clicked.

Features:

  1. Random Shape Generation: Creates polygon shapes with random properties including size, position, rotation, and color.
  2. Interactive: Click anywhere on the component to regenerate all shapes with new random properties.
  3. Customizable: The component accepts props to customize the width, height, number of shapes, blur amount, and color palette.
  4. Responsive: Works well on different screen sizes by using viewport units.
  5. Smooth Animations: Uses CSS keyframes for smooth color transitions and movement.

How It Works:

  • The component uses React state to manage the collection of random shapes
  • Each shape has properties like position, size, color, and animation timing
  • When clicked, the component regenerates all shapes with new random properties
  • A blur overlay is applied to create the dreamy effect seen in the original

The documentation page provides detailed information about the component's API, usage examples, and customization options.