---
title: "Discussion on \"Adding classes to the body of a NextJS application\" | Hashnode"
description: "Discussion on \"Adding classes to the body of a NextJS application\". If you want to add a class (className) to the body tag of a a NextJS page, you'll need to add it via JavaScript in the useEffect (or componentDidMount if you're using class-based components) Lifecycle function.\nThis adds TailWindCSS's font-light and ..."
url: "https://hashnode.com/posts/adding-classes-to-the-body-of-a-nextjs-application/61f0e8f2e247b2151e6205ee"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Adding classes to the body of a NextJS application](https://anjanesh.dev/adding-classes-to-the-body-of-a-nextjs-application?utm_source=hashnode&utm_medium=feed)

If you want to add a class (className) to the body tag of a a NextJS page, you'll need to add it via JavaScript in the useEffect (or componentDidMount if you're using class-based components) Lifecycle function. This adds TailWindCSS's font-light and ...

Jan 26, 2022 · 1 min read · anjanesh.dev  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Anjanesh Lekshminarayanan](https://hashnode.com/@anjanesh)

@anjanesh · Navi Mumbai, MH

  
[View profile](https://hashnode.com/@anjanesh)

Web UI Engineer

I am a web consultant from Navi Mumbai. Mainly dealt with LAMP stack, now into Django and getting into Laravel and Cloud. Founder of nerul.in and gaali.in

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
