React Native Shadow Generator screenshot

React Native Shadow Generator

Turn x, y, blur, spread, colour and opacity into a React Native shadow, with the right keys for iOS, Android or both. Copy a StyleSheet.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What the React Native shadow generator does

React Native has no box-shadow. On iOS you set shadowColor, shadowOffset, shadowRadius and shadowOpacity on the view; on Android the platform draws a shadow from elevation instead, and shadowColor only colours it from Android 9. This generator writes the right keys for the platform you pick, splits your opacity into a 0 to 1 shadowOpacity, and turns the colour into a hex string because React Native accepts hex everywhere. Spread does not exist on either platform, so half of it widens the iOS blur and all of it raises the elevation. Elevation is a single depth value, so a large soft blur cannot be reproduced on Android.

How to use it

The React Native Shadow Generator page needs no pasted input: set Offset x (px), default "0", Offset y (px), default "4", Blur radius (px), default "12", Spread (px), default "0", Shadow colour (default "#000000"), Opacity (per cent), default "25" and Platform (default "both"), then press Run to build a new React Native style.

Worked example

Input:


Output:

import { StyleSheet } from 'react-native';

// shadowColor, shadowOffset, shadowRadius and shadowOpacity apply to iOS
// (shadowColor also on Android 9+). elevation applies to Android only.
// `spread` has no React Native property: half of it is folded into
// shadowRadius and the whole of it into elevation.
const styles = StyleSheet.create({
  card: {
    shadowColor: '#000000',
    shadowOffset: { width: 0, height: 4 },
    shadowRadius: 12,
    shadowOpacity: 0.25,
    elevation: 6,
  },
});

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

React Native has no box-shadow. On iOS you set shadowColor, shadowOffset, shadowRadius and shadowOpacity on the view; on Android the platform draws a shadow from elevation instead, and shadowColor only colours it from Android 9. This generator writes the right keys for the platform you pick, splits your opacity into a 0 to 1 shadowOpacity, and turns the colour into a hex string because React Native accepts hex everywhere. Spread does not exist on either platform, so half of it widens the iOS blur and all of it raises the elevation. Elevation is a single depth value, so a large soft blur cannot be reproduced on Android.

Turn x, y, blur, spread, colour and opacity into a React Native shadow, with the right keys for iOS, Android or both. Copy a StyleSheet.

How to use it

The React Native Shadow Generator page needs no pasted input: set Offset x (px), default "0", Offset y (px), default "4", Blur radius (px), default "12", Spread (px), default "0", Shadow colour (default "#000000"), Opacity (per cent), default "25" and Platform (default "both"), then press Run to build a new React Native style.

Why it runs in your browser

The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

What to Expect

What this tool keeps

  • The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.

Sample output

import { StyleSheet } from 'react-native'; // shadowColor, shadowOffset, shadowRadius and shadowOpacity apply to iOS // (shadowColor also on Android 9+). elevation applies to Android only. // `spread` has no React Native property: half of it is folded into // shadowRadius and the whole of it into elevation. const styles = StyleSheet.create({ card: { shadowColor: '#000000', shadowOffset: { width: 0, height: 4 }, shadowRadius: 12, shadowOpacity: 0.25, elevation: 6, }, });

Frequently asked questions

How do I use the react native shadow generator?

The React Native Shadow Generator page needs no pasted input: set Offset x (px), default "0", Offset y (px), default "4", Blur radius (px), default "12", Spread (px), default "0", Shadow colour (default "#000000"), Opacity (per cent), default "25" and Platform (default "both"), then press Run to build a new React Native style.

Is my input uploaded?

Nothing is uploaded. The result is produced on this page.

Is there a size limit?

No: nothing is pasted, so there is no input size to exceed.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.