
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
@nuxtjs/tailwindcss
Advanced tools
@nuxtjs/tailwindcss is a Nuxt.js module that integrates Tailwind CSS into your Nuxt.js project. It simplifies the setup and configuration of Tailwind CSS, allowing you to quickly start using Tailwind's utility-first CSS framework in your Nuxt.js applications.
Easy Setup
By adding @nuxtjs/tailwindcss to the buildModules array in your nuxt.config.js file, you can easily set up Tailwind CSS in your Nuxt.js project.
```json
{
"buildModules": [
"@nuxtjs/tailwindcss"
]
}
```
Custom Configuration
You can customize the Tailwind CSS configuration directly in your nuxt.config.js file, allowing you to extend the default theme, add custom colors, and more.
```json
{
"tailwindcss": {
"config": {
"theme": {
"extend": {
"colors": {
"primary": "#1DA1F2"
}
}
}
}
}
}
```
PurgeCSS Integration
The module integrates PurgeCSS to remove unused CSS, optimizing your final build size. You can configure the paths to be scanned for class names in the nuxt.config.js file.
```json
{
"tailwindcss": {
"purgeCSS": {
"enabled": true,
"content": [
"./pages/**/*.vue",
"./components/**/*.vue"
]
}
}
}
```
nuxt-windicss is a Nuxt.js module that integrates Windi CSS, a utility-first CSS framework similar to Tailwind CSS. It offers faster build times and a smaller bundle size compared to Tailwind CSS.
nuxt-buefy is a Nuxt.js module that integrates Buefy, a lightweight UI component library based on Bulma. While it is not a utility-first CSS framework like Tailwind, it provides a set of ready-to-use components that can be easily customized.
nuxt-vuetify is a Nuxt.js module that integrates Vuetify, a Material Design component framework. It offers a wide range of pre-designed components and utilities, making it a good alternative for those looking for a more component-driven approach.
Enable Tailwind CSS for Nuxt ⚡️
📖 Documentation | ▶️ Play online | ✨ Release Notes
Add @nuxtjs/tailwindcss
using the Nuxt CLI to your project
npx nuxi@latest module add tailwindcss
# Using pnpm
pnpm add --save-dev @nuxtjs/tailwindcss
# Using yarn
yarn add --dev @nuxtjs/tailwindcss
# Using npm
npm install --save-dev @nuxtjs/tailwindcss
and then to the modules
section of nuxt.config.{ts,js}
export default defineNuxtConfig({
modules: [
'@nuxtjs/tailwindcss'
]
})
That's it! You can now use Tailwind classes in your Nuxt app ✨
You can contribute to this module online:
pnpm i
pnpm dev:prepare
pnpm dev
You can run docs/
locally by using pnpm docs:dev
, or to run a build:
.env
file before building the application.pnpm docs:build
pnpm docs:preview
Check out the deployment documentation for more information.
MIT - Made with 💚
v6.14.0
tailwindcss
from module (#974)FAQs
Tailwind CSS module for Nuxt
The npm package @nuxtjs/tailwindcss receives a total of 218,673 weekly downloads. As such, @nuxtjs/tailwindcss popularity was classified as popular.
We found that @nuxtjs/tailwindcss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.