BibleReader is a compound component that provides a complete Bible reading interface with chapter navigation, version selection, settings, and optional authentication.
Basic Usage
The BibleReader uses a compound component pattern with three main parts:Controlled Component
Control the reader state from your parent component:Customizing Appearance
Control fonts, sizes, and other visual options:Toolbar Positioning
Place the toolbar at the top or bottom:Theme Support
Supports both light and dark themes:Persistent Settings
The reader automatically saves user preferences to localStorage:- Font size adjustments
- Font family selection (Inter vs Source Serif)
Navigation Features
The toolbar includes:- Previous/Next Chapter Buttons: Navigate sequentially through the Bible
- Chapter Picker: Select any book and chapter
- Version Picker: Switch between Bible versions
- Settings Menu: Adjust font size and family
- User Menu: Sign in/out (when authentication is enabled)
Working with Authentication
When authentication is enabled in the YouVersionProvider, the reader shows a user menu:Without Authentication
Disable auth to hide the user menu:Handling Unavailable Content
The reader gracefully handles chapters unavailable in certain versions:Reading Intro Chapters
Some versions include introductory material:Complete Example
Full-featured reader with all options:Props Reference
BibleReader.Root
| Prop | Type | Default | Description |
|---|---|---|---|
book | string | - | Controlled book (USFM abbreviation) |
defaultBook | string | 'JHN' | Initial book |
onBookChange | (book: string) => void | - | Book change callback |
chapter | string | - | Controlled chapter |
defaultChapter | string | '1' | Initial chapter |
onChapterChange | (chapter: string) => void | - | Chapter change callback |
versionId | number | - | Controlled version ID |
defaultVersionId | number | 206 | Initial version ID |
onVersionChange | (versionId: number) => void | - | Version change callback |
fontSize | number | 16 | Font size (12-20px) |
fontFamily | string | SOURCE_SERIF_FONT | Font family |
lineHeight | number | - | Line height multiplier |
showVerseNumbers | boolean | true | Show verse numbers |
background | 'light' | 'dark' | Provider theme | Theme override |
BibleReader.Toolbar
| Prop | Type | Default | Description |
|---|---|---|---|
border | 'top' | 'bottom' | 'top' | Border position |
Related Components
- Version Picker - Standalone version selection
- Verse Display - Display specific verses
- Custom Hooks - Build custom reading experiences
