BibleReader is a compound component that provides a complete Bible reading experience with chapter navigation, version selection, font customization, and optional user authentication.
Basic Usage
Component Structure
BibleReader is a compound component with three parts:BibleReader.Root- Container that manages stateBibleReader.Content- Displays the Bible textBibleReader.Toolbar- Navigation and settings controls
Root Props
Controlled book ID (e.g., “JHN”, “GEN”).
Default book ID for uncontrolled mode.Default:
"JHN"Callback when book changes.
Controlled chapter ID (e.g., “1”, “2”).
Default chapter ID for uncontrolled mode.Default:
"1"Callback when chapter changes.
Controlled version ID.
Default version ID for uncontrolled mode.Default:
3034 (Berean Standard Bible)Callback when version changes.
Font family for Bible text. Options: “Inter”, “Source Serif”, or custom font family.Default:
"Source Serif"Font size in pixels. Must be between 12 and 20.Default:
16Line height multiplier.Default:
undefinedWhether to show verse numbers.Default:
trueTheme override.Default: Inherits from provider
Toolbar Props
Position of the toolbar border.Default:
"top"Examples
Uncontrolled (Default)
The component manages its own state:Controlled Mode
You manage the state:Custom Styling
Dark Theme
Without Authentication
SetauthEnabled={false} on the provider to hide the user menu:
Features
Navigation
- Previous/Next chapter buttons
- Chapter picker with searchable book list
- Version picker with language filtering
Reader Settings
- Font size adjustment (12-20px)
- Font family selection (Inter, Source Serif)
- Settings persist to localStorage
User Authentication
WhenauthEnabled={true} on the provider:
- User menu displays avatar or person icon
- Sign in/out functionality
- Integrates with YouVersion OAuth
Responsive Design
- Mobile-friendly layout
- Touch-optimized controls
- Scrollable content area
Accessibility
- Keyboard navigation
- ARIA labels and roles
- Screen reader announcements
- Focus management
Persistence
User preferences are automatically saved to localStorage:- Font size:
youversion-platform:reader:font-size - Font family:
youversion-platform:reader:font-family
Related Components
- BibleTextView - Bible text rendering
- BibleChapterPicker - Chapter navigation
- BibleVersionPicker - Version selection
- YouVersionAuthButton - Authentication
