Displaying 1 to 13 from 13 results

classcat - Declarative string builder for DOM className properties

  •    Javascript

Classcat is a declarative string builder for DOM className properties. Each class can be conditionally added and removed depending on the falsiness of the value it is paired with. Here is a button you can toggle on and off. Go ahead and try it online.

class-lists - A simple javascript utility for conditionally joining class names together, inspired by classNames but with a twist

  •    Javascript

A simple javascript utility for conditionally joining class names together, inspired by classNames but with a twist. Alternatively, you can simply include index.js on your page with a standalone <script> tag and it will export a global classLists method (useful if you're doing Rails), or define the module if you are using RequireJS.

react-extras - Useful components and utilities for working with React

  •    Javascript

Note that this package targets modern browsers. It's up to you to transpile if you need to support older browsers.Automatically binds your React.Component subclass methods to the instance. See the autoBind.react() docs.




react-bem-helper - react-bem-helper allows you to easily add BEM-style element and modifier classes to React elements, while hopefully making it easier to scan

  •    Javascript

A helper making it easier to name React.js components according to BEM conventions. It removes the repetition from writing the component name multiple times for elements and elements with modifier classes on them. react-bem-helper allows you to write in a similar-ish DRY fashion, taking away some of the repetition and hopefully making it easier to scan.

strclass - A ~200b library to apply CSS classes as strings from objects

  •    Javascript

strclass is an Universal Module, and can be used as a global, with AMD, CommonJS or ES Module. strclass has ~200bytes gzipped.

react-cx - Combine styles from CSS Modules with a `cx` prop.

  •    Javascript

Inspired by jareware/css-ns. Uses jedwatson/classnames under the hood. When styling components with CSS modules, you'll often need join multiple class names together before passing them to the React className prop.

class-names - Conditionally join CSS class names together - Especially useful with React

  •    Javascript

Conditionally join CSS class names together. Accepts a combination of strings and objects. Only object keys with truthy values are included. Anything else is ignored.


obj-str - A tiny (117b) library for serializing Object values to Strings.

  •    Javascript

A tiny (117b) library for serializing Object values to Strings. PS: I made this because Preact 8.0 removed this built-in behavior and I wanted a quick, drop-in replacement.

create-class-names - A utility to extend the values of a classNames object.

  •    Javascript

A utility to define an API for assigning custom classNames to nested elements in a React Component. Useful for global styles, css-modules, and css-in-js.

joinable - Join strings with built in control flow and handle separator

  •    Javascript

Join strings easily by removing the repetitive falsy checks. Construct strings like form validation, CSS classes, URLs and more. What is Joinable: A library to join strings together without the need to check if a value is a falsy like undefined.

vue-mods-names - Simple adding class names mods to all components in your vue app

  •    Javascript

Declare behavior by adding special directive v-mods-names in your template. good - is name of base class, that will join with other mods.