awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
JedWatson avatar

JedWatson/classnames

0
View on GitHub↗
17,794 stars·557 forks·JavaScript·MIT·11 views

Classnames

classnames is a JavaScript utility for conditionally joining CSS class names into a single space-separated string. It functions as a class name manager that maps boolean flags and objects to specific styles for HTML attribute assignment.

The tool resolves abstract class identifiers to computed values, facilitating integration with modular styling systems. It allows for the mapping of dynamic identifiers to scoped class names through a dedicated module resolver.

The utility processes strings, arrays, and objects to handle dynamic class name management. It includes capabilities for recursive array flattening and the removal of duplicate entries to ensure unique identifiers in the final output.

Features

  • Conditional Class Mappings - Conditionally joins strings, arrays, and objects into a single space-separated string for CSS classes.
  • Class String Joiners - Combines filtered class name fragments into a single string using whitespace as the delimiter.
  • CSS Module Resolvers - Resolves abstract class identifiers to computed values within modular styling systems.
  • Dynamic Class Management - Combines multiple strings and objects into a single class attribute for complex UI styling.
  • CSS Modules - Integrates with CSS Modules to map dynamic identifiers to scoped class names.
  • Module Resolvers - Maps abstract class identifiers to computed values when using modular styling systems.
  • CSS Class-Based Styling - Applies CSS classes to elements based on changing state or logic within a JavaScript application.
  • Abstract Class Resolution - Binds abstract class identifiers to their computed values before final string merging.
  • Conditional Joining - Conditionally joins CSS class names into a single space-separated string based on truthy values.
  • Class Mapping - Maps class names to specific module keys to resolve dynamic styles in modular systems.
  • Class Name Deduplicators - Removes repeated class entries to ensure the final output contains only unique identifiers.
  • Component Styling - Manages visual state by programmatically toggling CSS classes on frontend components.
  • Deduplication - Strips repeated entries from the final class string to ensure unique identifiers.

Star history

Star history chart for jedwatson/classnamesStar history chart for jedwatson/classnames

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does jedwatson/classnames do?

classnames is a JavaScript utility for conditionally joining CSS class names into a single space-separated string. It functions as a class name manager that maps boolean flags and objects to specific styles for HTML attribute assignment.

What are the main features of jedwatson/classnames?

The main features of jedwatson/classnames are: Conditional Class Mappings, Class String Joiners, CSS Module Resolvers, Dynamic Class Management, CSS Modules, Module Resolvers, CSS Class-Based Styling, Abstract Class Resolution.

Which projects share features with jedwatson/classnames?

Projects with overlapping indexed features include: lukeed/clsx — clsx is a JavaScript utility for constructing space-separated CSS class strings. It functions as a logic-based string… gajus/react-css-modules — This project is a utility and integration layer for mapping scoped CSS module identifiers to React components. It… reactjs/react-transition-group — This project is a transition component library for React that manages CSS animations during the mounting and… dcastil/tailwind-merge — tailwind-merge is a utility library that resolves conflicting Tailwind CSS class strings when combining multiple sets… astrit/css.gg — css.gg is a collection of visual assets providing a CSS UI icon library and an SVG icon set. It delivers vector icons… stubbornella/oocss — Object-Oriented CSS (OOCSS) is a CSS methodology and framework that structures stylesheets around reusable, composable…

Projects sharing features with Classnames

These projects share indexed features with Classnames. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • lukeed/clsxlukeed avatar

    lukeed/clsx

    9,791View on GitHub↗

    clsx is a JavaScript utility for constructing space-separated CSS class strings. It functions as a logic-based string builder that merges strings and objects into a single string by evaluating the truthiness of provided values. The utility orchestrates the generation of HTML class attributes by filtering out null or undefined values. It enables conditional styling by combining static and dynamic classes, which allows for the management of UI styling based on state or interaction. The project handles a variety of input structures, including arrays and objects, to produce a unified list of act

    JavaScript
    View on GitHub↗9,791
  • gajus/react-css-modulesgajus avatar

    gajus/react-css-modules

    5,170View on GitHub↗

    This project is a utility and integration layer for mapping scoped CSS module identifiers to React components. It functions as a wrapper and style manager that translates class names into unique local identifiers to prevent style leakage across an application. The system includes a composition tool for merging multiple CSS module identifiers on single elements and an integration layer that connects SASS, SCSS, and LESS preprocessed style maps to component markup. It covers component styling through encapsulated style mapping and the distribution of styles to child elements. The library also

    JavaScript
    View on GitHub↗5,170
  • reactjs/react-transition-groupreactjs avatar

    reactjs/react-transition-group

    10,258View on GitHub↗

    This project is a transition component library for React that manages CSS animations during the mounting and unmounting of components. It functions as a CSS class state manager and animation orchestrator, applying specific class sequences to track the entry and exit states of elements. The library coordinates the timing and sequence of multiple elements entering or leaving the screen. This includes managing synchronized group transitions for lists and triggering visual animations when switching between different URL routes. The system covers a range of transition capabilities, including stat

    JavaScript
    View on GitHub↗10,258
  • dcastil/tailwind-mergedcastil avatar

    dcastil/tailwind-merge

    5,648View on GitHub↗

    tailwind-merge is a utility library that resolves conflicting Tailwind CSS class strings when combining multiple sets of classes. It automatically detects and removes conflicting utility classes, keeping only the last class from each group that modifies the same CSS property, while preserving non-conflicting and non-Tailwind classes unchanged. The library handles complex conflict scenarios including modifier-order resolution, arbitrary value type detection, postfix modifier semantics, and asymmetric conflicts where one class group removes preceding classes from other groups but not vice versa

    TypeScriptcsstailwindcssutility-classes
    View on GitHub↗5,648
  • Compare all 30 related projects→