I created an npm package that includes React components styled with Tailwind CSS. However, when I imported the package into another project, the components rendered—but without any styles.
Through the browser’s developer tools, I could confirm that the Tailwind utility classes were present in the HTML, but the actual styles weren’t being applied.
The Cause Tailwind CSS styles weren’t included in the consuming project. Although the utility classes existed in the DOM, the corresponding CSS wasn’t available in the browser.