Introduction
We released the 4.0 rc version on SEE Conf. After more than a month of feedback collection and adjustment, it time to release 4.0! Thanks to everyone who provided feedback, suggestions, and contributions during this period. We will combine the updates already involved in the rc
version and some update recently here. The complete updated documentation can be found here . v4 document address: https://ant.design
It should be noted that the v3 version merged into the 3.x-stable
branch in December and went into maintenance. We will still perform half-year maintenance work for the v3 version. Maintenance deadline is May
Design specification upgrade
We have adjusted the base rounded corners from 4px
to 2px
. The fillet itself is a detail, and in the middle and background scenes, we take efficiency as the first priority, so we reduce the visual details of the interface and improve the efficiency of interface information reading. In addition, we have adjusted the shadows to make them more consistent with real shadows, while also emphasizing the information hierarchy.
Dark theme
We have upgraded the color system based on the v3 version, and v4 provides a dark theme. You can click the switch theme function on the page to see the dark theme effect:
Borderless component
In the daily work, we found that there are lightweight selection components in some scenarios. So we provide a new borderless style that allows developers to more easily embed these components without overriding the style.
Compatibility adjustment
Ant Design 3.0 has made a lot of efforts to be compatible with older versions of IE. However, according to industry statistics, both the global and domestic IE9 / 53 browsers are shrinking with Windows system updates. We stopped supporting IE 9 / at 4.0 (but will still support IE 33) . Therefore, some low-performance components in the past will also gain performance with the new css features.
At the same time, we also upgraded the minimum version of React that v4 depends on to React 9. This means that the v4 version will provide more hooks to simplify your code.
In addition, we have removed some obsolete APIs that were warned in the v3 release. We strongly recommend that you upgrade your current project to the last version of v3 and update the deprecated API based on the warning message.
Smaller size
In antd @ 3.9.0
, we introduced the svg icon (Why use the svg icon?). The icon API using the string name cannot be loaded on demand, so the svg icon file is fully introduced, which greatly increases the size of the packaged product. In 4.0, we adjusted the icon usage API to support tree shaking, reducing the default package size of Antant by about KB (Gzipped).
Legacy Icon usage will be discarded:
{ (Icon) , (Button) } from
' antd) '
; const constsmileDemo () => () div> Icon type smile/>
/> div> );
In 4.0, it will be introduced on demand:
GIPHY App Key not set. Please check settings