logoAnt Design X

DesignDevelopmentComponentsX MarkdownX SDKPlayground
  • Introduction
  • Code Examples
  • Streaming Rendering
  • Themes
  • Plugins
    • Overview
    • Latex
    • HighlightCode
    • Mermaid
    • CustomPlugins
    • Theme & Locale
  • Components
    • Think
    • DataChart
    • Custom Component

Theme & Locale

Resources

Ant Design
Ant Design Charts
Ant Design Pro
Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Web3
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community

Use XProvider for global configuration of plugin theme and internationalization.

Usage

XProvider leverages React's context feature, so you only need to wrap your app once for global effect. XProvider extends antd's ConfigProvider and provides global configuration for components in @ant-design/x. If you are already using antd's ConfigProvider, please update your code as follows:

diff
- import { ConfigProvider } from 'antd';
+ import { XProvider } from '@ant-design/x';
const App = () => (
- <ConfigProvider>
+ <XProvider>
<YourApp />
- </ConfigProvider>
+ </XProvider>
);

Code Example

Locale
CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Theme
CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Change locale of components:
ColorBgTitle: