--- title: daisyUI 5 upgrade guide desc: This guide helps you how to update your project to Tailwind CSS 4 and daisyUI 5. ---
> :INFO: > > Before upgrading, make sure you read about [Tailwind CSS 4 breaking changes](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3) and [daisyUI 5 breaking changes](#changes-from-v4). ### 1. Update Tailwind CSS Tailwind CSS provides a CLI tool for automatic upgrade. It automatically applies the new Tailwind CSS changes to your project. 1. First, remove daisyUI and plugins from your `tailwind.config.js` file, so Tailwind CSS upgrade tool can safely replace it with the CSS file. ```diff:tailwind.config.js module.exports = { content: ['./your-files/**/*.{html,js}'], // other stuff... - daisyui: { - themes: ['light', 'dark', 'cupcake'], - }, - plugins: [require("daisyui")], } ``` 2. Run the [official Tailwind CSS upgrade tool](https://tailwindcss.com/docs/upgrade-guide): ```bash:Terminal npx @tailwindcss/upgrade ``` ### 2. Update daisyUI 1. Install daisyUI 5 ```bash:Terminal npm i -D daisyui@latest ``` 3. Add daisyUI to your CSS file ```postcss:app.css @import "tailwindcss"; @plugin "daisyui"; ``` Now everything should work as expected. If you're facing any challenges, you can ask for help on [daisyUI Discord server](/discord/) so you can get help from the community. --- ## Changes from v4 These are all the HTML changes from daisyUI 4 to 5. There are ~15 changes in total but you won't need to do all of them, only the ones you're using. - To read about new features in daisyUI 5 go to [release notes page](/docs/v5/) - For more detailed changelog go to [changelogs page](/docs/changelog/) ### Artboard - Removed all `artboard` and `phone-*` classes. These classes were simply setting the width and height of the div. Use Tailwind CSS `w-*` and `h-*` classes instead. | Before | After | | --- | --- | | `artboard phone-1` | `w-[320px] h-[568px]` | | `artboard phone-2` | `w-[375px] h-[667px]` | | `artboard phone-3` | `w-[414px] h-[736px]` | | `artboard phone-4` | `w-[375px] h-[812px]` | | `artboard phone-5` | `w-[414px] h-[896px]` | | `artboard phone-6` | `w-[320px] h-[1024px]` | | `artboard artboard-horizontal phone-1` | `w-[568px] h-[320px]` | | `artboard artboard-horizontal phone-2` | `w-[667px] h-[375px]` | | `artboard artboard-horizontal phone-3` | `w-[736px] h-[414px]` | | `artboard artboard-horizontal phone-4` | `w-[812px] h-[375px]` | | `artboard artboard-horizontal phone-5` | `w-[896px] h-[414px]` | | `artboard artboard-horizontal phone-6` | `w-[1024px] h-[320px]` | Example: ```diff:page.html -
+
``` ### Avatar - Renamed `online` class to `avatar-online`, `offline` to `avatar-offline`, and `placeholder` to `avatar-placeholder`. ```diff:page.html -
+
``` ```diff:page.html -
+
``` ### Bottom Navigation - Removed `bottom-nav` component. Use [`dock`](/components/dock/) component instead. - Removed `btm-nav-xs`, `btm-nav-sm`, `btm-nav-md`, `btm-nav-lg`. Use `dock-xs`, `dock-sm`, `dock-md`, `dock-lg` instead. - Removed `btm-nav-active`. Use `dock-active` instead. - Removed `disabled` class of `bottom-nav`. Use `aria-disabled="true"` attribute or `disabled` attribute if it's a button. This is for better accessibility. ```diff:page.html -
+
- +
``` ### Card - `card-bordered` is renamed to `card-border`. ```diff:page.html -
+
``` - Removed `card-compact`. Use `card-sm` instead. ```diff:page.html -
+
``` ### FileInput - File input now has border by default. Use `file-input-ghost` if you want to remove the border. - Removed `file-input-bordered`. File input has a border by default now. Use `file-input-ghost` if you want to remove the border. ```diff:page.html - + ``` ### Footer - Footer is now vertical by default. Use `footer-horizontal` to make it horizontal at the screen size you want. ```diff:page.html -