# @types/react-css-modules

> TypeScript definitions for react-css-modules

Latest version **4.6.8** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-css-modules
pnpm add @types/react-css-modules
yarn add @types/react-css-modules
bun add @types/react-css-modules
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.6.8 |
| Published | 2023-11-07 |
| First published | 2016-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-css-modules
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-css-modules
- npm.io page: https://npm.io/package/@types/react-css-modules

## Recent versions

- 4.6.8 (latest) — 2023-11-07
- 4.6.5 (ts4.3) — 2023-08-25
- 4.6.4 (ts3.6) — 2021-07-08
- 4.6.3 (ts3.5) — 2021-05-07
- 4.6.2 (ts2.8) — 2018-08-04
- 4.6.1 (ts2.6) — 2018-02-12
- 4.6.0 (ts2.3) — 2017-10-25
- 4.2.0 (ts2.1) — 2017-04-27
- 3.7.5 (ts2.0) — 2016-11-03
- 4.6.7 — 2023-10-18
- 4.6.6 — 2023-09-27
- 4.2.1 — 2017-06-23
- 3.7.6 — 2017-02-14
- 3.7.4 — 2016-10-05
- 3.7.3 — 2016-09-19
- … 2 more at https://npm.io/package/@types/react-css-modules/versions

## README

# Installation
> `npm install --save @types/react-css-modules`

# Summary
This package contains type definitions for react-css-modules (https://github.com/gajus/react-css-modules).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-css-modules.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-css-modules/index.d.ts)
````ts
interface TypeOptions {
    allowMultiple?: boolean | undefined;
    handleNotFoundStyleName?: "throw" | "log" | "ignore" | undefined;
}

type StylesObject = any;

interface CSSModules {
    (defaultStyles: StylesObject, options?: TypeOptions): <C extends Function>(Component: C) => C;
    <C extends Function>(Component: C, defaultStyles: StylesObject, options?: TypeOptions): C;
}

declare namespace CSSModules {
    // Extend your component's Prop interface with this one to get access to `this.props.styles`
    //
    // interface MyComponentProps extends CSSModules.InjectedCSSModuleProps {}
    interface InjectedCSSModuleProps {
        styles?: StylesObject | undefined;
    }
}

declare let CSSModules: CSSModules;

export = CSSModules;

declare module "react" {
    interface Attributes {
        styleName?: string | undefined;
    }
    interface HTMLAttributes<T> {
        styleName?: string | undefined;
    }
    interface SVGAttributes<T> {
        styleName?: string | undefined;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Kostya Esmukov](https://github.com/KostyaEsmukov), and [Tadas Dailyda](https://github.com/skirsdeda).

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