Tailwindcss
⚠️ MOVED: https://github.com/svelte-add/svelte-add/ ⚠️ Add Tailwind CSS to your Svelte project
This is an adder for `svelte-add`; you should [read its `README`](https://github.com/svelte-add/svelte-add#readme) before continuing here. The project is written primarily in JavaScript, distributed under the MIT License license, first published in 2020. Key topics include: postcss, purgecss, svelte, svelte-add, svelte-kit.
This is an adder for svelte-add; you should read its README before continuing here.
➕ Adding Tailwind CSS
This adder's codename is tailwindcss, and can be used like so:
shnpx svelte-add@latest tailwindcss
🏞 Supported environments
This adder supports SvelteKit and Vite-powered Svelte apps (all the environments svelte-add currently supports).
⚙️ Options
-
forms(defaultfalse): whether or not to install and set up the Tailwind CSS Forms plugin. -
typography(defaultfalse): whether or not to install and set up the Tailwind CSS Typography plugin. -
daisyui(defaultfalse): whether or not to install and set up daisyUI as a Tailwind plugin.
shnpx svelte-add@latest tailwindcss --tailwindcss-forms --tailwindcss-typography --tailwindcss-daisyui
🛠 Using Tailwind CSS
After the adder runs,
-
You can use Tailwind utility classes like
bg-blue-700in the markup (components, routes,app.html). -
You can use Tailwind directives like
@applyand@screenor use thethemefunction in Sveltestyle lang="postcss"blocks or thesrc/app.pcssfile. -
You can configure Tailwind in the
tailwind.config.cjsfile. -
Your Tailwind CSS will be purged for production builds.
Contributors
Showing top 8 contributors by commit count.
