Developer

React Native Shadow Generator

Details

How to use React Native Shadow Generator

What the tool does, how to run it, and what to expect from the result.

How to generate a React Native shadow

Set the shadow color, offset, opacity, and radius for iOS with the sliders, and set the elevation for Android. The preview shows a CSS approximation of how iOS will render it.

The output is a StyleSheet.create block containing both sets of properties. Paste it in as-is: iOS reads the four shadow props and ignores elevation, Android reads elevation and ignores the rest.

  • Pick the shadow color (iOS only, Android ignores it).
  • Set offset X and Y; a positive Y pushes the shadow down.
  • Set the opacity and blur radius.
  • Set the Android elevation (1 to 2 for a card, 6 to 8 for a floating element, 16 to 24 for a modal).
  • Copy the StyleSheet object, and give the view a solid backgroundColor or the iOS shadow will not render.
Tips

Getting a better result out of React Native Shadow Generator

Specific settings and thresholds, not general advice.

  • The output carries both the iOS properties (shadowColor, shadowOffset, shadowOpacity, shadowRadius) and the Android one (elevation), because the two platforms implement shadows completely differently and neither reads the other's props.
  • On Android, elevation is the only thing that matters, and it also raises the view in the z-order. A view with elevation 6 draws above a sibling with elevation 2 regardless of the order they appear in the tree, which catches people out.
  • On iOS, shadowOffset with a positive height pushes the shadow downward, which is what a light source above the interface produces. The default here (0, 4) is the standard downward card shadow.
  • iOS shadows do not respect overflow: hidden. If a view has a border radius and clips its children, the shadow can be clipped too. The standard fix is an outer view carrying the shadow wrapping an inner view carrying the borderRadius and the clipping.
  • Android elevation caps at 24 in Material's spec, which is the range this tool exposes. Elevation 1 to 2 is a resting card, 6 to 8 is a raised or floating element, 16 to 24 is a modal or navigation drawer.
Limits

What React Native Shadow Generator does not do

The honest boundary, so you do not lose time finding it yourself.

  • One shadow. React Native has no equivalent of a multi-layered CSS box-shadow, and this does not fake one.
  • No inner shadow. Neither platform supports it natively.
  • Elevation on Android ignores your shadow color, offset, and radius entirely: it draws a system shadow whose look you cannot control from these props.
  • The preview is a web boxShadow approximation of the iOS rendering, not a device screenshot.
At a glance

Who React Native Shadow Generator is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

React Native developers styling shadows.

Ideal for

Using the react native shadow generator without installing anything or signing up.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Why does the output include both shadow props and elevation?

Because they are two entirely separate implementations. iOS reads shadowColor, shadowOffset, shadowOpacity, and shadowRadius and ignores elevation. Android reads elevation and ignores all four shadow props. Shipping both in one style object is the standard React Native pattern, and it is why the two platforms rarely look identical.

Why does my Android shadow ignore the color I picked?

Because elevation draws a system-defined shadow. Android does not let you set the shadow's color, offset, or blur through the elevation prop; it decides those from the elevation value and the platform theme. If you need a colored shadow on Android, you have to fake it, usually with a gradient view or a nine-patch background.

My iOS shadow disappeared. What happened?

Almost always overflow: hidden, or a backgroundColor of transparent. iOS draws the shadow from the view's opaque backing, so a view with no background color has no shape to cast a shadow from, and a clipping parent will crop the shadow away. Wrap the clipped view in an outer view that carries the shadow and a solid backgroundColor.

What elevation should I use for a card?

Material Design puts a resting card at elevation 1 to 2, a raised or hovered card at 8, a floating action button at 6, and a modal or drawer at 16 to 24. Going above 8 for a card makes it look like it is floating off the page rather than sitting on it.

Does the preview match a real device?

Approximately. The preview uses a CSS box-shadow, which is close to how iOS renders shadowOffset, shadowRadius, and shadowOpacity but not identical (iOS blurs differently and applies the radius to the shadow's path). Android will look different again, because it draws its own system shadow. Always check on both devices.

Can I do a multi-layer shadow like in CSS?

No. CSS allows a comma-separated list of box-shadows, and designers routinely stack two or three to get a realistic falloff. React Native supports exactly one shadow per view. The usual workaround is nesting views, each with its own shadow, which costs you a layer of the tree.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon