Skip to content
PluginStats

antd-theme weekly downloads statistics

By wuzekang · npm · Webpack plugins

Provide runtime dynamic theme for ant design.

View on npm Fresh · Dec 6, 2026

antd-theme has 66 recorded weekly downloads on npm, an increase of 69.2% over the past 30 days, ranking #2712 of 3,247 tracked listings.

Weekly downloads
66
Official API · Dec 5, 2026
7-day growth
-7.0%
-5 weekly downloads
30-day growth
+69.2%
+27 weekly downloads
90-day growth
+128%
+37 weekly downloads
Rank
#2712
▼ 152 in 7 days

About antd-theme

antd-theme

Provide runtime dynamic theme for ant design.

Features

  • Quick synchronous theme switching.
  • Support real-time modification of color / dimension variables.
  • Small packaging size, no need to pack multiple style files.
  • Code splitting friendly.

Install

Install with npm

$ npm install --save antd-theme

Usage

It's recommended to combine antd-theme/plugin with the css-loader and less-loader

Then add the loader and the plugin to your webpack config. For example:

webpack.config.js

const AntdThemePlugin = require('antd-theme/plugin');

module.exports = {
  module: {
    rules: [
      {
        test: /\.(j|t)sx?$/,
        use: [
          {
            loader: 'babel-loader',
            options: {
              plugins: [
                ['import', {
                  libraryName: 'antd',
                  style: true,
                }],
              ],
              presets: ['react-app'],
            },
          },
        ],
      },
      {
        test: /\.less$/i,
        use: [
          {
            loader: AntdThemePlugin.loader,
          },
          {
            loader: 'css-loader',
          },
          {
            loader: 'less-loader',
            options: {
              javascriptEnabled: true,
            },
          },
        ],
      },
    ],
  },
  plugins: [
    new AntdThemePlugin({
      // Variables declared here can be modified at runtime
      variables: ['primary-color'],
      themes: [
        {
          name: 'dark',
          filename: require.resolve('antd/lib/style/themes/dark.less'),
        },
        {
          name: 'compact',
          filename: require.resolve('antd/lib/style/themes/compact.less'),
        },
      ],
    })
  ],
};

app.jsx

import { Button, Select } from 'antd';
import { ThemeProvider, useTheme } from 'antd-theme';
import React from 'react';
import ReactDOM from 'react-dom';
import { SketchPicker } from 'react-color';

const initialTheme = {
  name: 'default',
  variables: { 'primary-color': '#00ff00' },
};

const ThemeSelect = () => {
  const [{ name, variables, themes }, setTheme] = useTheme();

  return (
    <>
      <Select
        style={{ width: 100 }}
        value={name}
        onChange={
          (theme) => setTheme({ name: theme, variables })
        }
      >
        {
          themes.map(
            ({ name }) => (
              <Select.Option key={name} value={name}>
                {name}
              </Select.Option>
            )
          )
        }
      </Select>
      <SketchPicker
        color={variables['primary-color']}
        onChange={(value) => {
          // Will update all css attributes affected by primary-color
          setTheme({ name, variables: { 'primary-color': value.hex } });
        }}
      />
    </>
  );
};

const App = () => {
  const [theme, setTheme] = React.useState(initialTheme);
  return (
    <ThemeProvider
      theme={theme}
      onChange={(value) => setTheme(value)}
    >
      <ThemeSelect />
      <Button type="primary">Button</Button>
    </ThemeProvider>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));

For those who are using react-app-rewire-less and customize-cra with react-app-rewired, enable javascript like this

config-overrides.js

const { override, fixBabelImports, addLessLoader, addPostcssPlugins, adjustStyleLoaders, addWebpackPlugin } = require('customize-cra');

const AntdThemePlugin = require('antd-theme/plugin');

module.exports = override(
  fixBabelImports('import', {
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: true,
  }),
  addLessLoader({
    javascriptEnabled: true,
  }),
  adjustStyleLoaders(
    (loaders) => {
      loaders.use[0] = {
        loader: AntdThemePlugin.loader
      }
    }
  ),
  addWebpackPlugin(
    new AntdThemePlugin({
      themes: [
        {
          name: 'dark',
          filename: require.resolve('antd/lib/style/themes/dark.less'),
        },
        {
          name: 'compact',
          filename: require.resolve('antd/lib/style/themes/compact.less'),
        },
      ],
    })
  ),
);

Security considerations

In order for style elements to be added to the DOM, a nonce attribute may need to be attached to the elements to adhere to a CSP requirements. To provide the value, you can specify the nonce value by defining a CSPSettings object on the page in global scope:

window.CSPSettings = {
  nonce: 'nonce'
};

Description from the npm listing.

  • antd
  • theme
  • less-plugin
  • webpack-plugin
  • dynamic-themes

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

antd-theme weekly downloads on npm, last 90 days: 66 weekly downloads as of Dec 5, 2026, +128% over 90 days.antd-themeWeekly downloads on npm · Last 90 days66downloads / week+128% over 90 days020406080100Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
antd-theme weekly downloads on npm, last 90 days: 66 weekly downloads as of Dec 5, 2026, +128% over 90 days.

7/30/90-day growth

antd-theme weekly downloads growth on npm: -7.0% over 7 days, +69.2% over 30 days, +128% over 90 days.antd-themeWeekly downloads growth on npm66downloads / week now7-day growth-5 weekly downloads-7.0%30-day growth+27 weekly downloads+69.2%90-day growth+37 weekly downloads+128%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
antd-theme weekly downloads growth on npm: -7.0% over 7 days, +69.2% over 30 days, +128% over 90 days.

Ranking history

antd-theme npm ranking history: currently #2712 (by weekly downloads).antd-themenpm ranking · by weekly downloads · Last 90 days#2712current rank#500#1000#1500#2000#2500#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
antd-theme npm ranking history: currently #2712 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 136, #12 (overall #2,712)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 11, #12 (overall #212)
Webpack plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for antd-theme
Date (UTC)Weekly downloadsChange vs. previous
66+2
64-10
74-5
79+17
62-2
64-6
70-1
71-5
76-15
91+12
79+7
72+8
64+2
62—

Similar npm Webpack plugins plugins

All 20 antd-theme alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/antd-theme. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.