VerseOfTheDay component displays the daily Bible verse in a card format with optional features like a sun icon, share button, and Bible App attribution.
Basic Usage
Props
Theme for the card.Default: Inherits from provider
Bible version ID to display the verse in.Default:
3034 (Berean Standard Bible)Day of the year (1-366) to display. Useful for testing or displaying a specific day’s verse.Default: Current day
Whether to display the sun icon.Default:
trueWhether to show the YouVersion Bible App logo and attribution.Default:
trueWhether to show the share button.Default:
trueSize variant of the card. ‘lg’ increases font size and padding.Default:
"default"Examples
Default
Large Size
Minimal (No Icons or Attribution)
Dark Theme
Specific Day
Different Version
Features
Sharing
When the share button is clicked:- Uses native Web Share API if available
- Falls back to copying text to clipboard
- Shares verse text with reference and version abbreviation
Loading States
The component shows “Loading…” while fetching:- The verse of the day data
- The passage content
- The version information
Error Handling
Displays “Error loading verse” if:- The verse of the day API fails
- The passage cannot be fetched
- The version is unavailable
Responsive Design
- Card width is constrained to
max-w-screen-sm(640px) - Padding and spacing adjust based on
sizeprop - Text wraps appropriately for narrow viewports
Accessibility
- Share button has
aria-label="Share" - Icons have appropriate titles
- Text is readable with sufficient contrast
Styling
The component uses these key classes:- Card background:
yv:bg-card - Text color:
yv:text-foregroundandyv:text-muted-foreground - Shadow and rounded corners:
yv:shadow yv:rounded-2xl
Related Components
- BibleTextView - For custom verse display
- BibleCard - For displaying specific passages
