unocss-preset-antd
v0.0.1
Published
unocss + antd
Downloads
3
Maintainers
Readme
unocss-preset-antd
WIP
This preset will help you make antd and unocss work together. Based on unocss-perset-theme.
Installation
npm i -D unocss-preset-antd
Usages
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.
Options
You can a options object to the preset.
prefix
This option is extended from unocss-perset-theme. Defaults to --un-preset-antd
.
selectors
This option is extended from unocss-perset-theme and use its default value.
lightBackgroundColor
Used to generate light theme colors. Defaults to #ffffff
.
darkBackgroundColor
Used to generate dark theme colors. Defaults to #141414
.
primary
Base primary color. Defaults to #1677ff
.
If you are using antd@4
, you can override it with #1890ff
.
success
Base success color. Defaults to #52c41a
.
warning
Base warning color. Defaults to #faad14
.
error
Base error color. Defaults to #ff4d4f
.
If you are using antd@4
, you can override it with #f5222d
.
info
Base info color. Defaults to #1677ff
.
If you are using antd@4
, you can override it with #1890ff
.
License
MIT License