Ask A Question

Notifications

You’re not receiving notifications from this thread.

Why aren't Tailwind UI components displaying properly?

Hideko Endo asked in Rails

Is anyone else recently having issues with Tailwind UI components not displaying properly? For example, let’s examine the first “Stacked” component: tailwindui dot com/components/application-ui/forms/form-layouts.

The first image (imgur dot com/a/wP90fNP) is what the component is supposed to look like and the second image (imgur dot com/a/HXNHWoj) is what the component looks like when I copy and paste it into my project. This particular component is not the outlier. It is happening with all Tailwind UI components.

Some of the changes are subtle and others are more obvious. (Note: I’m not changing any config settings. The app was generated with the --css tailwind flag. I packaged up the repro to ensure I'm not insane: github.com dot HidekoCodes/repro_tailwindcss-rails.)

Currently, in order to get the components to display properly, I have to use Tailwind’s Play CDN. Obviously, this isn’t something I want to use in production.

I should also note this isn’t a one-off issue. I generated a few different apps on my work laptop as well as my personal and I still encountered the same issue each time.

I first ran this by the tailwindcss-rails maintainers, and although they noticed the issue, they couldn’t find what was causing it. Therefore, I’m posting here in hopes someone else has encountered this and was able to find a solution. Thank you.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.