More Premium Hugo Themes Premium React Themes

Themed Jss

Themed JSS styles

Themed Jss

Themed JSS styles

Author Avatar Theme by loreanvictor
Github Stars Github Stars: 11
Last Commit Last Commit: Jan 19, 2021 -
First Commit Created: Apr 29, 2023 -
Themed Jss screenshot

Overview:

The themed-jss is a library that offers theme-based styling using JSS. It integrates with callbag-jsx and React and provides automatic dark mode support. The library is type safe and can be used with other frameworks or without any frameworks.

Features:

  • Theme-based styling based on JSS: Allows you to create styles based on a theme object.
  • Integrates with callbag-jsx and React: Can be used with callbag-jsx renderers and React components.
  • Automatic dark mode support: Provides automatic dark mode detection and injection of additional CSS rules.
  • Type safe: Allows you to specify the theme object type, theme argument, this argument, and the theme type for components.

Installation:

To use themed-jss, follow these steps:

  1. Install the themed-jss package using npm:
npm install themed-jss
  1. Import the themed-jss library in your project:
import { createThemedJss } from 'themed-jss';
  1. Create your styles based on a theme:
const theme = {
  primaryColor: 'red',
  secondaryColor: 'blue',
};

const styles = {
  button: {
    backgroundColor: theme.primaryColor,
    color: theme.secondaryColor,
  },
};
  1. Use the theme object to add your styles to the document:
const themedJss = createThemedJss();

themedJss.add(styles);

Summary:

Themed-jss is a library that provides theme-based styling using JSS. It integrates with callbag-jsx and React and offers automatic dark mode support. The library is type safe, allowing you to specify the theme object type and other type requirements. Overall, it provides a convenient and flexible way to style your components based on themes.