![](/style/images/good.png)
3
![](/style/images/bad.png)
PlatformColor for react-native-web
source link: https://reactnativeexample.com/platformcolor-for-react-native-web/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PlatformColor for react-native-web
Mar 09, 2022
1 min read
React Native PlatformColor
A PlatformColor
shim for react-native-web (Did not implement PlatformColor
yet).
If Platform.OS is not web, use native PlatformColor
instead.
import { PlatformColor } from 'react-native-platform-color' // in light mode const systemBackground = PlatformColor('systemBackground') // `rgba(255,255,255, 1) ` // in dark mode const systemBackground = PlatformColor('systemBackground') // `rgba(0,0,0, 1) `
GitHub
Previous Post
Animations examples in React Native
Next Post
A Switch shim for react-native-web
You might also like...
Awesome Palette Generator Color Using React Native
10 October 2021
Create smooth gradients in React Native.
01 May 2021
Using colors from the underlying platform primitives is powerful, but maintaining it when targeting multiple platforms is quite cumbersome.
17 March 2021
Subscribe to React Native Example for Android and iOS
Get the latest posts delivered right to your inbox
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK