Box Shadow Generator
box-shadow: 4px 4px 16px 0px rgba(0, 0, 0, 0.20);shadow-[4px_4px_16px_0px_rgba(0,0,0,0.20)]Multi-Layer
Stack up to 5 shadow layers for complex effects.
Live Preview
See changes instantly on a customizable canvas.
CSS & Tailwind
Copy ready-to-use CSS or Tailwind output.
Client-side
All processing in your browser. No data uploaded.
เกี่ยวกับ Box Shadow Generator
CSS Box Shadow Generator gives you a visual, real-time editor for crafting the perfect box-shadow CSS property without writing a single line of code by hand. Box shadows are one of the most powerful CSS effects — they add depth, elevate interactive elements, create glowing accents, and can even simulate borders or inset indentations. This tool supports up to five simultaneous shadow layers, letting you compose sophisticated multi-shadow effects like the popular "layered" technique (multiple soft shadows at increasing distances) that produces a more realistic depth effect than a single shadow can achieve. For each layer you can independently control the horizontal offset, vertical offset, blur radius, spread radius, color, opacity, and whether the shadow is inset or outset. Built-in presets cover the most common use cases from a subtle lift to a vibrant colored glow. Copy the output as a plain CSS rule or a Tailwind CSS arbitrary value class.
วิธีใช้ Box Shadow Generator
- Use the sliders to adjust the Horizontal Offset, Vertical Offset, Blur Radius, Spread Radius, and Opacity for the active shadow layer.
- Click the Color picker to choose the shadow color, and toggle the "Inset" checkbox to switch between outset and inset shadows.
- Click "+" to add a second shadow layer (up to 5) for multi-layer effects.
- Try one of the built-in presets (Subtle, Medium, Heavy, Colored, Inset, Sharp, Layered, Glow) as a starting point.
- Use the preview panel on the right to evaluate the shadow. Customize the background color, box color, and border radius.
- Click "Copy CSS" to copy the box-shadow CSS rule, or "Copy Tailwind" to copy the equivalent Tailwind arbitrary-value class.
คำถามที่พบบ่อย
What does the Spread Radius control?
Spread radius expands or contracts the shadow before blurring. A positive value makes the shadow larger than the element; a negative value shrinks it, useful for creating a "lifted card" effect.
What is an inset shadow?
Adding the inset keyword moves the shadow inside the element's border rather than outside. This creates a pressed-in or embossed appearance, commonly used for form inputs.
How do I create a glowing effect?
Use the Glow preset, or manually set Horizontal and Vertical Offsets to 0, increase the Blur Radius (e.g. 24px), add a positive Spread (e.g. 4px), pick a vivid color, and raise the Opacity.
What is the Tailwind output format?
The Tailwind output is an arbitrary-value shadow class using Tailwind's square-bracket syntax, e.g. shadow-[0_4px_12px_0_rgba(0,0,0,0.18)]. It requires Tailwind CSS v3+.
Can I use more than 5 shadow layers?
The tool supports up to 5 layers. For even more complex effects, manually combine additional box-shadow values in your CSS after copying the base output from this tool.