Shadow Controls
Preview Settings
Live Preview
Generated Code
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.15);
Create beautiful CSS box shadows with live preview and multiple layers
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.15);
Professional CSS box shadow generator with live preview, multiple layers, and Material Design presets. Generate CSS, SCSS, and Tailwind code instantly. Create neumorphic, inset, and multi-layered shadows with ease. No signup required.
Blur radius controls how soft or diffused the shadow edges appear - higher blur values create softer, more gradual shadows while lower values create sharper shadows. Spread radius expands (positive values) or contracts (negative values) the shadow size before the blur is applied. Think of spread as making the shadow bigger or smaller, and blur as making it softer or harder. For example, a spread of 10px makes the shadow 10px larger in all directions before blurring begins.
Inset shadows create an inner shadow effect that makes elements appear recessed or pressed into the page, perfect for creating depth in the opposite direction. Use inset shadows for input fields to show they're clickable areas, pressed button states to indicate interaction, sunken panels for visual hierarchy, or neumorphic soft UI designs. Outer shadows (default) make elements appear elevated above the surface, while inset shadows make them appear below the surface level.
Material Design uses layered shadows with different blur and opacity values to simulate realistic lighting. Our Material Design presets follow Google's official elevation guidelines with combinations of sharp umbra shadows (small blur, higher opacity) and soft penumbra shadows (large blur, lower opacity). You can also manually create Material shadows by combining two layers: first layer with small Y offset and blur using rgba(0,0,0,0.2), second layer with larger Y offset and blur using rgba(0,0,0,0.14). The key is using multiple subtle shadows rather than one strong shadow.
Yes, CSS supports unlimited box shadow layers separated by commas in the code. Multiple layers stack on top of each other with the first layer appearing on top and subsequent layers below. Use our layer system to create complex effects like glowing borders (combine colored shadows), realistic depth (layer soft and sharp shadows), or neumorphic designs (combine light and dark shadows). Each layer has completely independent controls for offset, blur, spread, color, and inset properties, giving you total creative freedom.
Neumorphism (also called Soft UI) creates a subtle extruded plastic or embossed effect using two opposing shadows: a light shadow on one side and a dark shadow on the opposite side. Our neumorphic presets demonstrate this technique perfectly. To create manually, use two shadow layers - first with positive X/Y offsets using a dark color like rgba(0,0,0,0.15), second with negative X/Y offsets using a light color like rgba(255,255,255,0.7). This works best when element background matches the page background for seamless integration.
Instead of traditional black or gray shadows, use your brand or accent colors with reduced opacity (typically 20-40%) for unique modern effects. For example, a blue button could use rgba(59,130,246,0.3) for a subtle blue glow that reinforces brand identity. Colored shadows work best with moderate blur (8-20px) and minimal or zero spread. Avoid using fully opaque colors as they look unrealistic - always include transparency. Layer multiple colored shadows for rainbow or gradient glow effects popular in modern UI design.
Card shadows should provide subtle elevation without overwhelming the content or competing for attention. A professional card shadow uses Y offset of 2-4px, blur radius of 8-12px, spread of 0px, and color of rgba(0,0,0,0.08-0.15). Our Subtle Shadows category includes perfect card presets like Card and Hover states. Avoid harsh shadows with high opacity or excessive blur that make cards look disconnected from the page. The goal is gentle elevation that adds depth without distraction.
Negative X offset values move shadows to the left while positive values move right. Negative Y offset values move shadows upward while positive values move downward. This is crucial for controlling light direction and creating realistic lighting effects. For example, X: -5px, Y: -5px creates a shadow in the top-left corner, simulating light from bottom-right. Combine negative and positive offsets on multiple layers to create complex directional lighting or wrap-around shadow effects for maximum realism and depth.
Yes, box shadows can be animated using CSS transitions or keyframe animations, but use caution as animating blur or spread is GPU-intensive and can cause performance issues, especially on mobile devices. For smooth animations, transition between pre-defined shadow states on hover or focus events rather than continuously animating shadow properties. Consider using transform and opacity animations instead when possible. Our generator helps you create the perfect start and end states for your shadow transitions without performance concerns.
Use our code generation feature to copy shadows in multiple formats: pure CSS for direct stylesheet use, SCSS format for variables and mixins, Tailwind arbitrary values for utility-first workflows, or JavaScript object format for styled-components and CSS-in-JS solutions. Simply adjust your shadow to perfection, select your preferred code format (CSS, SCSS, Tailwind, or JS), and click the Copy button. The code is instantly copied to your clipboard ready for pasting into your project with zero manual formatting needed.