-
-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flowbite / Tailwind V4 #1508
Comments
tailwind 4 is officially released |
Working on it |
@Aashir1 u can subscribe to this issue and get notified faster when we publish the next update. PS. We're gonna support both v3 and v4. |
@SutuSebastian done 👍 |
I've installed tailwind 4 with -- force but where flowbite-react plugin can be added since v4 is not using tailwind.config.js ? |
U would have to link back to an Note that the scanned classes are still using the old v3 unconverted classes (see below), which won't work accordingly.
As a quick update, I am actively working on the new version that brings support for both v3 and v4, with a much easier one CLI command setup, no more manual steps. Keep close. |
the only way that worked for me and imported plugin with older config file is using new Vite configuration placing @config "../tailwind.config.js"; in index.css got tailwind.config.js:
thanks |
there was a problem with my config file,the working content is
now it work also with cli (new command is : npx @tailwindcss/cli -i ./src/input.css -o ./src/output.css --watch ) in input.css
from flowbite I'm ony using badge,modal and sidebar that seem to work with v4 thanks |
any ETA for that? |
@Ionut27 closer than ever. |
subscribed sir, I'm really looking forward for next update!. Thanks! |
Until this is completed, is there a supported way to use Flowbite dropdowns - either with Flowbite-react or just with standard Flowbite - that will work with React, Flowbite 3.1.2 and Tailwind 4? Cheers |
The Modal component uses the deprecated 'bg-opacity-*' utility. |
U can use any standard Flowbite component in React (or any other React based frameworks) by switching the HTML templating to JSX (eg: function Dropdown() {
useLayoutEffect(() => {
import("flowbite").then(({ initDropdowns }) => initDropdowns());
}, []);
return (
<div>
<button
id="dropdownDefaultButton"
data-dropdown-toggle="dropdown"
className="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
type="button"
>
Dropdown button{" "}
<svg
className="w-2.5 h-2.5 ms-3"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 10 6"
>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="m1 1 4 4 4-4"
/>
</svg>
</button>
<div
id="dropdown"
className="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700"
>
<ul
className="py-2 text-sm text-gray-700 dark:text-gray-200"
aria-labelledby="dropdownDefaultButton"
>
<li>
<a
href="#"
className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
>
Dashboard
</a>
</li>
<li>
<a
href="#"
className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
>
Settings
</a>
</li>
<li>
<a
href="#"
className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
>
Earnings
</a>
</li>
<li>
<a
href="#"
className="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
>
Sign out
</a>
</li>
</ul>
</div>
</div>
);
} The important thing when using standard Flowbite components in a React based application, is to register the component in it's own lifecycle using the |
Fixed in the #1498 . |
Ooh - that's interesting. I'd (naively) assume that you couldn't just use the Cheers |
@sazzer It's not the preferred way to use vanilla JS That is the exact reason why |
Noticed the docs are not updated to work with Tailwind's new V4 version. Any ideas on how to setup Flowbite on Tailwind V4?
The text was updated successfully, but these errors were encountered: