https://github.com/pansyjs/classnames
A simple javascript utility for conditionally joining classNames together
https://github.com/pansyjs/classnames
classnames utils
Last synced: over 1 year ago
JSON representation
A simple javascript utility for conditionally joining classNames together
- Host: GitHub
- URL: https://github.com/pansyjs/classnames
- Owner: pansyjs
- License: mit
- Created: 2019-11-13T08:23:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-02-28T18:11:04.000Z (over 1 year ago)
- Last Synced: 2025-03-10T11:17:51.658Z (over 1 year ago)
- Topics: classnames, utils
- Language: TypeScript
- Size: 348 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ClassNames
> A simple javascript utility for conditionally joining classNames together
[](https://npmjs.org/package/@pansy/classnames)
[](https://npmjs.org/package/@pansy/classnames)
## ✨ 特性
* 🚀 使用TypeScript编写,提供完整的类型定义。
## 📦 安装
```
// npm
npm install @pansy/classnames --save
// yarn
yarn add @pansy/classnames
```
## 🔨 使用
```
import classNames from '@pansy/classnames';
classNames('lotus-button', {
[`is-active`]: true
})
// >> 'lotus-button is-active'
```