Home > other >  why outline css property not working in react-native?
why outline css property not working in react-native?

Time:05-27

I can not see outline border and colour in native version of the application , meanwhile it works okay with web application,

            backgroundColor: '#065B61',
            marginRight: -20,
            shadowColor: "black",
            shadowOffset: { width: 0, height: 2 },
            shadowOpacity: 1,
            shadowRadius: 4.00,
            elevation: 24,
            marginBottom: 15,
            outlineWidth: 10,
            outlineStyle: "auto",
            outlineColor: 'white',
        }
    }

CodePudding user response:

Not all css properties are supported in React Native. They might work on web but non on native devices. List of supported View style props. You can see there are no outline props. The solution is to use border props, borderWidth, borderStyle & borderColor -

borderColor: 'black',
borderStyle: 'solid',
borderWidth: 3
  • Related