Installation

Get started with Tailwind CSS

Tailwind CSS works by scanning all of your HTML files, JavaScript components, and any other templates for class names, generating the corresponding styles and then writing them to a static CSS file.

It’s fast, flexible, and reliable — with zero-runtime.

Installation

Framework Guides

Framework-specific guides that cover our recommended approach to installing Tailwind CSS in a number of popular environments.

  • Next.jsFramework Guides - 图1

    Full-featured React framework with great developer experience.

    Framework Guides - 图2Framework Guides - 图3

  • LaravelFramework Guides - 图4

    PHP web application framework with expressive, elegant syntax.

    Framework Guides - 图5

  • ViteFramework Guides - 图6

    Fast and modern development server and build tool.

    Framework Guides - 图7

  • Nuxt.jsFramework Guides - 图8

    Intuitive Vue framework for building universal applications.

    Framework Guides - 图9

  • GatsbyFramework Guides - 图10

    Framework for building static sites with React and GraphQL.

    Framework Guides - 图11

  • SolidJSFramework Guides - 图12

    A tool for building simple, performant, and reactive user interfaces.

    Framework Guides - 图13

  • SvelteKitFramework Guides - 图14

    The fastest way to build apps of all sizes with Svelte.js.

    Framework Guides - 图15

  • AngularFramework Guides - 图16

    Platform for building mobile and desktop web applications.

    Framework Guides - 图17Framework Guides - 图18

  • Ruby on RailsFramework Guides - 图19

    Full-stack framework with all the tools needed to build amazing web apps.

    Framework Guides - 图20Framework Guides - 图21

  • RemixFramework Guides - 图22

    Full stack framework focused on web fundamentals and modern UX.

    Framework Guides - 图23Framework Guides - 图24

  • PhoenixFramework Guides - 图25

    A framework to build rich, interactive applications with Elixir.

    Phoenix

  • ParcelFramework Guides - 图27

    The zero-configuration build tool for the web.

    Parcel

  • SymfonyFramework Guides - 图29

    A PHP framework to create websites and web applications.

    Framework Guides - 图30Framework Guides - 图31

  • MeteorFramework Guides - 图32

    The full stack JavaScript framework for developing cross-platform apps.

    Framework Guides - 图33

  • Create React AppFramework Guides - 图34

    CLI tool for scaffolding a new single-page React application.

    Framework Guides - 图35

Don’t see your framework of choice? Try using Tailwind CLI or installing Tailwind as a PostCSS plugin instead.

Get familiar with some of the core concepts that make Tailwind CSS different from writing traditional CSS.

  • Utility-First FundamentalsFramework Guides - 图36

    Using a utility-first workflow to build complex components from a constrained set of primitive utilities.

  • Responsive DesignFramework Guides - 图37

    Build fully responsive user interfaces that adapt to any screen size using responsive modifiers.

  • Hover, Focus & Other StatesFramework Guides - 图38

    Style elements in interactive states like hover, focus, and more using conditional modifiers.

  • Dark ModeFramework Guides - 图39

    Optimize your site for dark mode directly in your HTML using the dark mode modifier.

  • Reusing StylesFramework Guides - 图40

    Manage duplication and keep your projects maintainable by creating reusable abstractions.

  • Customizing the FrameworkFramework Guides - 图41

    Customize the framework to match your brand and extend it with your own custom styles.