Tailwind CSS - Rapidly Build Modern Websites Without Ever Leaving ...

“Best practices” don’t actually work.

I’ve written a few thousand words on why traditional “semantic class names” are the reason CSS is hard to maintain, but the truth is you’re never going to believe me until you actually try it. If you can suppress the urge to retch long enough to give it a chance, I really think you’ll wonder how you ever worked with CSS any other way.

Adam WathanCreator of Tailwind CSS

Testimonials

  • I feel like an idiot for not using Tailwind CSS until now.

    Ryan FlorenceRemix & React Training
  • If I had to recommend a way of getting into programming today, it would be HTML + CSS with Tailwind CSS.

    Guillermo RauchVercel
  • I have no design skills and with Tailwind I can actually make good looking websites with ease and it's everything I ever wanted in a CSS framework.

    Sara VieiraCodeSandbox
  • Tailwind CSS is the greatest CSS framework on the planet.

    Bret "The Hitman" HartFormer WWE Champion
  • I started using @tailwindcss. I instantly fell in love with their responsive modifiers, thorough documentation, and how easy it was customizing color palettes.

    Dacey NolanSoftware Engineer
  • Loved it the very moment I used it.

    Gilbert Rabut TsurwaWeb Developer
  • There’s one thing that sucks about @tailwindcss - once you’ve used it on a handful of projects it is a real pain in the ass to write normal CSS again.

    Graeme HoustonJavaScript Developer
  • Okay, I’m officially *all* in on the @tailwindcss hype train. Never thought building websites could be so ridiculously fast and flexible.

    Aaron BushnellProgrammer @ TrendyMinds
  • Okay, @tailwindcss just clicked for me and now I feel like a #!@%&$% idiot.

    Ken WheelerReact Engineer
  • I've been using @tailwindcss the past few months and it's amazing. I already used some utility classes before, but going utility-first... this is the way.

    Jad LimcacoDesigner
  • After finally getting to use @tailwindcss on a real client project in the last two weeks I never want to write CSS by hand again. I was a skeptic, but the hype is real.

    Luke RedpathRuby & iOS Developer
  • I didn't think I was going to like @tailwindcss... spent a day using it for a POC, love it! I wish this had been around when we started our company design system, seriously considering a complete rebuild

    Jon BloomerFront-End Developer
  • @tailwindcss looked unpleasant at first, but now I’m hooked on it.

    Andrew GillilandFront-End Developer
  • Once you start using tailwind, there is no going back.

    Praveen Kumar
  • I use @tailwindcss for every single project because it removes most of the annoyances of css and is multiple times quicker

    Vasu Bansal
  • It's changed the trajectory of my business. I'm able to design better looking, better performing, and more accessible components in 1/3 of the time.

    Dennis Walsh
  • My first tailwind project worked great but what really kicked ass was going back to it months later and saving so much time making new changes. I knew how everything fit together instantly.

    Eric L. Barnes
  • Tailwind looked like pure spaghetti until I used it in a real project. Now it's the only way I make websites. Simple, fast, scalable.

    Nick Saraev
  • Tailwind is a classic example of why you need to put preconceptions aside when evaluating tech. The experience and productivity is streets ahead of what you might have believed based on old school CSS thinking!

    Luke Bennett
  • Tailwind CSS is a framework like no other. Rather than constraining you to a set design, it gives you the tools and the standardization to build exactly what you want.

    Sam Carré
  • I remember being horrified the first time I saw utility first css. But these past months using Tailwind on an increasing number of projects has just been a joyful new way to build things on the web.

    Evan Payne
  • I was initially skeptical as I began using @tailwindcss, until I now needed to copy a @sveltejs component to a different location and I didn't need to worry about any of my styles breaking.

    Rotimi Best
  • @tailwindcss makes you better at CSS. Change my mind.

    Kelvin Omereshone
  • Awesome stuff! I'm no designer or front-end developer; until I found Tailwind last year I hadn't done any CSS since the early nineties. Tailwind, and Tailwind UI mean I can now create good looking front ends quickly, which is super empowering. Crazy impressive project.

    John W Clarke
  • I admit I was a big skeptic of @tailwindcss until last year. I thought "why would I ever type a million classes that just abstract single CSS properties?" By now, I feel like I'm twice as productive when building UIs. It's really amazing.

    Sumit Kumar
  • I'm nearing completion on my months-long project of rewriting my company's frontend in TypeScript and @tailwindcss. Still, every time I re-implement a component, I think, "Wow, that was way easier this time." Tailwind rocks.

    Mannie SchumpertCo-Founder/CTO @LaunchPathInc
  • With the amount of shipping we have to do, skipping the conversion of brainwaves to CSS, and being able to implement at the speed of thought using Tailwind, my life as a fullstack developer has never been more blissful.

    Christian Holman
  • Tailwind makes it easy to bring new developers into the frontend project without having to worry about the mental exercise of understanding ‘some’ developer’s class hierarchy and thought process behind it.

    Jilson ThomasUI Designer/Developer
  • Tailwind has been a total game-changer for our dev team. It allows us to move faster, keep our UI consistent, and focus on the work we want to do instead of writing CSS.

    Jake Ryan SmithFull-Stack Developer
  • Have been working with CSS for over ten years and Tailwind just makes my life easier. It is still CSS and you use flex, grid, etc. but just quicker to write and maintain.

    Debbie O'BrienSenior Program Manager at Microsoft
  • I’ve been writing CSS for over 20 years, and up until 2017, the way I wrote it changed frequently. It’s not a coincidence Tailwind was released the same year. It might look wrong, but spend time with it and you’ll realize semantic CSS was a 20 year mistake.

    Ben FurfieDeveloper
  • Tailwind makes writing code feel like I’m using a design tool.

    Didier CatzCo-Founder @StyptApp
  • Tailwind CSS is bridging the gap between design systems and products. It’s becoming the defacto API for styling.

    Sarah DayanStaff Software Engineer @Algolia
  • I never want to write regular CSS again. Only @tailwindcss.

    Trey PiepmeierWeb Developer
  • I came into my job wondering why the last dev would ever implement Tailwind into our projects, within days I was a Tailwind convert and use it for all of my personal projects.

    Madeline CampbellFull-Stack Developer
  • Tailwind made me enjoy frontend development again and gave me the confidence that I can realize any design - no matter how complex it may be.

    Marcel PociotCTO at @beyondcode
  • Tailwind turned me into a complete stack developer.

    Boris LepikhinFull-Stack Developer
  • Tailwind is the easiest and simplest part of any project I work on. I can't imagine I'll build anything big without it.

    Christopher PittDeveloper
  • Tailwind CSS has alleviated so many problems we've all become accustomed to with traditional CSS that it makes you wonder how you ever developed websites without it.

    Chase GiuntaDeveloper
  • Having used other CSS frameworks, I always come back to Tailwind CSS as it gives me the ability to create a consistent and easy to use design system in my projects. Thanks to Tailwind CSS I only need one cup of coffee to get started on a new project.

    Ivan GuzmanSoftware Engineer
  • I’ve been using Tailwind CSS for many years, and yet they seem to still amaze us every year with the updates. It’s aided me in building websites super quickly, I could never go back to boring old CSS classes!

    Charlie JosephDeveloper
  • Tailwind CSS is a design system implementation in pure CSS. It is also configurable. It gives developers super powers. It allows them to build websites with a clean consistent UI out of the box. It integrates well with any web dev framework because it‘s just CSS! Genius.

    Kahlil LecheltJavaScript Developer
  • It’s super simple to slowly migrate to Tailwind from e.g. Bootstrap by using its prefix feature. Benefiting from its features while not having to spend a lot of time upfront is amazing!

    Marco SinghofFull-Stack Developer
  • I wasn’t comfortable using CSS until I met Tailwind. Its easy to use abstraction combined with excellent documentation are a game changer!

    Joost MeijlesHead of Unplatform @avivasolutions
  • Tailwind turns implementing designs from a chore to a joy. You'll fall in love with building for the web all over again.

    Matt SwansonDeveloper
  • Tailwind CSS helps you eject from the complexity of abstracting styles away. Having styles right there in your HTML is powerful, which gets even more obvious when using products like Tailwind UI.

    Matija MarohnićFront-End Developer
  • If Tailwind is like Tachyons on steroids, Tailwind UI is like Lance Armstrong winning the Tour de France (seven times). Without, of course, the scandal and shame.

    Hugh DurkinDeveloper
  • Being burned by other abandoned CSS frameworks, my biggest fear was to bet on yet another framework that may disappear. However, I gave it a try and couldn’t be happier. They keep improving the framework in meaningful ways on a regular basis. It feels very much alive.

    Matthias SchmidtProgrammer
  • Getting buy-in on Tailwind CSS from our entire team of developers took some time and discussion, but once we implemented company wide, it has made it a breeze for any developer to jump into any project and quickly make changes/enhancements.

    Jerred HurstCTO Primitive
  • Tailwind CSS has at the same time made CSS enjoyable and drastically changed how I build out products. It's rapid, efficient and an absolute joy to work with.

    Braunson YagerFull Stack Developer & Designer
  • Using any CSS framework other than Tailwind seems like a step backward in web development at this point. Absolutely nothing else comes close to making me as productive during the design phase of development than Tailwind.

    Zac Jordan ZajdelDeveloper
  • Tailwind has completely revolutionized our devops pipeline. The CLI works consistently no matter what framework is in place.

    Joel VartyPresident & CTO @agilitycms
  • Tailwind is like a really nice pair of socks. You think, “okay, how good can a pair of socks be”. Then you put socks on and you are like “%@#! these are socks”.

    Neil DochertySoftware Engineer
  • Tailwind unified our css work across different client projects more than any other methodology, while letting us keep our bespoke designs, and even improved performance and stability of our sites.

    Søren KottalDeveloper
  • Tailwind is the only way to work with CSS at scale.

    Aaron FrancisDeveloper
  • Tailwind CSS has single-handedly been the biggest and most impactful change for our team's development workflow. I'm glad I live in a universe where Tailwind exists.

    Sanjay SoundarajanFront-End Developer
  • Tailwind solves a complex problem in an elegant way. It provides a ready-to-use UI, all while not compromising on enabling developers to quickly build anything imaginable.

    Brent GarnerDeveloper
  • Skip to the end. Use @tailwindcss.

    Kent C. DoddsDeveloper and Educator
  • I was bad at front-end until I discovered Tailwind CSS. I have learnt a lot more about design and CSS itself after I started working with Tailwind. Creating web pages is 5x faster now.

    Shruti BalasaFull Stack Web Developer & Tech Educator
  • I don't use it but if I would use something I'd use Tailwind!

    Pieter LevelsMaker
  • With Tailwind I can offer my clients faster turnaround times on custom WordPress themes, both for initial builds and for future revisions.

    Greg SullivanWordPress Developer
  • Thanks to @tailwindcss, CSS started to make sense to me.

    Nuno MaduroCore Team Member @laravelphp
  • Tailwind clicked for me almost immediately. I can't picture myself writing another BEM class ever again. Happy user since the first public release! Productivity is at an all time high, thanks to @tailwindcss.

    Igor RandjelovicDeveloper
  • CSS has always been the hardest part of offering a digital service. It made me feel like a bad developer. Tailwind gives me confidence in web development again. Their docs are my first port of call.

    Dan MaloneFounder of @mawla_io
  • I thought "Why would I need Tailwind CSS? I already know CSS and use Bootstrap", but after giving it a try I decided to switch all my projects to Tailwind.

    Sergio PerisDevOps Engineer & Network Administrator
  • The Tailwind docs are its real magic. It is actually better documented than CSS itself. It’s such a pleasure to use.

    Zach KnickerbockerDeveloper
  • I've never felt more confident designing and styling websites and web apps than when I've used Tailwind CSS.

    Glenn MeyerDeveloper
  • Tried it once, never looked back. Tailwindcss convert since 0.7 and it just keeps getting better and better.

    Jan D'HollanderFront-End Developer
  • If you work at an agency and deal with hundreds of unique sites, each of them having their own custom CSS is a nightmare. Do your future self a favor and use Tailwind!

    Andrew Brown
  • Before Tailwind CSS I was banging my head against the wall trying to make sense of my CSS spaghetti. Now I am banging my head against the wall wondering why I didn’t try it earlier. My head hurts and my wall has a big hole in it. But at least using CSS is pleasant again!

    Marc Köhlbrugge
  • I was skeptical at first and resisted for a long time but after doing the first projects with Tailwind CSS this year, normal CSS just feels wrong and slow.

    David HellmannDigital Designer & Developer
  • After using Tailwind for the first time, I wondered why I used anything else. It's now my go-to CSS framework for any application, production or prototype.

    Joshua LoweDeveloper
  • Tailwind not only made me able to focus on building great UI’s but it also improved my overall CSS skills by having such a wonderful docs site when I needed to handwrite CSS.

    Josh MandersDeveloper
  • Using Tailwind is an accelerant for rapid prototyping design systems. Strong documentation, helpful community, and instant results.

    Ian GaenssleyDesign Operations Lead at BetterCloud
  • I instinctively hated utility CSS, but Tailwind completely converted me. It reignited my excitement for front-end development and implementing custom designs!

    Jess ArcherFull-Stack Developer
  • Tailwind CSS bridges the gap between design and dev more than anything else. It reintroduces context to development, limits cognitive load with choice architecture, grants access to a token library out of the box and is incredibly easy to pickup. It helped my design career so much.

    Corey GinnivanCo-Founder of FeatureBoard
  • When I'm working on a project that isn't using Tailwind, first I yell, then I take a deep breath, then I run npm install tailwindcss.

    Ryan Chenkie
  • Going back to a large website that doesn't use Tailwind is like hopping out of a Tesla and into my dad's rusted Minnesota farm truck. Sure, it works, but the clutch is slipping, the brakes barely work, and it's filled with old tires we're not even using anymore.

    Dan GayleSenior Front-End Developer @CrateandBarrel
  • I pushed back hard at the mention of Tailwind initially due to the number of classes in my code however within 5 minutes or using it I was hooked and now am the annoying guy pushing Tailwind on anyone who will listen. It has simplified my dev workflow beyond measurement.

    Dan BrookingHead Engineer @SubscriptionBox
  • I never bothered to learn vanilla CSS because it’s a waste of time — why bother when I have Tailwind instead? Turns out I learned a ton of CSS anyway just by using Tailwind. It’s such a perfect middleground between thoughtful abstraction, while still letting you break free.

    Trevor Campbell
  • Tailwind and the ecosystem around it is like a giant turbocharger for web agencies. It helps teams of developers and designers develop a shared language and system of constraints that speeds up the entire process. It's a game-changer for efficient teamwork.

    Jeff SagalFull-Stack Developer
  • Tailwind provides the style of bespoke design, the constraint of a design system, and the flexibility to make it infinitely customizable, without being shoehorned into making every website look like it was cut from the same cloth.

    Michael DyryndaAustralian
  • Tailwind completely changed my freelance career by allowing me to build out completely custom designs really fast without writing any CSS.

    Jason BeggsFront-End Developer
  • Using Tailwind CSS will make you feel like you just unlocked a cheat code.

    David PaluyCTO @Quartix
  • Every developer I’ve convinced to give Tailwind a try has come back and said they are never going back. Every. Single. One.

    Jacob GrafWeb Developer
Show more...

Constraint-based

An API for your design system.

Utility classes help you work within the constraints of a system instead of littering your stylesheets with arbitrary values. They make it easy to be consistent with color choices, spacing, typography, shadows, and everything else that makes up a well-engineered design system.

Learn more, utility-first fundamentals
  • Sizing
  • Colors
  • Typography
  • Shadows
  • w-96
  • w-80
  • w-72
  • w-64
  • w-60
  • w-56
  • w-52
  • w-48
  • w-64
  • w-60
  • w-56
  • w-52
  • w-48
  • w-44
  • w-40
  • w-36
123456789101112131415161718192021222324252627<divclass="space-y-4"><divclass="w-96 bg-white shadow rounded"> w-96</div><divclass="w-80 bg-white shadow rounded"> w-80</div><divclass="w-72 bg-white shadow rounded"> w-72</div><divclass="w-64 bg-white shadow rounded"> w-64</div><divclass="w-60 bg-white shadow rounded"> w-60</div><divclass="w-56 bg-white shadow rounded"> w-56</div><divclass="w-52 bg-white shadow rounded"> w-52</div><divclass="w-48 bg-white shadow rounded"> w-48</div></div>

Build anything

Build whatever you want, seriously.

Because Tailwind is so low-level, it never encourages you to design the same site twice. Even with the same color palette and sizing scale, it's easy to build the same component with a completely different look in the next project.

Get started, installation
  • Simple
  • Playful
  • Elegant
  • Brutalist
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071<divclass="flex font-sans"> <divclass="flex-none w-48 relative"> <imgsrc="/classic-utility-jacket.jpg"alt=""class="absolute inset-0 w-full h-full object-cover"loading="lazy"/> </div> <formclass="flex-auto p-6"> <divclass="flex flex-wrap"> <h1class="flex-auto text-lg font-semibold text-slate-900"> Classic Utility Jacket </h1> <divclass="text-lg font-semibold text-slate-500"> $110.00 </div> <divclass="w-full flex-none text-sm font-medium text-slate-700 mt-2"> In stock </div> </div> <divclass="flex items-baseline mt-4 mb-6 pb-6 border-b border-slate-200"> <divclass="space-x-2 flex text-sm"> <label> <inputclass="sr-only peer"name="size"type="radio"value="xs"checked/> <divclass="w-9 h-9 rounded-lg flex items-center justify-center text-slate-700 peer-checked:font-semibold peer-checked:bg-slate-900 peer-checked:text-white"> XS </div> </label> <label> <inputclass="sr-only peer"name="size"type="radio"value="s"/> <divclass="w-9 h-9 rounded-lg flex items-center justify-center text-slate-700 peer-checked:font-semibold peer-checked:bg-slate-900 peer-checked:text-white"> S </div> </label> <label> <inputclass="sr-only peer"name="size"type="radio"value="m"/> <divclass="w-9 h-9 rounded-lg flex items-center justify-center text-slate-700 peer-checked:font-semibold peer-checked:bg-slate-900 peer-checked:text-white"> M </div> </label> <label> <inputclass="sr-only peer"name="size"type="radio"value="l"/> <divclass="w-9 h-9 rounded-lg flex items-center justify-center text-slate-700 peer-checked:font-semibold peer-checked:bg-slate-900 peer-checked:text-white"> L </div> </label> <label> <inputclass="sr-only peer"name="size"type="radio"value="xl"/> <divclass="w-9 h-9 rounded-lg flex items-center justify-center text-slate-700 peer-checked:font-semibold peer-checked:bg-slate-900 peer-checked:text-white"> XL </div> </label> </div> </div> <divclass="flex space-x-4 mb-6 text-sm font-medium"> <divclass="flex-auto flex space-x-4"> <buttonclass="h-10 px-6 font-semibold rounded-md bg-black text-white"type="submit"> Buy now </button> <buttonclass="h-10 px-6 font-semibold rounded-md border border-slate-200 text-slate-900"type="button"> Add to bag </button> </div> <buttonclass="flex-none flex items-center justify-center w-9 h-9 rounded-md text-slate-300 border border-slate-200"type="button"aria-label="Like"> <svgwidth="20"height="20"fill="currentColor"aria-hidden="true"> <pathfill-rule="evenodd"clip-rule="evenodd"d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z"/> </svg> </button> </div> <pclass="text-sm text-slate-700"> Free shipping on all continental US orders. </p> </form> </div>

Performance

It’s tiny — never ship unused CSS again.

Tailwind automatically removes all unused CSS when building for production, which means your final CSS bundle is the smallest it could possibly be. In fact, most Tailwind projects ship less than 10kB of CSS to the client.

Learn more, optimizing for productionindex.htmltailwind.config.jspackage.json1<!DOCTYPEhtml>2<htmllang="en">3<head>4<metacharset="UTF-8">5<metaname="viewport"content="width=device-width, initial-scale=1.0">6<title>Document</title>7<linkrel="stylesheet"href="/build.css">8</head>9<body>10<buttonclass=""></button>11</body>12</html>13build.css1Terminalnpx tailwindcss -o--output build.css --content index.html -w --watch

Mobile-first

Responsive everything.

Wrestling with a bunch of complex media queries in your CSS sucks, so Tailwind lets you build responsive designs right in your HTML instead.

Throw a screen size in front of literally any utility class and watch it magically apply at a specific breakpoint.

Learn more, responsive designsmmdlgxl2xlworkcation.comTailwind UI - Official Tailwind CSS ComponentsWorkcation - Find a trip that suits youHeadless UI – Unstyled, fully accessible UI components12345678910111213141516171819202122232425262728293031323334353637383940<mainclass="py-6px-4sm:p-6md:py-10md:px-8"><divclass="max-w-4xlmx-autogridgrid-cols-1lg:max-w-5xllg:gap-x-20lg:grid-cols-2"><divclass="relativep-3col-start-1row-start-1flexflex-col-reverserounded-lgbg-gradient-to-tfrom-black/75via-black/0sm:bg-nonesm:row-start-2sm:p-0lg:row-start-1"><h1class="mt-1text-lgfont-semiboldtext-whitesm:text-slate-900md:text-2xldark:sm:text-white">Beach House in Collingwood</h1><pclass="text-smleading-4font-mediumtext-whitesm:text-slate-500dark:sm:text-slate-400">Entire house</p></div><divclass="gridgap-4col-start-1col-end-3row-start-1sm:mb-6sm:grid-cols-4lg:gap-6lg:col-start-2lg:row-end-6lg:row-span-6lg:mb-0"><imgsrc="/beach-house.jpg"alt=""class="w-fullh-60object-coverrounded-lgsm:h-52sm:col-span-2lg:col-span-full"loading="lazy"><imgsrc="/beach-house-interior-1.jpg"alt=""class="hiddenw-fullh-52object-coverrounded-lgsm:blocksm:col-span-2md:col-span-1lg:row-start-2lg:col-span-2lg:h-32"loading="lazy"><imgsrc="/beach-house-interior-2.jpg"alt=""class="hiddenw-fullh-52object-coverrounded-lgmd:blocklg:row-start-2lg:col-span-2lg:h-32"loading="lazy"></div><dlclass="mt-4text-xsfont-mediumflexitems-centerrow-start-2sm:mt-1sm:row-start-3md:mt-2.5lg:row-start-2"><dtclass="sr-only">Reviews</dt><ddclass="text-indigo-600flexitems-centerdark:text-indigo-400"><svgwidth="24"height="24"fill="none"aria-hidden="true"class="mr-1stroke-currentdark:stroke-indigo-500"><pathd="m12 5 2 5h5l-4 4 2.103 5L12 16l-5.103 3L9 14l-4-4h5l2-5Z"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"/></svg><span>4.89 <spanclass="text-slate-400font-normal">(128)</span></span></dd><dtclass="sr-only">Location</dt><ddclass="flexitems-center"><svgwidth="2"height="2"aria-hidden="true"fill="currentColor"class="mx-3text-slate-300"><circlecx="1"cy="1"r="1"/></svg><svgwidth="24"height="24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="mr-1text-slate-400dark:text-slate-500"aria-hidden="true"><pathd="M18 11.034C18 14.897 12 19 12 19s-6-4.103-6-7.966C6 7.655 8.819 5 12 5s6 2.655 6 6.034Z"/><pathd="M14 11a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"/></svg> Collingwood, Ontario</dd></dl><divclass="mt-4col-start-1row-start-3self-centersm:mt-0sm:col-start-2sm:row-start-2sm:row-span-2lg:mt-6lg:col-start-1lg:row-start-3lg:row-end-4"><buttontype="button"class="bg-indigo-600text-whitetext-smleading-6font-mediumpy-2px-3rounded-lg">Check availability</button></div><pclass="mt-4text-smleading-6col-start-1sm:col-span-2lg:mt-6lg:row-start-4lg:col-span-1dark:text-slate-400"> This sunny and spacious room is for those traveling light and looking for a comfy and cosy place to lay their head for a night or two. This beach house sits in a vibrant neighborhood littered with cafes, pubs, restaurants and supermarkets and is close to all the major attractions such as Edinburgh Castle and Arthur's Seat.</p></div></main>

State variants

Hover and focus states? We got ’em.

Want to style something on hover? Stick hover: at the beginning of the class you want to add. Works for focus, active, disabled, focus-within, focus-visible, and even fancy states we invented ourselves like group-hover.

Learn more, handling hover, focus, and other states
  • TitleAPI IntegrationCategoryEngineeringUsers
  • TitleNew Benefits PlanCategoryHuman ResourcesUsers
  • TitleOnboarding EmailsCategoryCustomer SuccessUsers
  • New project
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152<section><headerclass="bg-whitespace-y-4p-4sm:px-8sm:py-6lg:p-4xl:px-8xl:py-6"><divclass="flexitems-centerjustify-between"><h2class="font-semiboldtext-slate-900">Projects</h2><ahref="/new"class="hover:bg-blue-400groupflexitems-centerrounded-mdbg-blue-500text-whitetext-smfont-mediumpl-2pr-3py-2shadow-sm"><svgwidth="20"height="20"fill="currentColor"class="mr-2"aria-hidden="true"><pathd="M10 5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H6a1 1 0 1 1 0-2h3V6a1 1 0 0 1 1-1Z"/></svg> New</a></div><formclass="grouprelative"><svgwidth="20"height="20"fill="currentColor"class="absoluteleft-3top-1/2-mt-2.5text-slate-400pointer-events-nonegroup-focus-within:text-blue-500"aria-hidden="true"><pathfill-rule="evenodd"clip-rule="evenodd"d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"/></svg><inputclass="focus:ring-2focus:ring-blue-500focus:outline-noneappearance-nonew-fulltext-smleading-6text-slate-900placeholder-slate-400rounded-mdpy-2pl-10ring-1ring-slate-200shadow-sm"type="text"aria-label="Filter projects"placeholder="Filter projects..."></form></header><ulclass="bg-slate-50p-4sm:px-8sm:pt-6sm:pb-8lg:p-4xl:px-8xl:pt-6xl:pb-8gridgrid-cols-1sm:grid-cols-2lg:grid-cols-1xl:grid-cols-2gap-4text-smleading-6"><lix-for="project in projects"><a:href="project.url"class="hover:bg-blue-500hover:ring-blue-500hover:shadow-mdgrouprounded-mdp-3bg-whitering-1ring-slate-200shadow-sm"><dlclass="gridsm:blocklg:gridxl:blockgrid-cols-2grid-rows-2items-center"><div><dtclass="sr-only">Title</dt><ddclass="group-hover:text-whitefont-semiboldtext-slate-900"> {project.title}</dd></div><div><dtclass="sr-only">Category</dt><ddclass="group-hover:text-blue-200">{project.category}</dd></div><divclass="col-start-2row-start-1row-end-3sm:mt-4lg:mt-0xl:mt-4"><dtclass="sr-only">Users</dt><ddx-for="user in project.users"class="flexjustify-endsm:justify-startlg:justify-endxl:justify-start-space-x-1.5"><img:src="user.avatar":alt="user.name"class="w-6h-6rounded-fullbg-slate-100ring-2ring-white"loading="lazy"></dd></div></dl></a></li><liclass="flex"><ahref="/new"class="hover:border-blue-500hover:border-solidhover:bg-whitehover:text-blue-500groupw-fullflexflex-colitems-centerjustify-centerrounded-mdborder-2border-dashedborder-slate-300text-smleading-6text-slate-900font-mediumpy-3"><svgclass="group-hover:text-blue-500mb-1text-slate-400"width="20"height="20"fill="currentColor"aria-hidden="true"><pathd="M10 5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2h-3v3a1 1 0 1 1-2 0v-3H6a1 1 0 1 1 0-2h3V6a1 1 0 0 1 1-1Z"/></svg> New project</a></li></ul></section>

Component-driven

Worried about duplication? Don’t be.

If you're repeating the same utilities over and over and over again, all you have to do is extract them into a component or template partial and boom — you've got a single source of truth so you can make changes in one place.

Learn more, reusing styles
  • React
  • Vue
  • Angular
  • Blade
  • New Releases
  • Top Rated
  • Vincent’s Picks

Prognosis Negative

Star rating2.66RatingPG-13Year2021GenreComedyRuntime1h 46mCastSimon Pegg, Zach Galifianakis

Rochelle, Rochelle

Star rating3.25RatingRYear2020GenreRomanceRuntime1h 56mCastEmilia Clarke

Death Blow

Star rating4.95Rating18AYear2020GenreActionRuntime2h 5mCastIdris Elba, John Cena, Thandiwe Newton
  • Movies.js
  • Nav.js
  • NavItem.js
  • List.js
  • ListItem.js
12345678910111213141516171819202122importNavfrom'./Nav.js' importNavItemfrom'./NavItem.js' importListfrom'./List.js' importListItemfrom'./ListItem.js' exportdefaultfunctionMovies({ movies }){ return( <divclassName="divide-y divide-slate-100"> <Nav> <NavItemhref="/new"isActive>NewReleases</NavItem> <NavItemhref="/top">TopRated</NavItem> <NavItemhref="/picks">Vincent’sPicks</NavItem> </Nav> <List> {movies.map((movie)=>( <ListItemkey={movie.id}movie={movie}/> ))} </List> </div> ) }

Not into component frameworks?

Use Tailwind's @apply directive to extract repeated utility patterns into custom CSS classes just by copying and pasting the list of class names.

Learn more, reusing styles

Weekly one-on-one

Date and timeThu Nov 15, 2020 10:00am - 11:00am ESTLocationKitchener, ONDescriptionNo meeting descriptionAttendeesAndrew McDonaldDeclineAccept

styles.css

123456789101112.btn{ @apply text-base font-medium rounded-lg p-3; } .btn--primary{ @apply bg-sky-500 text-white; } .btn--secondary{ @apply bg-slate-100 text-slate-900; }

index.html

313233343536373839</dd></div></dl><footerclass="grid grid-cols-2 gap-x-6"><buttonclass="btn btn--secondary">Decline</button><buttonclass="btn btn--primary">Accept</button></footer></article>

Dark mode

Now with Dark Mode.

Don’t want to be one of those websites that blinds people when they open it on their phone at 2am? Enable dark mode in your configuration file then throw dark: in front of any color utility to apply it when dark mode is active. Works for background colors, text colors, border colors, and even gradients.

Learn more, dark modeDisable dark mode

Ep. 128

Scaling CSS at Heroku with Utility Classes

Full Stack Radio

24:16 75:50 1x 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 <div class="bg-white border-slate-100 dark:bg-slate-800 dark:border-slate-500 border-b rounded-t-xl p-4 pb-6 sm:p-10 sm:pb-8 lg:p-6 xl:p-10 xl:pb-8 space-y-6 sm:space-y-8 lg:space-y-6 xl:space-y-8"> <div class="flex items-center space-x-4"> <img src="/full-stack-radio.png" alt="" width="88" height="88" class="flex-none rounded-lg bg-slate-100" loading="lazy" /> <div class="min-w-0 flex-auto space-y-1 font-semibold"> <p class="text-cyan-500 dark:text-cyan-400 text-sm leading-6"> <abbr title="Episode">Ep.</abbr> 128 </p> <h2 class="text-slate-500 dark:text-slate-400 text-sm leading-6 truncate"> Scaling CSS at Heroku with Utility Classes </h2> <p class="text-slate-900 dark:text-slate-50 text-lg"> Full Stack Radio </p> </div> </div> <div class="space-y-2"> <div class="relative"> <div class="bg-slate-100 dark:bg-slate-700 rounded-full overflow-hidden"> <div class="bg-cyan-500 dark:bg-cyan-400 w-1/2 h-2" role="progressbar" aria-label="music progress" aria-valuenow="1456" aria-valuemin="0" aria-valuemax="4550"></div> </div> <div class="ring-cyan-500 dark:ring-cyan-400 ring-2 absolute left-1/2 top-1/2 w-4 h-4 -mt-2 -ml-2 flex items-center justify-center bg-white rounded-full shadow"> <div class="w-1.5 h-1.5 bg-cyan-500 dark:bg-cyan-400 rounded-full ring-1 ring-inset ring-slate-900/5"></div> </div> </div> <div class="flex justify-between text-sm leading-6 font-medium tabular-nums"> <div class="text-cyan-500 dark:text-slate-100">24:16</div> <div class="text-slate-500 dark:text-slate-400">75:50</div> </div> </div> </div> <div class="bg-slate-50 text-slate-500 dark:bg-slate-600 dark:text-slate-200 rounded-b-xl flex items-center"> <div class="flex-auto flex items-center justify-evenly"> <button type="button" aria-label="Add to favorites"> <svg width="24" height="24"> <path d="M7 6.931C7 5.865 7.853 5 8.905 5h6.19C16.147 5 17 5.865 17 6.931V19l-5-4-5 4V6.931Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> <button type="button" class="hidden sm:block lg:hidden xl:block" aria-label="Previous"> <svg width="24" height="24" fill="none"> <path d="m10 12 8-6v12l-8-6Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M6 6v12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> <button type="button" aria-label="Rewind 10 seconds"> <svg width="24" height="24" fill="none"> <path d="M6.492 16.95c2.861 2.733 7.5 2.733 10.362 0 2.861-2.734 2.861-7.166 0-9.9-2.862-2.733-7.501-2.733-10.362 0A7.096 7.096 0 0 0 5.5 8.226" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M5 5v3.111c0 .491.398.889.889.889H9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> </div> <button type="button" class="bg-white text-slate-900 dark:bg-slate-100 dark:text-slate-700 flex-none -my-2 mx-auto w-20 h-20 rounded-full ring-1 ring-slate-900/5 shadow-md flex items-center justify-center" aria-label="Pause"> <svg width="30" height="32" fill="currentColor"> <rect x="6" y="4" width="4" height="24" rx="2" /> <rect x="20" y="4" width="4" height="24" rx="2" /> </svg> </button> <div class="flex-auto flex items-center justify-evenly"> <button type="button" aria-label="Skip 10 seconds"> <svg width="24" height="24" fill="none"> <path d="M17.509 16.95c-2.862 2.733-7.501 2.733-10.363 0-2.861-2.734-2.861-7.166 0-9.9 2.862-2.733 7.501-2.733 10.363 0 .38.365.711.759.991 1.176" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M19 5v3.111c0 .491-.398.889-.889.889H15" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> <button type="button" class="hidden sm:block lg:hidden xl:block" aria-label="Next"> <svg width="24" height="24" fill="none"> <path d="M14 12 6 6v12l8-6Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18 6v12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> <button type="button" class="rounded-lg text-xs leading-6 font-semibold px-2 ring-2 ring-inset ring-slate-500 text-slate-500 dark:text-slate-100 dark:ring-0 dark:bg-slate-500"> 1x </button> </div> </div>

Customization

Extend it, tweak it, change it.

Tailwind includes an expertly crafted set of defaults out-of-the-box, but literally everything can be customized — from the color palette to the spacing scale to the box shadows to the mouse cursor.

Use the tailwind.config.js file to craft your own design system, then let Tailwind transform it into your own custom CSS framework.

Learn more, configuration
  • Simple
  • Playful
  • Elegant
  • Brutalist

Typography

  • CSS classfont-displayFont nameInterSampleAaBbCc
  • CSS classfont-bodyFont size14ptSampleLorem ipsum dolor sit amet, consectetur adipiscing elit. Ut augue gravida cras quis ac duis pretium ullamcorper consequat. Integer pellentesque eu.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut augue gravida cras quis ac duis pretium ullamcorper consequat. Integer pellentesque eu.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut augue gravida cras quis ac duis pretium ullamcorper consequat. Integer pellentesque eu.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut augue gravida cras quis ac duis pretium ullamcorper consequat. Integer pellentesque eu.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut augue gravida cras quis ac duis pretium ullamcorper consequat.

Colors

  • CSS class prefixbg-primaryRange50-900Sample
  • CSS class prefixbg-secondaryRange50-900Sample
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 module.exports = { theme: { fontFamily: { display: ['Inter', 'system-ui', 'sans-serif'], body: ['Inter', 'system-ui', 'sans-serif'], }, colors: { primary: { 50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd', 400: '#60a5fa', 500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', 900: '#1e3a8a', }, secondary: { 50: '#f8fafc', 100: '#f1f5f9', 200: '#e2e8f0', 300: '#cbd5e1', 400: '#94a3b8', 500: '#64748b', 600: '#475569', 700: '#334155', 800: '#1e293b', 900: '#0f172a', }, }, }, }

Modern features

Cutting-edge is our comfort zone.

Tailwind is unapologetically modern, and takes advantage of all the latest and greatest CSS features to make the developer experience as enjoyable as possible.

We've got first-class CSS grid support, composable transforms and gradients powered by CSS variables, support for modern state selectors like :focus-visible, and tons more.

Learn more, grid template columns
  • CSS Grid
  • Transforms
  • Filters
123456789101112131415161718<divclass="grid grid-flow-col grid-rows-2 grid-cols-3 gap-8"> <div> <imgsrc="/mountains-1.jpg"alt=""loading="lazy"> </div> <divclass="col-start-3"> <imgsrc="/mountains-2.jpg"alt=""loading="lazy"> </div> <div> <imgsrc="/mountains-3.jpg"alt=""loading="lazy"> </div> <div> <imgsrc="/mountains-4.jpg"alt=""loading="lazy"> </div> <divclass="row-start-1 col-start-2 col-span-2"> <imgsrc="/mountains-5.jpg"alt=""loading="lazy"> </div> </div>

Editor tools

World-class IDE integration.

Worried about remembering all of these class names? The Tailwind CSS IntelliSense extension for VS Code has you covered.

Get intelligent autocomplete suggestions, linting, class definitions and more, all within your editor and with no configuration required.

Learn more, editor setup123456789101112131415161718192021222324<divclass="w-full flex items-center justify-between block p-6 space-x-6"> <divclass="flex-1 truncate"> <divclass="flex items-center space-x-3"> <h3class="text-slate-900 text-sm font-medium truncate">Jane Cooper</h3> <spanclass="text-teal-600">Admin</span> </div> <pclass="mt-1 text-slate-500 text-sm truncate">Regional Paradigm Technician</p> </div> <imgclass="w-10 h-10 bg-slate-300 rounded-full shrink-0"src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=facearea&amp;facepad=4&amp;w=256&amp;h=256&amp;q=60"alt=""loading="lazy"> </div> <divclass="border-t border-slate-200"> <divclass="-mt-px flex"> <divclass="w-0 flex-1 flex border-r border-slate-200"> <ahref="#"class="relative -mr-px w-0 flex-1 inline-flex items-center justify-center py-4 text-sm text-slate-700 font-medium border border-transparent rounded-bl-lg hover:text-slate-500 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 transition ease-in-out duration-150"> <svgclass="w-5 h-5 text-slate-400"xmlns="http://www.w3.org/2000/svg"viewBox="0 0 20 20"fill="currentColor"> <pathd="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z"/> <pathd="M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"/> </svg> <spanclass="ml-3">Email</span> </a> </div> </div> </div>

Problems

  • 'flex' applies the same CSS property as 'block'.

     cssConflict [1, 20]

  • 'block' applies the same CSS property as 'flex'.

     cssConflict [1, 54]

Ready-made components

Move even faster with Tailwind UI.

Tailwind UI is a collection of beautiful, fully responsive UI components, designed and developed by us, the creators of Tailwind CSS. It's got hundreds of ready-to-use examples to choose from, and is guaranteed to help you find the perfect starting point for what you want to build.

Learn more

Từ khóa » Html Offical Website