Skip to content

classSet is a Javascript library to create CSS class strings out of arbitrary parameters.

Notifications You must be signed in to change notification settings

awnist/classSet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is "class-set"?

class-set is a Javascript library to create CSS class strings out of arbitrary parameters.

This is a conceptual extension of React's classSet.

The primary difference is that you can supply an arbitrary number of arguments with mixed types, and each will be evaluated.

Example

var classSet = require('class-set');
classes = classSet({ one: true, two: true, nope: false }, "three", null, "four");
// classes is now "one two three four"

Installation

via npm:

$ npm install class-set

class-set is licensed under MIT.

About

classSet is a Javascript library to create CSS class strings out of arbitrary parameters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published