Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

nuxt-atomizer

dword-design90MIT2.0.2

Module that adds ACSS atomic CSS framework (aka Atomizer) support to a Nuxt.js app. Generates atomic classes from code.

atomic-css, nuxtjs, acss, atomizer, nuxt-module

readme

nuxt-atomizer

npm version Linux macOS Windows compatible Build status Coverage status Dependency status Renovate enabled
Open in Gitpod Buy Me a Coffee PayPal Patreon

Module that adds ACSS atomic CSS framework (aka Atomizer) support to a Nuxt.js app. Generates atomic classes from code.

Install

# npm
$ npx nuxi module add nuxt-atomizer

# Yarn
$ yarn nuxi module add nuxt-atomizer

Usage

Add the module to your Nuxt.js modules list in nuxt.config.js:

export default {
  modules: [
    'nuxt-atomizer',
  ],
}

That's already it, now you can add atomic classes to your components and they are generated on the fly!

<template>
  <div class="P(2rem) Bgc(#fafafa) C(#111) Bd Bdw(2px) Bdc(#ccc) Bdrs(.5rem) Ff(ss)">
    Hey there, I'm styled with ACSS! 🙌
  </div>
</template>

Here is the result:

Screenshot of a box with rounded corners, displaying the text 'Hey there, I'm styled with ACSS! 🙌'

Also check out the demo at CodeSandbox.

Options

You can customize Atomic CSS by adding options either to the module, the top-level atomizer options object or an atomizer.config.js file. The merge order is the following: module > top-level > atomizer.config.js.

export default {
  modules: [
    ['nuxt-atomizer', {
      breakPoints: {
        sm: '@media screen(min-width=750px)',
        md: '@media(min-width=1000px)',
        lg: '@media(min-width=1200px)'
      },
      custom: {
        primary: 'red',
      },
    }],
  ],
  atomizer: {
    /* options */
  },
}
<template>
  <div class="C(primary)">I am red now</div>
</template>

Contribute

Are you missing something or want to contribute? Feel free to file an issue or a pull request! ⚙️

Support

Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:

Buy Me a Coffee  If you want to send me a one time donation. The coffee is pretty good 😊.
PayPal  Also for one time donations if you like PayPal.
Patreon  Here you can support me regularly, which is great so I can steadily work on projects.

Thanks a lot for your support! ❤️

See also

  • nuxt-mail: Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.
  • nuxt-route-meta: Adds Nuxt page data to route meta at build time.
  • nuxt-mermaid-string: Embed a Mermaid diagram in a Nuxt.js app by providing its diagram string.
  • nuxt-content-git: Additional module for @nuxt/content that replaces or adds createdAt and updatedAt dates based on the git history.
  • nuxt-babel-runtime: Nuxt CLI that supports babel. Inspired by @nuxt/typescript-runtime.

License

MIT License © Sebastian Landwehr

changelog

2.0.2 (2025-05-29)

Bug Fixes

2.0.1 (2024-10-03)

Bug Fixes

2.0.0 (2024-08-18)

Bug Fixes

  • lock file maintenance (#93) (e31ab1b)
  • update dependency postcss to v8.4.24 (66c277c)

BREAKING CHANGES

  • node.js >= 18
  • migrate to esm nuxt 3 support

1.1.40 (2023-04-07)

Bug Fixes

  • update dependency with-local-tmp-dir to v4.1.0 (9326f33)

1.1.39 (2023-04-07)

Bug Fixes

  • update dependency serve-static to v1.15.0 (a9f4f47)

1.1.38 (2023-03-25)

Bug Fixes

  • update dependency @dword-design/functions to v4.1.0 (a1f166b)

1.1.37 (2023-03-25)

Bug Fixes

  • update dependency fs-extra to v10.1.0 (9c98c6f)

1.1.36 (2023-03-24)

Bug Fixes

  • update dependency postcss to v8.4.21 (1144855)

1.1.35 (2022-01-12)

Bug Fixes

1.1.34 (2022-01-04)

Bug Fixes

1.1.33 (2021-10-05)

Bug Fixes

  • update dependency axios to ^0.22.0 (dca69fd)

1.1.32 (2021-07-20)

Bug Fixes

1.1.31 (2021-07-18)

Bug Fixes

1.1.30 (2021-07-18)

Bug Fixes

  • adjust screenshot image (6b79c73)
  • write GitHub metadata to package.json [description] (d0724a1)

1.1.29 (2021-07-18)

Bug Fixes

1.1.28 (2021-07-18)

Bug Fixes

1.1.27 (2021-07-18)

Bug Fixes

1.1.26 (2021-07-18)

Bug Fixes

1.1.25 (2021-07-18)

Bug Fixes

  • adjust options doc (fffb420)
  • vue file support and make project open-source (4b5ae6b)

1.1.24 (2021-07-18)

Bug Fixes

  • update config files (09cac39)
  • write GitHub metadata to package.json [description, keywords] (a06f918)

1.1.23 (2021-07-06)

Bug Fixes

1.1.22 (2021-06-14)

Bug Fixes

1.1.21 (2021-05-28)

Bug Fixes

1.1.20 (2021-05-04)

Bug Fixes

  • update dependency depcheck-package-name to v2 (#39) (426ed69)
  • update dependency fs-extra to v10 (#40) (4567980)
  • update dependency with-local-tmp-dir to v4 (#41) (65143de)

1.1.19 (2021-05-03)

Bug Fixes

  • update dependency @dword-design/functions to v4 (#38) (914bec3)

1.1.18 (2021-05-03)

Bug Fixes

  • update dependency @dword-design/base to v8 (#37) (dab0eb6)

1.1.17 (2021-04-28)

Bug Fixes

  • updated package.json[description] (#34) (4d1638b)

1.1.16 (2021-04-27)

Bug Fixes

  • update dependency with-local-tmp-dir to v3 (#31) (19e6def)

1.1.15 (2021-04-22)

Bug Fixes

1.1.14 (2021-04-21)

Bug Fixes

1.1.13 (2021-04-12)

Bug Fixes

1.1.12 (2021-03-31)

Bug Fixes

1.1.11 (2021-03-23)

Bug Fixes

  • update dependency @dword-design/functions to v3 (#22) (f94a5e6)

1.1.10 (2021-03-22)

Bug Fixes

1.1.9 (2021-03-17)

Bug Fixes

1.1.8 (2021-03-09)

Bug Fixes

  • add changed files (2ccfc75)
  • update dependency nuxt to ~2.15.0 (bc01c84)

1.1.7 (2021-02-17)

Bug Fixes

1.1.6 (2021-02-17)

Bug Fixes

1.1.5 (2021-02-17)

Bug Fixes

1.1.4 (2020-12-10)

Bug Fixes

  • replace get-package-name with depcheck-package-name (f5c88b0)

1.1.3 (2020-12-10)

Bug Fixes

  • deps: update dependency axios to ^0.21.0 (4b4f95d)

1.1.2 (2020-12-02)

Bug Fixes

  • config: Update changed files (26638f3)

1.1.1 (2020-08-23)

Bug Fixes

1.1.0 (2020-03-21)

Bug Fixes

Features

1.0.2 (2020-03-19)

Bug Fixes

  • deps: update dependency fs-extra to v9 (428fd53)

1.0.1 (2020-02-22)

Bug Fixes