Set the theme via the YouVersionProvider's theme prop. Defaults to 'light'.
Code
import { useState } from "react";import { YouVersionProvider, BibleCard } from "@youversion/platform-react-ui";function App() { const [theme, setTheme] = useState<"light" | "dark">("light"); return ( <YouVersionProvider appKey="YOUR_APP_KEY" theme={theme}> {/* SDK components will automatically use the correct theme */} <BibleCard reference="JHN.3.16" versionId={3034} /> </YouVersionProvider> );}
Theme Options
Value
Behavior
'light'
Light mode (default)
'dark'
Dark mode
'system'
Follows OS preference via prefers-color-scheme, updates live when the user changes their OS setting
Following OS Theme
Pass theme="system" to automatically match the user's OS light/dark setting. The SDK listens for changes in real time — no page reload needed.
Code
<YouVersionProvider appKey="YOUR_APP_KEY" theme="system"> {/* YouVersion React components will switch between light/dark based on OS preference */}</YouVersionProvider>