antd 5.0.0
🏆 Ant Design 5.0.0 is out!
Read it before migration
🌟 If you want to migrate to Ant Design 5.0, please check V4 to V5.
Major Changes
- 🔥 New Components
- 🔥 FloatButton component, and refactor BackTop as child component of FloatButton. #37520 @li-jia-nan
- 🔥 Tour component. #37867 #38469 @heiyu4585
- 🔥 New Component Variants
- 🔥 DatePicker add
presetsto support preset ranges for quick selection. #38249 - 🔥 Progress
circletype support responsiveformattext for small size. #38231 @li-jia-nan - 🔥 Steps add
inlinetype. #38311 @JarvisArt
- 🔥 DatePicker add
- 💄 New Design
- 💄 Change primary color to
#1677ff. #37254 - 💄 Change basic border radius to
6px, and support gradient radius. #37146 #37369 - 💄 Optimize transition duration. #37438
- 💄 Optimize padding and remove border for some components. #37283
- 💄 Optimize focus style for some components. #37483
- 💄 Optimize style with large border radius.
- 💄 Optimize Switch transition. #37658
- 💄 Optimize Anchor ink ball style. #38616
- 💄 Change primary color to
- 🆕 Export object
themewhich contains hooks and algorithms related with theme. #36302 - 🆕 ConfigProvider support
themeprop to modify theme configuration. For more: Customize Theme. - 🆕 Add
localedirectory in package, which contains commonjs locale files. #38194 @chunsch - 🗑 Do not support IE browser anymore.
- 🗑 Remove package
antd/lib. #36362- 🛠 Change
maininpackage.jsontodist/antd.js. eb8835f
- 🛠 Change
- 🗑 Remove
dist/antd.css, and adddist/reset.cssto override common styles. #36224 - 🗑 Deprecate
visibleand provideopeninstead in components below. @yykoypj- 🗑 Tag deprecate
visible. #36671 - 🗑 Table deprecate
filterDropdownVisibleand providefilterDropdownOpen. #36747 - 🗑 Drawer deprecate
visibleand provideopeninstead. #36750 - 🗑 Modal deprecate
visibleand provideopeninstead. #36774 - 🗑 Dropdown deprecate
visibleand provideopeninstead. #36799 - 🗑 Tooltip deprecate
visibleand provideopeninstead, Popover and Popconfirm. #36807
- 🗑 Tag deprecate
- 🗑 Deprecate
dropdownClassNameand providepopupClassNameinstead in components below. @heiyu4585- 🗑 AutoComplete deprecate
dropdownClassNameand providepopupClassNameinstead. #37087 - 🗑 Mentions deprecate
dropdownClassNameand providepopupClassNameinstead. #37122 - 🗑 Cascader deprecate
dropdownClassNameand providepopupClassNameinstead. #37089 - 🗑 Select deprecate
dropdownClassNameand providepopupClassNameinstead. #37091 - 🗑 TreeSelect deprecate
dropdownClassNameand providepopupClassNameinstead. #37092 - 🗑 DatePicker and TimePicker deprecate
dropdownClassNameand providepopupClassNameinstead. #37207
- 🗑 AutoComplete deprecate
- 🛠 Refactor styles with CSS-in-JS for all components.
- 🗑 Remove less and css in package. #36244
- 🛠 Change date library from Moment.js to Day.js, for more: Use custom date library. b22815d @iamkun
- 🛠 React Notification to support React 18 concurrent mode and refactor useNotification hook,which is preferred instead of static function. #35423 #35568
- 🛠 Slider props related with Tooltip are unified into
tooltip. #37043 @yykoypj - 🛠 Migrate official site to dumi@2. #38328
- 🏆 Ant Design 5.0.0 已发布!欢迎阅读我们的 发布文档。 升级必读
- 🌟 如果你想升级到 Ant Design 5.0,请仔细查阅我们的迁移文档。 主要变化
- 🔥 新增组件
- 🔥 FloatButton 悬浮按钮,原 BackTop 移至 FloatButton 子组件。#37520 @li-jia-nan
- 🔥 Tour 漫游式引导。#37867 #38469 @heiyu4585
- 🔥 新增组件变体
- 🔥 DatePicker 新增
presets属性用于预设时间范围快捷选择。#38249 - 🔥 Progress
circle类型支持小尺寸自适应。#38231 @li-jia-nan - 🔥 Steps 新增
inline类型。#38311 @JarvisArt
- 🔥 DatePicker 新增
- 💄 设计变化
- 🆕 新增导出对象
theme,用于获取主题相关属性。#36302 - 🆕 ConfigProvider 新增
theme属性,用于更改主题配置,详情:定制主题。 - 🆕 产物新增
locale目录,内含 cjs 格式的语言文件。#38194 @chunsch - 🗑 移除对 IE 的支持。
- 🗑 移除
lib产物。#36362- 🛠 调整
package.json中main为dist/antd.js。eb8835f
- 🛠 调整
- 🗑 移除
dist/antd.css产物。默认不再入侵全局样式,新增dist/reset.css用于重置部分常见样式。#36224 - 🗑 废弃下列组件的
visible属性,改用open。@yykoypj - 🗑 废弃下列组件的
dropdownClassName,统一为popupClassName。@heiyu4585- 🗑 AutoComplete 废弃
dropdownClassName,改用popupClassName。#37087 - 🗑 Mentions 废弃
dropdownClassName,改用popupClassName。#37122 - 🗑 Cascader 废弃
dropdownClassName,改用popupClassName。#37089 - 🗑 Select 废弃
dropdownClassName,改用popupClassName。#37091 - 🗑 TreeSelect 废弃
dropdownClassName,改用popupClassName。#37092 - 🗑 DatePicker 和 TimePicker 废弃
dropdownClassName,改用popupClassName。#37207
- 🗑 AutoComplete 废弃
- 🛠 所有组件使用 CSS-in-JS 重构样式。
- 🗑 移除 less 及相关 less 和 css 产物。#36244
- 🛠 内置时间库由 Moment.js 替换为 Day.js,详情:使用自定义日期库。b22815d @iamkun
- 🛠 重构 Notification 以支持 React 18 concurrent 模式,并重构 useNotification hook,推荐替代静态方法使用。#35423 #35568
- 🛠 Slider 组件 Tooltip 相关 API 合并至
tooltip属性中。#37043 @yykoypj - 🛠 文档站技术栈迁移 dumi@2。#38328