prettier-plugin-tailwindcss
daisyui
Our great sponsors
prettier-plugin-tailwindcss | daisyui | |
---|---|---|
14 | 248 | |
4,729 | 30,632 | |
6.2% | - | |
8.3 | 9.8 | |
8 days ago | 3 days ago | |
JavaScript | Svelte | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
prettier-plugin-tailwindcss
-
Use TailwindCSS prefixes for shared design system components
It's not as if the correct order for the rules is mysterious. It's implemented in the Tailwind compiler. Tools like prettier-plugin-tailwindcss, which automatically sorts the class names in your HTML code to match the order in which Tailwind generates them in your CSS output, use a public API in Tailwind to get this order.
-
Tailwind CSS Tips and Tricks Worth Knowing
Other than that, you can get Prettier sorting your classes with the Tailwind Prettier plugin. And one more quality-of-life extension that might help your eye sores from a long list of classes is Tailwind Fold.
- Automatic Class Sorting with Tailwind and Prettier
-
How do you get the tailwindcss prettier plugin to work in electron-react-boilerplate?
I everyone. I am using Electron react boilerplate and I have successfully added tailwindcss to the project. However, I am struggling to get the Prettier plugin tailwindcss to work. I’ve tried following the instructions in the readme but no luck. I’ve tried moving my prettier.config.js to the .erc/config dir with no luck either.
-
Why is tailwind so hyped?
Others have already replied, but if you need to structure your TailwindCSS classes, I recommend their official Prettier plugin which integrates well into an ESLint setup.
- I've started breaking tailwind classes into multiple lines and feel like this is much easier to read than having all the classes on one line. Does anyone else do that? Any drawback to it?
-
Tailwind CSS v3.2 – Introducing Container Queries, Multiple Configs and More
> Except that I read that it's great for writing, but a nightmare for reading.
This is true at first. I can see it being pretty daunting to come into an existing project and trying to understand the styling of components. Starting from scratch and easing it into an existing project is much easier imo. That's what I did for a personal website. Now that I understand it and have converted the entire website to Tailwind, I don't want to switch to anything else going forward.
Here's a Prettier plugin that sort the classes to keep everything consistent across components: https://github.com/tailwindlabs/prettier-plugin-tailwindcss
Tailwind combined with classnames (https://github.com/JedWatson/classnames) makes it really easy to have conditional styling based on component state.
-
Fastest Frontend Tools in 2022
Despite the existence of Prettier, arguments about code style such as how to sort ES module imports still exist. Manually sorting ES modules wastes time, and usually leads to losing context when you are writing code and then have to navigate to the top of a file to modify your import statements. I love using the @trivago/prettier-plugin-sort-imports plugin which automatically sorts new imports, and works perfectly together with TypeScript's auto-import feature. Similarly, prettier-plugin-tailwindcss automatically sorts Tailwind classes in your code.
-
HyperUI Rewritten... What's Changed?
Added the tailwind-prettier-plugin as not everyone uses headwind
-
class order
I used to use Headwind (mentioned in another comment) but the Tailwind CSS team now maintains an official Prettier plugin which I'd recommend using on every project. It sorts the classes the same way they appear in Tailwind's compiled CSS so precedence is easy to see straight from your HTML. I've also found it's much faster than Headwind. They talk about it more in this blog post.
daisyui
-
HTML-first, framework-agnostic implementation of shadcn/UI – franken/UI
DaisyUI offers zero-JS components
https://daisyui.com/
I used it for a small form + search result list recently and it works well enough for simple / static stuff.
But I think I'll still be reaching for a JS lib first since I'd miss things like inputs-with-autocomplete too much.
- Show HN: Open Source TailwindCSS UI Components
-
How to use Tailwind with any CSS framework
Tailwind is great, but creating everything from scratch is annoying. A nice base of components which can be extended with tailwind would be great. There are a few tailwind frameworks like Flowbite, Daisy Ui, but I like Bulma, PicoCSS and Bootstrap.
- Ask HN: Freelance website builders/maintainers, what's in your 2024 toolkit?
-
Building a Fast, Efficient Web App: The Technology Stack of PromptSmithy Explained
While I have experience with Tailwind and frontend development, I don’t really have the patience to use it. I usually end up using something like Mantine, which is a complete component library UI kit, or Daisy UI, which is a component library built on top of Tailwind. Shadcn/ui is quite similar to Daisy in this sense, but being able to customize the individual components, since they get installed to your components folder, made development more streamlined and more customizable. On top of that being able to change my components style with natural language thanks to v0 made development super easy and fast. Shadcn may be too minimalist of a style for some, but thanks to all the components being local, you can customize them quickly and easily!
-
The Bulma CSS framework reaches 1.0
https://daisyui.com is a really great middle ground—you can move as fast as you would in Bulma, then drop down into the weeds with TW if you need it.
-
Tailwind Color Palette Generator
If you're looking for grab and go components, Daisy UI or Flowbite might be more your speed, I've used both with minimal headache.
https://daisyui.com/
-
DaisyUI + Alpine.js + Codehooks.io - the simple web app trio
This guide is tailored for front-end developers looking to explore the smooth integration of DaisyUI's stylish components, Alpine.js's minimalist reactive framework, and the straightforward back-end capabilities of Codehooks.io.
- DaisyUI: The most popular component library for Tailwind CSS
-
Shadcn: Beautifully designed components that you can copy-paste into your apps
Others:
- https://daisyui.com/
What are some alternatives?
headwind - An opinionated Tailwind CSS class sorter built for Visual Studio Code
flowbite - Open-source UI component library and front-end development framework based on Tailwind CSS
eslint-plugin-tailwindcss - ESLint plugin for Tailwind CSS usage
headlessui - Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
Visual Studio Code - Visual Studio Code
shadcn/ui - Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
ESLint - Find and fix problems in your JavaScript code.
Material UI - Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
husky - Git hooks made easy 🐶 woof!
theme-change - Change CSS theme with toggle, buttons or select using CSS custom properties and localStorage
prettier - Prettier is an opinionated code formatter.
fullcalendar - Full-sized drag & drop event calendar in JavaScript