XProvider
Provides unified global configuration for components.
Usage notes
XProvider inherits from antdv's ConfigProvider and provides global configuration for components in ant-design-x-vue.
If you are already using antdv's ConfigProvider, please make the following changes to your code:
diff
- import { ConfigProvider } from 'ant-design-vue';
+ import { XProvider } from 'ant-design-x-vue';
const App = () => (
- <ConfigProvider>
+ <XProvider>
<YourApp />
- </ConfigProvider>
+ </XProvider>
);Examples
Direction
Direction:
- Conversation - 1
- Conversation - 2
Hello Ant Design X!
Hello World!
Ignite Your Creativity
Tell me a Joke
Hello Ant Design X!
status: success
Ant Design X help you build AI chat/platform app as ready-to-use 📦.
Hello World!
status: success
Pending...
status: pending
Theme
ColorPrimary:文字颜色:
- Conversation - 1
- Conversation - 2
Do you want?
Hot Topics
Hot Topics
What are you interested in?
Design Guide
Design Guide
How to design a good product?
Start Creating
Start Creating
How to start a new project?
Internationalization
Change locale of components:
- 帮我写作
- AI编码
- 图片生成
- 深度搜索
Keyboard shortcuts
You can switch sessions using the shortcut key: Alt/⌥ + number
- Help Me Write
- AI Coding
- Create Image
- Deep Search
API
XProvider fully inherits from antdv's ConfigProvider. Refer to properties here: Antdv ConfigProvider
Components Configuration
| Prop | Description | Type | Default | Version |
|---|---|---|---|---|
| actions | Global configuration for the action list component | ComponentStyleConfig | - | - |
| attachments | Global configuration for the attachment input component | ComponentStyleConfig | - | - |
| bubble | Global configuration for the bubble component | ComponentStyleConfig | - | - |
| conversations | Global configuration for the conversation component | ComponentStyleConfig & | - | - |
| fileCard | Global configuration for the file card component | ComponentStyleConfig | - | - |
| prompts | Global configuration for the prompts component | ComponentStyleConfig | - | - |
| sender | Global configuration for the input box component | ComponentStyleConfig | - | - |
| sources | Global configuration for the references component | ComponentStyleConfig | - | - |
| suggestion | Global configuration for the suggestion component | ComponentStyleConfig | - | - |
| think | Global configuration for the thinking component | ComponentStyleConfig | - | - |
| thoughtChain | Global configuration for the thought chain component | ComponentStyleConfig | - | - |
| welcome | Global configuration for the welcome component | ComponentStyleConfig | - | - |
Markdown component configuration
| Prop | Description | Type | Default | Version |
|---|---|---|---|---|
| highlightCode | Global configuration for the code highlighting component | ComponentStyleConfig | - | - |
| mermaid | Global configuration for the Mermaid chart component | ComponentStyleConfig | - | - |
ComponentStyleConfig
ts
interface ComponentStyleConfig {
style: CSSProperties;
styles: Record<string, CSSProperties>;
className: string;
classNames: Record<string, string>;
}ShortcutKeys
ts
type PrefixKeysType = {
Ctrl: [keyof KeyboardEvent, string, string];
Alt: [keyof KeyboardEvent, string, string];
Meta: [keyof KeyboardEvent, string, string];
Shift: [keyof KeyboardEvent, string, string];
};
type ShortcutKeys<CustomKey = number | 'number'> =
| [keyof PrefixKeysType, keyof PrefixKeysType, CustomKey]
| [keyof PrefixKeysType, CustomKey];Design Token
XProvider itself does not provide independent Component Tokens; please configure global Tokens and individual Component Tokens through theme.
Contributors
Contributors
Loading contributors…