Skip to content

theme/colors coherence between spectrum implementations #1863

Discussion options

You must be logged in to vote

I think you're asking how you can use darkTheme. In order to use the darkTheme, you would change this line in your application
import {defaultTheme} from '@adobe/react-spectrum';
to
import {darkTheme} from '@adobe/react-spectrum';

If you need to lock it so that only the 'darkest' is being used. You can also supply colorScheme="dark" to your Provider. This will stop it from picking up OS settings and changing to the 'dark' theme. You will always be in 'darkest' because darkTheme maps to OS settings like this 'OS Light -> theme dark', 'OS Dark -> theme darkest'.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alexandremottet
Comment options

Answer selected by alexandremottet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants