react-classlist

1.1.2 • Public • Published

react-classlist

A simple class list to use in React projects.

Compatible with TailwindCSS

Usage

import { ClassList } from 'react-classlist'

export default function Component() {

  const classes = new ClassList('container whitebg')

  classes.add('redtext')

  classes.add('highscore', score > 100)

  return (
    <div className={classes}>

    </div>
  )
}

Installation

npm i react-classlist

Testing

npm run test

Coverage: 100%

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i react-classlist

    Weekly Downloads

    9

    Version

    1.1.2

    License

    ISC

    Unpacked Size

    5.03 kB

    Total Files

    4

    Last publish

    Collaborators

    • rzbin