WIP
This preset will help you make antd and unocss work together. Based on unocss-perset-theme.
npm i -D unocss-preset-antd
We use uno.config.ts
as an example below.
import { defineConfig, presetUno } from 'unocss'
import { presetAntd } from 'unocss-preset-antd'
export default defineConfig({
presets: [
presetUno(),
presetAntd(), // place after other presets, since it overrides some values by default
],
})
We recommend you to use tailwind compat reset if you are facing style conflicts.
You can a options object to the preset.
This option is extended from unocss-perset-theme. Defaults to --un-preset-antd
.
This option is extended from unocss-perset-theme and use its default value.
Used to generate light theme colors. Defaults to #ffffff
.
Used to generate dark theme colors. Defaults to #141414
.
Base primary color. Defaults to #1677ff
.
If you are using antd@4
, you can override it with #1890ff
.
Base success color. Defaults to #52c41a
.
Base warning color. Defaults to #faad14
.
Base error color. Defaults to #ff4d4f
.
If you are using antd@4
, you can override it with #f5222d
.
Base info color. Defaults to #1677ff
.
If you are using antd@4
, you can override it with #1890ff
.
MIT License