Skip to content

Next.js with Yumma CSS

Integrate Yumma CSS into Next.js applications.

Creating a new project

To create a new Next.js project, you need run the create next app command in your terminal.

  1. Install Yumma CSS

    Terminal
    pnpm add yummacss -D
  2. Initialize configuration

    Create a configuration file in your project.

    Terminal
    pnpx yummacss init
  3. Set up configuration

    Specify the locations of all your project files in the config file.

    yumma.config.mjs
    export default = {
    source: ["./app/**/*.{ts,tsx}"],
    output: "./app/globals.css",
    buildOptions: {
    reset: true,
    minify: false,
    }
    };
  4. Build styles

    You can now start generating your CSS with the build or watch command.

    Terminal
    pnpx yummacss build
  5. Done!

    You’re all set to start using Yumma CSS utility classes in your project.

    page.tsx
    export default function Home() {
    return (
    <div className="bg-indigo-12 d-g h-dvh pi-c tc-white">
    <h1 className="fs-3xl fw-500">Yumma CSS ⚙️ Next.js</h1>
    </div>
    );
    }