React Native Elevation shadow does not work properly

I am new to React Native, I tried to create a component for my radio button but I encountered some issue with the Style when I added the elevation, and it is adding the shadow inside the View instead of outside of the View

Here is my code

import {Text, View, StyleSheet} from 'react-native';
import {RadioButton} from 'react-native-paper';
import {
} from "react-native-gesture-handler";

function Chosen({values, onChange, defaultIndex, selectedIndexAtt, renderComponent}){
    const [index, setIndex] = useState(defaultIndex ? defaultIndex : 0);

    const getRadioStatus = (itemIndex) => {
        return index == itemIndex ? 'checked' : 'unchecked';

    const handleRadioPress = (itemIndex) => {

        <ScrollView style={styles.container}>
            <View style={styles.containerRow}>
                {, index)=> {
                    return (<View style={styles.itemContainer}>
                        <View style={styles.item}>
                            <View style={styles.radioButton}>
                                <RadioButton value={item[selectedIndexAtt ? selectedIndexAtt : index]} 
                                    status={getRadioStatus(item[selectedIndexAtt ? selectedIndexAtt : index])}
                                    onPress={() => {
                                        handleRadioPress(item[selectedIndexAtt ? selectedIndexAtt : index])

const styles = StyleSheet.create({
        flexDirection: 'column',
        flex: 1
        flexDirection: 'row',
        flexWrap: 'wrap',
    itemContainer: {
        width: "50%",
        padding: 1
    item: {
        flexDirection: 'row',
        margin: 10,
        borderWidth: 1,
        borderColor: 'rgba(105,105,105,0.6)',
        borderRadius: 15,
        elevation: 0.1
    radioButton: {
        justifyContent: 'center',
        flex: 1,
        alignItems: 'flex-end'

export default Chosen;

and here is how I call it from the parent

<Chosen values={dummyData} defaultIndex={dummyData[0].id} selectedIndexAtt='id' renderComponent={(item) => {
                    return (
                }} onChange={onChange}></Chosen>

and the result is this:

elevation shadow issue

Can someone please help me with this?

83 thoughts on “React Native Elevation shadow does not work properly”

  1. 386175 365244Even though youre any with the lucky enough choices, it comes evidently, even though capture the fancy of the particular coveted by ly folks other valuable you you meet may possibly effectively have hard times this specific dilemma. pre owned awnings 429282


Leave a Comment