This project is made to reduce the pain when adding AntdDesign to NextJs projects. You can just clone the project and boom you get the basic barebones for setting up Antd with NextJs.
- Theme is fully customizable and it support both light and dark color modes.
- Both color modes can be dynamically changed without restarting the developement server.
- next-with-less (optional)
- react-css-theme-switcher (required)
Just clone the repo and run
yarn installto install all dependencies for the project.
Run the development server with
yarn devOpen http://localhost:3000 with your browser to see the result.
There are two ways of customizing the theme
-
DURING DEVELOPMENT To see changes without restarting the server open
styles/themes/dark-theme.lessand customize it according to your needs. You should see your changes live. Same goes forlight-theme.lessbut just before doing it, stop the development server. Go tonext.config.jsand at line 3, changeconst pathToLessFileVariables = path.resolve("./styles/themes/dark-theme.less");to
const pathToLessFileVariables = path.resolve("./styles/themes/light-theme.less");and then make changes to your
light-theme.less. -
After making all of your changes run
npx gulp less
This will create css for both of your themes.