You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recorded this video with the issue on the codesandbox i created
primereact.issue.mov
I would expect either
The component should be auto-sufficient (i.e it looks properly on first load)
To have a way to import the components css globally directly, next to the theme and min imports (something like import "primereact/components/tabmenu.css
Describe the bug
When using built in PR theme seeing a flash of un-styled content: https://en.wikipedia.org/wiki/Flash_of_unstyled_content
I have this super simple code
When the page first loads, it looks like this first for like 0.5 seconds
and then it changes to how it should really look
After some debugging I found out it is because when the component is loaded, it loads this global style

https://github.com/primefaces/primereact/blob/master/components/lib/tabmenu/TabMenuBase.js#L79
https://github.com/primefaces/primereact/blob/master/components/lib/componentbase/ComponentBase.js#L664
I recorded this video with the issue on the codesandbox i created
primereact.issue.mov
I would expect either
import "primereact/components/tabmenu.cssReproducer
https://codesandbox.io/s/primereact-test-forked-xsr6gj?file=/src/index.js
PrimeReact version
10.0.7
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Original issue:
primefaces/primereact#5188