Giter Site home page Giter Site logo

ant-design / ant-design-dark-theme Goto Github PK

View Code? Open in Web Editor NEW
481.0 481.0 33.0 38 KB

🌚 Dark theme variables of Ant Design

Home Page: https://www.antdtheme.com/dark

License: MIT License

JavaScript 45.25% TypeScript 54.75%
ant-design ant-design-pro antd dark-theme less

ant-design-dark-theme's Introduction

Ant Design

An enterprise-class UI design language and React UI library.

CI status codecov NPM version NPM downloads

FOSSA Status

Follow Twitter Renovate status dumi Issues need help

Changelog · Report Bug · Request Feature · English · 中文

Performance Stats of ant-design/ant-design - Last 28 days

✨ Features

  • 🌈 Enterprise-class UI designed for web applications.
  • 📦 A set of high-quality React components out of the box.
  • 🛡 Written in TypeScript with predictable static types.
  • ⚙️ Whole package of design resources and development tools.
  • 🌍 Internationalization support for dozens of languages.
  • 🎨 Powerful theme customization based on CSS-in-JS.

🖥 Environment Support

  • Modern browsers
  • Server-side Rendering
  • Electron
Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Electron
Electron
Edge last 2 versions last 2 versions last 2 versions last 2 versions

📦 Install

npm install antd
yarn add antd
pnpm add antd

🔨 Usage

import { Button, DatePicker } from 'antd';

export default () => (
  <>
    <Button type="primary">PRESS ME</Button>
    <DatePicker placeholder="select date" />
  </>
);

🔗 Links

⌨️ Development

Use Gitpod, a free online dev environment for GitHub.

Open in Gitpod

Or use opensumi.run, a free online pure front-end dev environemt.

opensumi.run

Or clone locally:

$ git clone [email protected]:ant-design/ant-design.git
$ cd ant-design
$ npm install
$ npm start

Open your browser and visit http://127.0.0.1:8001 , see more at Development.

🤝 Contributing PRs Welcome

Active Contributors of ant-design/ant-design - Last 28 days

Let's build a better antd together.

We welcome all contributions. Please read our Contributing Guide first. You can submit any ideas as Pull Requests or as GitHub Issues. If you'd like to improve code, check out the Development Instructions and have a good time! :)

If you are a collaborator, please follow our Pull Request Principle to create a Pull Request with our Pull Request Template.

Let's fund issues in this repository

❤️ Sponsors and Backers

ant-design-dark-theme's People

Contributors

afc163 avatar chenshuai2144 avatar dependabot-preview[bot] avatar depfu[bot] avatar gzgogo avatar ycjcl868 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ant-design-dark-theme's Issues

Instructions when using with create-react-app and react-app-rewired

I am following the official instructions with create-react-app and have ant integrated.
I currently override them variables using the customize theme info given here
https://ant.design/docs/react/use-with-create-react-app#Customize-Theme
using addLessLoader and config-overrides.js

If I follow instructions the usage instructions for dark theme in this case they dont work.
import darkTheme from '@ant-design/dark-theme';

// webpack.config.js: less-loader
{
loader: 'less-loader',
options: {
modifyVars: darkTheme,
},
},

Can you please help.

Problem about circular dependency

I clone antd and try to modify some component

Then, I found antd require antd-pro-merge-less
antd-pro-merge-less require @ant-design/dark-theme, and then @ant-design/dark-theme require antd.

Yeah, When i try to run node ./scripts/generate-color-less in antd, its throw

Error: Cannot find module 'antd/dist/dark-theme'

@ant-design/dark-theme not install antd, because its a devDependency.

How can i fix it?
Thanks for your reply

Is this ready to use?

Hey - the README indicates this is experimental software. Would using it in a project be fine? When will it be okay to use?

Looks great, by the way!

dark theme is overriding my classes

<Wrapper className="onyx-layout">

.onyx-layout { min-height: 100vh; background-color: #000; }

implemented dark-theme using craco

const CracoLessPlugin = require("craco-less");
const darkTheme = require("@ant-design/dark-theme");

module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            modifyVars: darkTheme,
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
};

now it is.

Pasted_Image_8_2_20__9_55_AM

Description List Title field text

The CSS for Description list title field needs to be changed for better contrast. It is barely visible with the dark theme.

Thank you.

Usage instructions for Yarn ?

Usage instructions for Yarn / react-app-rewired?

import darkTheme from '@ant-design/dark-theme';

Gives

SyntaxError: Unexpected token import

[RFC] add index.less

多一种引用方式。

写一个脚本,自动通过 index.ts -> index.less

Buffer报错

(node:8084) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(),
or Buffer.from() methods instead.

config-overrides.js 中直接配置darkTheme无法生效

`const {
override,
fixBabelImports,
addLessLoader,
} = require("customize-cra");

const darkTheme = require("@ant-design/dark-theme");

process.env.GENERATE_SOURCEMAP = "false"; //打包时去除map文件
module.exports = override(
fixBabelImports("import", {
libraryName: "antd",
libraryDirectory: "es",
style: true // change importing css to less
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: darkTheme
})
);`

Changing theme dynamically

If I wanted to toggle my React app's theme by pressing a button in the app, without restarting my web server, would that be possible?

Website does not work?

Hi -- just wanted to preview the dark theme and there are quite a few errors....

The top bar:
Screen Shot 2020-01-12 at 5 52 40 PM

Tag dropdown:
Screen Shot 2020-01-12 at 5 54 11 PM

Form labels:
Screen Shot 2020-01-12 at 5 56 33 PM

Perhaps it's from this console error??:
Screen Shot 2020-01-12 at 5 55 29 PM

I'm a bit confused... there seems to be quite a few issues... Is this a public release or is this still in beta?

I am on Chrome Version 79.0.3945.117 (Official Build) (64-bit) and Mac OS Catalina. I cleared storage (like advised) and that didn't fix anything...

menu-item-boundary-margin 为啥是0

翻了半天,终于找到是这个库导致变量不对,一开始以为是引用了compact.css,查找后发现是这里覆盖的,正常的antdcss和darkcss都设成8,只有compack才0

How to enable in Electerm?

Hello, I install theme two times but it's now visible in Electerm. How to import that theme?
Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.