react-themeable is a utility library designed to simplify the process of making React components easily themeable across various styling approaches. Released as 'experimental' with its latest version 1.1.0, it aims to provide a unified API for integrating with CSS Modules, Radium, Aphrodite, React Style, JSS, global CSS, and inline styles. The library exposes a single `themeable` function that takes a theme prop and returns a helper function to apply styles based on a key and style names. Its key differentiator was its broad compatibility with many competing React styling solutions at the time of its release. However, the package was last published over 10 years ago (as of April 2026), indicating it is no longer actively maintained. Its peer dependency on React is for very old versions, making it incompatible with modern React applications.
npm install react-themeableVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate the `themeable` function within a React class component's render method to dynamically apply styles from a theme object passed via props, supporting multiple style definitions per element.
Avoid using this library in new projects. For existing projects, consider migrating to actively maintained theming solutions like Styled Components, Emotion, or CSS-in-JS libraries that offer better React compatibility and features.
Ensure the first argument to the `theme` helper function is a unique identifier (e.g., a number or string unique within its sibling elements) if Radium is part of your styling stack. Example: `<div {...theme(1, 'root')} />`This is a fundamental aspect of the library's history and cannot be 'fixed.' Users should be aware of its experimental and unmaintained nature.
This library is abandoned and not compatible with current React versions. It is strongly recommended to replace `react-themeable` with an actively maintained theming solution that supports modern React, such as Context API-based solutions, Styled Components, Emotion, or Material-UI's theming.
Use a default import: `import themeable from 'react-themeable';`. Avoid named imports like `import { themeable } from 'react-themeable';`