next-themeizer
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

Next themeizer

Package for adding "Themeizer" ecosystem interaction configuration to your next.js application.

Installation

Using npm:

$ npm install next-themeizer

Using yarn:

$ yarn add next-themeizer

Configuration

Option Required Type Description
url true string api url to load and read colors
headers false JSON object an object of headers required for reading from api
revalidate false number period in which to fetch styles (in minutes)

Add configuration to environment variables.

For example, via .env files:

// .env.local
THEMEIZER_OPTIONS={"url":"https://example.com/api/themes","revalidate":0.1,"headers":{"token":"example-token"}}

Add themeizer to your app config:

Base:

const withThemeizer = require('next-themeizer').default;

module.exports = withThemeizer({
    // next.js config
});

With next-compose-plugins:

const withThemeizer = require('next-themeizer').default;
const withPlugins = require('next-compose-plugins');

module.exports = withPlugins([
    [withThemeizer]
], nextConfig);

Usage

More about usage on main package page.

Themeizer ecosystem

  • Figma plugin "Themeizer" - plugin for changing themes in design and publishing them in the cloud;
  • themeizer - package for embedding themes from "Themeizer" Figma plugin at the server level or at build stage;
  • next-themeizer - package for adding "Themeizer" ecosystem interaction configuration to your next.js application;
  • themeizer-cli - a package to automatically replace published colors (as well as linear and radial gradients) in style files with a css variable;
  • stylelint-themeizer - stylelint plugin for "Themeizer" ecosystem.

License

MIT

Package Sidebar

Install

npm i next-themeizer

Weekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

6.57 kB

Total Files

5

Last publish

Collaborators

  • vordgi