Install the packages with your preferred package manager:
You don't need to install both packages, the platform-react-hooks will get installed with the platform-react-ui as it is a dependency.
npm install @youversion/platform-react-ui
Requirements
React 19.1.0 or higher
react-dom 19.1.0 or higher
Providers
YouVersionProvider
Required provider that configures the YouVersion Platform SDK. Wrap all your code which accesses YouVersion Platform features with YouVersionProvider. Authentication is optional and can be enabled with the includeAuth prop. If you set includeAuth={true} you must provide an authRedirectUrl.
Your authRedirectUrl must be in your Callback URI list in your app settings.
The YouVersionProvider uses conditional props for TypeScript safety:
Code
// Base propsinterface YouVersionProviderPropsBase { children: ReactNode; appKey: string; apiHost?: string; theme?: "light" | "dark" | "system"; /** SDK UI locale. Defaults to the browser's detected UI language. */ locale?: string; /** Interface direction override. Defaults to the direction for the UI locale. */ direction?: "ltr" | "rtl"; permittedLanguageTags?: string[]; permittedVersionIds?: number[]; excludedVersionIds?: number[];}// With authentication (authRedirectUrl becomes required when includeAuth is true)interface YouVersionProviderPropsWithAuth extends YouVersionProviderPropsBase { authRedirectUrl: string; includeAuth: true;}// Without authentication (authRedirectUrl cannot be used when includeAuth is false)interface YouVersionProviderPropsWithoutAuth extends YouVersionProviderPropsBase { includeAuth?: false; authRedirectUrl?: never;}// Final type is a union of the two configurationstype YouVersionProviderProps = | YouVersionProviderPropsWithAuth | YouVersionProviderPropsWithoutAuth;
Interface direction and Scripture direction are independent. See Text direction for automatic behavior and explicit overrides.
Limit which Bible versions the SDK uses
By default, the SDK offers Bible versions in every available language. To limit that catalog, pass permittedLanguageTags, permittedVersionIds, or excludedVersionIds on YouVersionProvider. These lists are the version filter, and they exist only on the provider.
Code
<YouVersionProvider appKey="YOUR_APP_KEY" permittedLanguageTags={["en"]}> {/* Your app */}</YouVersionProvider>
Language tags follow BCP 47, such as "en" for English or "es" for Spanish.
You can also limit the catalog to specific Bible versions with permittedVersionIds:
Code
<YouVersionProvider appKey="YOUR_APP_KEY" permittedVersionIds={[111, 3034]}> {/* Your app */}</YouVersionProvider>
Version IDs are YouVersion Bible version IDs. Search for them in the Bibles directory. You can pass both permittedVersionIds and permittedLanguageTags. A version must match both lists to be used.
To exclude specific versions and leave every other available version usable, pass excludedVersionIds:
Code
<YouVersionProvider appKey="YOUR_APP_KEY" excludedVersionIds={[123, 456]}> {/* Your app */}</YouVersionProvider>
If you omit a permit list, that list applies no restriction. An empty permit list ([]) permits nothing. If a version is both permitted and excluded, exclusion wins.
The version filter applies to the version picker, recents, the reader, cards, text, Verse of the Day, and any versionId you pass. The SDK does not substitute another version, including 3034. Recents that fail the filter stay hidden until you change the filter. The SDK does not delete them.
Components
The UI package includes fully styled, production-ready components for common Bible integration patterns.
BibleCard, BibleTextView, BibleReader.Root, and VerseOfTheDay accept scriptureDirection to override the direction of Bible content. Omit it to use passage direction, with browser detection as the fallback. See Text direction.
BibleCard
Pre-styled widget displaying a Bible passage with reference, text, and attribution.
Code
import { BibleCard } from "@youversion/platform-react-ui";export default function Page() { return ( <BibleCard reference="JHN.3.16" versionId={3034} background="light" /> );}
Types
type BibleCardProps = { /** Scripture direction override. Omit for automatic direction. */ scriptureDirection?: "ltr" | "rtl"; /** USFM passage reference (e.g., "JHN.3.16") */ reference: string; /** Bible version identifier */ versionId: number; /** Theme variant: light or dark */ background?: "light" | "dark"; /** Show version picker (default: false) */ showVersionPicker?: boolean; /** Max BibleCard width in CSS px, or `"100%"` to expand to the full width of the parent container (defaults to 700) */ maxWidth?: number | "100%";};
BibleTextView
Display any Bible passage with proper formatting.
Important: When using the BibleTextView component, you are responsible for
displaying any required Bible version copyright notice, as required by the license.
This component gives you full flexibility over layout, so be sure to add copyright
or attribution credits yourself where appropriate in your UI. If you want these credits handled for you automatically, use the BibleCard component instead.
Scopes: To access the user's name and email after sign-in, you must include the profile and email scopes. Without these scopes, those fields will be undefined.
Redirect URL: Set the OAuth callback URL via authRedirectUrl on YouVersionProvider. The button does not accept a redirectUrl prop. See the legacy auth migration guide if you are upgrading from an earlier version.