N
NJHTools

CSS Box Shadow Generator

Design layered box-shadow effects with live preview, then copy ready-to-use CSS or Tailwind classes. Everything runs right in your browser.

Layer 1
X offset
Y offset
Blur
Spread
Opacity
Live preview
CSS
Tailwind (arbitrary value)

Neumorphism Generator (Soft UI Shadows)

Neumorphism, also called soft UI, makes an element look as if it is pressed out of the page rather than floating above it. The trick is two shadows on one element. A dark shadow is offset toward the bottom-right, and a light shadow (often pure white) is offset the same distance toward the top-left. Light seems to fall from the top-left, so one edge catches a highlight and the other falls into shade.

The effect only works when the element and its background are the same color, usually a mid-tone grey or pastel. That is why the presets below also switch the preview surface to a matching color. To make a pressed (concave) button, tick Inset on both layers.

Accessibility caveat: soft UI has very low contrast by design. Buttons can be hard to tell apart from the background, and focus or pressed states are easy to miss. Keep text and icons at a WCAG AA contrast ratio, add a visible focus ring, and do not rely on shadow alone to show that something is clickable. Use neumorphism for cards and decorative surfaces, and use stronger styling for primary actions.

Want ready-made components? Browse neumorphism UI components (buttons, cards, form inputs, and toggles) with copyable HTML, JSX, and CSS.

How to use the CSS Box Shadow Generator

  1. Adjust the X, Y, Blur, and Spread sliders to shape the first shadow layer — negative offsets and spread are allowed.
  2. Pick a color with the swatch and set its opacity; tick Inset for an inner shadow.
  3. Click Add shadow layer to stack multiple shadows, or load a ready-made look from the Preset dropdown (Soft, Material, Neumorphism, and more).
  4. Use the Light / Dark toggle to check how the shadow reads on different backgrounds.
  5. Copy the generated CSS box-shadow rule or the Tailwind shadow-[…] class with one click.

Everything runs locally in your browser — nothing is uploaded to a server.

Frequently Asked Questions

What do the box-shadow values mean?↓

A box-shadow takes the form X-offset, Y-offset, blur-radius, spread-radius, and color. The X and Y offsets move the shadow horizontally and vertically, blur softens its edges, spread grows or shrinks the shadow, and the color (with alpha) controls its tint and transparency. Adding the inset keyword draws the shadow inside the element instead of outside.

How do I add multiple shadows to one element?↓

CSS lets you list several shadows in one box-shadow property, separated by commas. This tool lets you add as many layers as you like — the first listed shadow sits on top — which is how realistic, layered elevation effects like Material Design shadows are built.

What is the Tailwind output for?↓

Tailwind CSS supports arbitrary values using square-bracket syntax. The generator converts your shadow into a class like shadow-[0_10px_15px_-3px_rgba(0,0,0,0.25)], with spaces replaced by underscores and multiple layers separated by commas, so you can drop it straight into your markup without writing custom CSS.

What is a Neumorphism shadow?↓

Neumorphism (or soft UI) uses two opposite shadows — a light one on one side and a darker one on the other — to make an element look like it is extruded from or pressed into the background. The generator includes Neumorphism presets for both light and dark surfaces so you can start from a working example.

How do I make a neumorphism shadow in CSS?↓

Give the element the same background color as its parent (for example #e0e0e0), then add two box-shadows: a darker one offset to the bottom-right and a lighter one offset to the top-left, such as box-shadow: 12px 12px 24px #bebebe, -12px -12px 24px #ffffff;. Add the inset keyword to both for a pressed look. Click Load light neumorphism on this page to start from that exact setup.

Is neumorphism accessible?↓

Not by default. Soft UI relies on subtle, low-contrast shadows, so buttons can blend into the background and pressed or focus states are hard to see, especially for people with low vision. Keep text and icons at WCAG AA contrast, add a clear focus ring, and don't use shadow as the only sign that something is clickable.

Why doesn't my neumorphism effect look right?↓

Most often the element's background doesn't match its container. The illusion needs both to be the same color, usually a mid-tone grey or pastel rather than pure white or black, so the light shadow has room to show. Keep both shadows the same distance and blur, just in opposite directions.

Is this box shadow generator free and private?↓

Yes. The CSS Box Shadow Generator is completely free with no signup required, and it runs 100% locally in your browser. Nothing you create is uploaded to or stored on any server.

Last updated: