Search code examples
reactjsantd

Ant design change the components size globally


Ant design components have an attribute called (size) where you can change the size of the component between (small, medium, large) I want to change all the component sizes to large globally

I've already tried to change the size using the theme customizer that ant design provides but didn't work

      <ConfigProvider
        theme={{
          token: {
            size: "large"
          },
        }}
      >

Solution

  • You can pass componentSize="large" prop to ConfigProvider to change component sizes globally

    <ConfigProvider componentSize='large' theme={{ ... }}></ConfigProvider