-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The feature or bug you are proposing
Currently, when using an Ant Design Input component in a React application where both Ant Design and the Design System coexist, the Design System's generated theme overrides some properties of the Ant Design theme.
Although Input is used as an example here, this issue applies to any Design System component that wraps Ant Design components.
The description of the bug or the rationale of your proposal
The ThemeProvider component wraps an AntThemeProvider component, which uses a function called generateAntTheme to generate a configuration for Ant Design based on an existing theme. This function allows for mapping component tokens to specific components.
For instance, in the Input component, the paddingBlock and paddingInline tokens are overridden and set to specific values to align with the Design System's Input component. While this works correctly when using only the Design System's Input component, it causes display issues when an Ant Design Input component is added to a page. Its padding values are overridden by the theme tokens, which affects the component's height and layout.
Below is a screenshot showing two Input components — one from the Design System and the other from Ant Design — illustrating how the paddingBlock and paddingInline properties impact the component height when overridden:
If the tokens are not set, the two components are correctly displayed:
In general, when creating a component that wraps Ant Design components, we should always check the effect of our theme on the Ant component.
The expected result for your bug
Design System theme should not override Ant theme.
Your environment
node:
v20.18.0
os:
Ubuntu 20.04.6 LTS

