prefers-color-scheme
CSS media feature in your website to indicate their light/dark preference. You can simply query this media feature to determine if your user prefers light or dark mode.
Below is a sample React hook to determine if your user prefers light or dark mode; feel free to use this directly in your app!
appearance
configuration object for both light and dark mode. You can use the default Privy light and dark themes, e.g.:
lightModeConfig
and darkModeConfig
objects (with custom theme
s and accentColor
s) to match the modal’s light and dark modes with your app’s branding.
PrivyProvider
, conditionally pass in the lightModeConfig
(your light mode configuration object) or darkModeConfig
(your dark mode configuration object) depending on the user’s system preferences from step 1.