JedWatson/classnames
View on GitHub ↗ ★ 17,769 JavaScript
A simple javascript utility for conditionally joining classNames together
7 mentions on Hacker News by 7 people: 2 stories, 5 comments · first 2016-02-09 · latest 2022-10-21
20082026
-
…https://github.com/tailwindlabs/prettier-plugin-tailwindcss Tailwind combined with classnames ( https://github.com/JedWatson/classnames ) makes it really easy to have conditional styling based on component state.
comment by dkryptr · 2022-10-21 · in Tailwind CSS v3.2 – Introducing Container Queries, Multiple Configs and More -
Another advantage of camelCase is that classNames ( https://github.com/JedWatson/classnames ) works without quoting: // you have a variable isFoo <SomeComponent className={classNames({isFoo})} /> is a lot better than: // you have a…
comment by stickfigure · 2022-01-13 · in A small guide for naming stuff in front-end code -
…a component with conditional styling I use classNames and use props that correspond to classes. https://github.com/JedWatson/classnames
comment by ludlu · 2018-11-02 · in Tailwind: style your site without writing any CSS -
…to see the dumb dependencies that these projects have https://github.com/sindresorhus/arrify https://github.com/JedWatson/classnames
comment by siftikha · 2018-10-17 · in Evergreen: a React UI Framework built by Segment -
…can be activated using component state. This provides a viable solution for Structure & Style. [0] https://github.com/JedWatson/classnames
comment by crudbug · 2016-11-28 · in Show HN: Antd – A set of high-quality React components