themesberg / themesberg/flowbite-react
Theme briefly flashes light mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 506
- PR merge metrics
- No merged PRs in 30d
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Steps to reproduce
- Refresh the page
Current behavior
The theme briefly shows as light mode if in dark mode and then flicks to the expected mode (dark). This doesn't happen in light mode.
Expected behavior
No flash when in dark mode like it does in light mode
Context
I'm using this in my layout:
<Flowbite>
<Head title={`${title} - ${app.name}`} />
{children}
</Flowbite>
I use Laravel/InertiaJS/React
Has anyone else experienced this or know how to resolve it?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue by refreshing a Flowbite React page configured for dark mode, using the provided Flowbite layout context. Inspect the theme initialization and rendering path; the work is done when dark mode loads without a visible light-mode flash, while light mode remains unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, tailwindcss, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100