---
title: "Discussion on \"Scalable Theming With Styled-Components and TypeScript in React (Next.js)\" | Hashnode"
description: "Discussion on \"Scalable Theming With Styled-Components and TypeScript in React (Next.js)\". Strongly typed theming with CSS-in-JS"
url: "https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66"
---

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

Discussion

# [Scalable Theming With Styled-Components and TypeScript in React (Next.js)](https://johnpels.hashnode.dev/scalable-theming-with-styled-components-and-typescript-in-react-nextjs?utm_source=hashnode&utm_medium=feed)

Strongly typed theming with CSS-in-JS

Nov 30, 2022 · 7 min read · johnpels.hashnode.dev  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#styled-components](https://hashnode.com/tag/styled-components)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#css](https://hashnode.com/tag/css)

## Written by

[John O. Emmanuel](https://hashnode.com/@john_pels)

@john\_pels · Ibadan, Oyo state, Nigeria.

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

Senior Software Engineer | Mobile & Web Specialist

A Versatile Senior Software Engineer with over 5 years of expertise in full-stack development, focusing on React, React-Native, Node.js, Golang, and TypeScript ecosystems. Demonstrated success in spearheading remote teams and architecting high-performance, scalable web and mobile applications. Exceptional communicator skilled in fostering collaboration across diverse time zones and cultural backgrounds. Committed to driving innovation and operational excellence in distributed work environments.

## Responses 4

Markdown supported · ⌘↵ to post

[Christopher Fenos](https://hashnode.com/@Cristobalovo)

[Dec 28, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/63ac795b9d66ff1e4d9ee19d)

Great article, but my question is where is the defaultTheme variable defined in the app.tsx… is it from the global typescript module you made?

[John O. Emmanuel](https://hashnode.com/@john_pels)

[Dec 28, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/63ac795b9d66ff1e4d9ee19d#reply-63ac91009d66ff1e4d9ee4fa)

Hi Christopher, defaultTheme is defined in @types/styled.d.ts and yeah it's a global typescript module.

[Christopher Fenos](https://hashnode.com/@Cristobalovo)

[Dec 29, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/63ac795b9d66ff1e4d9ee19d#reply-63ad11155783d419f05cd6ff)

[John O. Ajeigbe](https://hashnode.com/@john_pels) thanks John

[Alexander Christrup](https://hashnode.com/@AlexanderLC)

[Dec 19, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/63a025b6052fc36d4a8f9156)

Thank you for sharing John!

Super useful insights for a not-so-advanced CSS enthusiast like me.

Best, Alex

[John O. Emmanuel](https://hashnode.com/@john_pels)

[Dec 22, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/63a025b6052fc36d4a8f9156#reply-63a3c6b9f7fa1fc0ce9eb777)

Thanks Alex

[Callam Woolgar](https://hashnode.com/@Woogy)

[Dec 8, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/6391beb50771b6e5cf4a7c58)

Great info! I've just started out learning react so this is extremely helpful

[John O. Emmanuel](https://hashnode.com/@john_pels)

[Dec 22, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/6391beb50771b6e5cf4a7c58#reply-63a3c6b2f7fa1fc0ce9eb773)

Thanks Callam

[Lovepreet Singh](https://hashnode.com/@Singh5713)

[Dec 2, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/63899c90cb6c7e68f02ea52e)

Isn't styled-components CSS only with parameter passing and nested styling enabled? Or is it more than that?

Kindly checkout my blog too and suggest any improvements.

[John O. Emmanuel](https://hashnode.com/@john_pels)

[Dec 22, 2022](https://hashnode.com/posts/scalable-theming-with-styled-components-and-typescript-in-react-nextjs/638717280ea96fa74d111b66/comment/63899c90cb6c7e68f02ea52e#reply-63a3c6a8f67b03c0a9633d5a)

Nope! there's more to it!
