# classname-mixin

> react mixin to build and apply classnames including props classNames

Latest version **1.0.2** (published 2016-04-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install classname-mixin
pnpm add classname-mixin
yarn add classname-mixin
bun add classname-mixin
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-04-14 |
| First published | 2016-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | parmactep |
| Maintainers | parmactep |
| Keywords | react, mixin, css, classes, classname, classnames |

## Links

- npm: https://www.npmjs.com/package/classname-mixin
- Repository: https://github.com/parmactep/classname-mixin
- Homepage: https://github.com/parmactep/classname-mixin#readme
- Issues: https://github.com/parmactep/classname-mixin/issues
- npm.io page: https://npm.io/package/classname-mixin

## Dependencies (1)

- [classnames](https://npm.io/package/classnames.md) ^2.2.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-04-14
- 1.0.1 — 2016-03-31
- 1.0.0 — 2016-03-31

## README

# classname-mixin

React mixin to build and apply classnames including props classNames

##Install

`npm install classname-mixin`

##Usage

```javascript
import React from 'react';
import classNameMixin from 'classname-mixin';

var SomeComponent = React.createClass({
	mixins: [classNameMixin],
	getInitialState: function() {
		return {
			someState: true
		}
	},
	render: function () {
		return <div className={this.className('component_class', {'stateful_class': this.state.someState})}>
			Some
		</div>
	}
});

ReactDOM.render(<ExampleXomponent className="outer_class"/>, document.getElementById('app'));
```
result:
```html
<div class="some_outer_class component_class stateful_class">Some</div>
```

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