BibleCard component displays a Bible passage in a card format with an optional version picker, loading states, and Bible App attribution.
Previous name: This component was previously called
BibleWidgetView. The old name is deprecated and will be removed in a future major version. Use BibleCard for new projects.Basic Usage
Props
USFM reference (e.g., “JHN.3.16”, “JHN.3.16-17”, “JHN.3”).
Initial Bible version ID to display.
Theme for the card.Default: Inherits from provider
Whether to show the version picker button in the header.Default:
falseExamples
Single Verse
Verse Range
With Version Picker
Dark Theme
Full Chapter
Features
Header
Displays:- Passage reference (e.g., “John 3:16-17”)
- Version abbreviation (e.g., “NIV”)
- Loading spinner when refetching
- Version picker button (if enabled)
Content
Renders:- Bible text with Source Serif font at 16px
- Verse numbers and footnotes
- Animated height transitions
- Error states
Footer
Shows:- Version copyright information
- Bible App attribution logo
Loading States
Initial Load:- Shows loading spinner in header
- No content displayed
- Small spinner next to reference
- Content remains visible but faded
- Smooth transition to new content
- Delayed spinner (250ms) prevents flashing
Error Handling
When passage fails to load:- Header shows “Error”
- Error message displayed in content area
- No copyright or attribution shown
- Version picker hidden (if it was shown)
Version Switching
WhenshowVersionPicker={true}:
- Version picker button in header
- Seamless version switching
- Maintains same reference
- Smooth content transitions
Accessibility
- Semantic HTML structure
- ARIA labels where appropriate
- Loading states announced
- Error states announced with
role="alert"
Styling
The card uses:- Max width of
28rem(448px) - 1.5rem padding
- Rounded corners (
rounded-2xl) - Card background color
- Source Serif font for readability
Internal State
The component maintains internal state for the version ID:Animation
TheAnimatedHeight wrapper provides smooth height transitions when:
- Content loads initially
- Version changes
- Error states appear
Related Components
- BibleTextView - Underlying text renderer
- BibleVersionPicker - Version selection
- VerseOfTheDay - Daily verse card
