# @stefanoruth/classnames

> A simple classnames javascript utility function for combining conditional classnames together.

Latest version **1.1.1** (published 2021-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @stefanoruth/classnames
pnpm add @stefanoruth/classnames
yarn add @stefanoruth/classnames
bun add @stefanoruth/classnames
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-01-28 |
| First published | 2020-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stefano Ruth |
| Maintainers | stefanoruth |

## Links

- npm: https://www.npmjs.com/package/@stefanoruth/classnames
- Repository: https://github.com/stefanoruth/classnames
- Homepage: https://github.com/stefanoruth/classnames#readme
- Issues: https://github.com/stefanoruth/classnames/issues
- npm.io page: https://npm.io/package/@stefanoruth/classnames

## Recent versions

- 1.1.1 (latest) — 2021-01-28
- 1.1.0 — 2021-01-22
- 1.0.1 — 2020-12-18
- 1.0.0 — 2020-12-18

## README

# Classnames

A simple classnames javascript utility function for combining conditional classnames together.

![npm](https://img.shields.io/npm/v/@stefanoruth/classnames)
![npm](https://img.shields.io/npm/dt/@stefanoruth/classnames)
![Build & Tests](https://github.com/stefanoruth/classnames/workflows/Build%20&%20Tests/badge.svg)

## Installation

```sh
# npm
npm install @stefanoruth/classnames

# Yarn
yarn add @stefanoruth/classnames
```

## Example

```tsx
import React from 'react
import { css } from '@stefanoruth/classnames'

export const Card = props => {
    return <div className={css('bg-white w-full shadow rounded', props.spacing && 'px-4 py-6' props.className)}>{props.children}</div>
}
```

---
_Source: https://npm.io/package/@stefanoruth/classnames · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
