---
title: "Discussion on \"The story behind Tailwind's CN function\" | Hashnode"
description: "Discussion on \"The story behind Tailwind's CN function\". Seen this as a tailwind coder?\n<button\n  className={cn(\"px-4 py-2 rounded\", {\n    \"bg-blue-500 text-white\": isPrimary,\n    \"bg-gray-200 text-gray-800\": !isPrimary,\n  })}\n>\n  Click me\n</button>\n\nHave you ever wondered why everyone is using the cn func..."
url: "https://hashnode.com/posts/the-story-behind-tailwinds-cn-function/663471668401b1dc725fde84"
---

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

Discussion

# [The story behind Tailwind's CN function](https://tigerabrodi.blog/the-story-behind-tailwinds-cn-function?utm_source=hashnode&utm_medium=feed)

Seen this as a tailwind coder? <button className={cn("px-4 py-2 rounded", { "bg-blue-500 text-white": isPrimary, "bg-gray-200 text-gray-800": !isPrimary, })} > Click me </button> Have you ever wondered why everyone is using the cn func...

May 3, 2024 · 2 min read · tigerabrodi.blog  
Read the article

-   [#tailwind-css](https://hashnode.com/tag/tailwind-css)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#css](https://hashnode.com/tag/css)

## Written by

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

@tigerabrodi · Germany

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

Obsessed with crafting software.

Just a guy who loves to write code and watch anime.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
