My expo app are using automatically color theme but I want to set the default color to light.
I’ve tried to change the userInterfaceStyle on app.json to light but not work, the app is still using automatically.
My expo version is 43.0.2
My expo app are using automatically color theme but I want to set the default color to light.
I’ve tried to change the userInterfaceStyle on app.json to light but not work, the app is still using automatically.
My expo version is 43.0.2
provide more information please. eg: are you talking about expo go? or a standalone app built with eas build? or expo build
? what platform – ios or android?
I confess that i’m not sure.
I used those commands:
npm install --global expo-cli
expo init my-project
then you opened it in expo go? show a screenshot of what you see and explain what you expect to see
I want to see my app with light theme only, but he’s getting theme according to computer/mobile theme.
Example: my MS Windows is using dark theme, and when I open my app with npm start, he get my windows theme and render everything in dark.
Edit: In docs, they said to change userInterfaceStyle to my preference, but isn’t working.
are you running your app in a web browser? on your iphone? on android phone? sorry unless you can provide basic info it’s very hard to help
Sorry, but I’m a newbie. I used the Expo a long time ago and it worked differently.
I’m testing my app in the browser.
userInterfaceStyle
is only supported on ios and android
If I set this property to light, even my ios or android is using dark theme, my app will work in light theme?
I readed.
Are saying:
The available options are: automatic
(follow system appearance settings and notify about any change user makes), light
(restrict app to support light theme only), and dark
(restrict app to support dark theme only). If this key is absent, the app will default to the light
style.
I change this property to light, but app still using automatically color.
it’s not supported on web. the properties behave as described on ios and android
So how can I develop my app on web using light theme? This is my question.
I use browser to see how my app it’s getting and I will not use dark theme even on Android/iOS.
Browser:
go to useColorScheme.ts and make it always return light on web
Thank you!!! Was difficult but we made it.
I changed the return of useColorScheme.ts to ‘light’ and worked fine.
Like I said, i’m newbie with .ts and this version of Expo.
Sorry for inconvenience.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.