--- Title: Antdv Next Component Semantic Descriptions URL: https://www.antdv-next.com/llms-semantic.md --- --- Title: Advanced URL: https://www.antdv-next.com/docs/vue/compatible-style.md --- ## Default Style Compatibility Antdv Next supports the [last 2 versions of modern browsers](https://browsersl.ist/#q=defaults). By default, we use some modern CSS features to improve style maintainability and extensibility. These features may not be supported in older browsers, but we can solve this through some compatibility solutions. | Feature | antdv-next version | Compatibility | Minimum Chrome Version | Compatibility workaround | | --- |-------------------| --- | --- | --- | | [:where Selector](https://developer.mozilla.org/en-US/docs/Web/CSS/:where) | `>=1.0.0` | [caniuse](https://caniuse.com/?search=%3Awhere) | Chrome 88 | `` | | [CSS Logical Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties) | `>=1.0.0` | [caniuse](https://caniuse.com/css-logical-props) | Chrome 89 | `` | If you need to support older browsers, please use `@antdv-next/cssinjs` [StyleProvider](https://github.com/ant-design/cssinjs#styleprovider) for degradation handling according to your actual requirements. ## `:where` Selector - Support Version: `>=1.0.0` - MDN: [:where](https://developer.mozilla.org/en-US/docs/Web/CSS/:where) - Browser Compatibility: [caniuse](https://caniuse.com/?search=%3Awhere) - Minimum Chrome Version Supported: 88 - Default Enabled: Yes The CSS-in-JS feature of Antdv Next uses the ":where" selector by default to lower the CSS selector specificity, reducing the additional cost of adjusting custom styles when upgrading for users. However, the compatibility of the ":where" syntax is relatively poor in older browsers ([compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/:where#browser_compatibility)). In certain scenarios, if you need to support older browsers, you can use `@antdv-next/cssinjs` to disable the default lowering of specificity (please ensure version consistency with antd). ```vue ``` It will turn `:where` to class selector: ```diff -- :where(.css-bAMboO).ant-btn { ++ .css-bAMboO.ant-btn { color: #fff; } ``` Note: After turning off the `:where` downgrade, you may need to manually adjust the priority of some styles. Or you can **use PostCSS plugin** to raise application css selector priority. PostCSS provides many plugins can help on this. e.g: - [postcss-scopify](https://www.npmjs.com/package/postcss-scopify) - [postcss-increase-specificity](https://www.npmjs.com/package/postcss-increase-specificity) - [postcss-add-root-selector](https://www.npmjs.com/package/postcss-add-root-selector) Raise priority through plugin: ```diff -- .my-btn { ++ #root .my-btn { background: red; } ``` ## CSS Logical Properties - Support Version: `>=1.0.0` - MDN: [CSS Logical Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties) - Browser Compatibility: [caniuse](https://caniuse.com/css-logical-props) - Minimum Chrome Version Supported: 89 - Default Enabled: Yes To unify LTR and RTL styles, Antdv Next uses CSS logical properties. For example, the original `margin-left` is replaced by `margin-inline-start`, so that it is the starting position spacing under both LTR and RTL. If you need to be compatible with older browsers (such as 360 Browser, QQ Browser, etc.), you can configure `transformers` through the `StyleProvider` of `@antdv-next/cssinjs`: ```vue ``` When toggled, styles will downgrade CSS logical properties: ```diff .ant-modal-root { -- inset: 0; ++ top: 0; ++ right: 0; ++ bottom: 0; ++ left: 0; } ``` ## `@layer` Specificity Lowering {#layer-specificity-lowering} - Support Version: `>=1.0.0` - MDN: [@layer](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer) - Browser Compatibility: [caniuse](https://caniuse.com/?search=%40layer) - Minimum Chrome Version Supported: 99 - Default Enabled: No Antdv Next supports configuring `@layer` for unified specificity lowering since `1.0.0`. After the downgrade, the style of antd will always be lower than the default CSS selector priority, so that users can override the style (please be sure to check the browser compatibility of `@layer`). When enable `layer`, the child element **must** wrap ConfigProvider to update the icon-related styles: ```vue ``` antd styles will be encapsulated in `@layer` to lower the priority: ```diff ++ @layer antd { :where(.css-bAMboO).ant-btn { color: #fff; } ++ } ``` ⚠️ zeroRuntime Scenario Notes When `zeroRuntime` is enabled, Antdv Next’s styles are precompiled into a standalone `antd.css` file. If you also enable the `@layer` specificity–lowering mechanism, you must ensure that `antd.css` is placed inside the same layer (e.g., `layer(antd)`). Otherwise, its specificity will be higher than the styles injected by StyleProvider, causing the lowering mechanism to fail or resulting in unexpected override behavior. ```css /* global.css / app.css */ @layer theme, base, antd, components, utilities; /* The precompiled antd.css output by zeroRuntime must explicitly specify a layer */ @import url(antd.css) layer(antd); ``` If you cannot use the `@import ... layer()` syntax, you may wrap the content during your build process instead: ```css @layer antd { /* contents of antd.css */ } ``` ## autoPrefixer - Support Version: `>=1.0.0` - Browser Compatibility: Automatically adds browser prefixes for wider browser support - Default Enabled: No Some styles rely on browser prefixes for compatibility. The `autoPrefixer` transformer can automatically add browser prefixes to styles, ensuring they work properly across different browsers. ```vue ``` The final transformed styles: ```diff .sample-box { -- user-select: none; ++ -webkit-user-select: none; ++ -moz-user-select: none; ++ -ms-user-select: none; ++ user-select: none; } ``` ## Rem Adaptation In responsive web development, there is a need for a convenient and flexible way to achieve page adaptation and responsive design. The `px2remTransformer` transformer can quickly and accurately convert pixel units in style sheets to rem units relative to the root element (HTML tag), enabling the implementation of adaptive and responsive layouts. ```vue ``` The resulting transformed styles: ```diff .px2rem-box { - width: 400px; + width: 12.5rem; background-color: green; - font-size: 32px; + font-size: 1rem; border: 10PX solid #f0f; } @media only screen and (max-width: 600px) { .px2rem-box { background-color: red; - margin: 10px; + margin: 0.3125rem; } } ``` ### Options | Parameter | Description | Type | Default | | --- | --- | --- | --- | | rootValue | Font size of the root element | `number` | 16 | | precision | Decimal places for the converted value | `number` | 5 | | mediaQuery | Whether to convert px in media queries | `boolean` | false | For more details, please refer to: [px2rem.ts#Options](https://github.com/ant-design/cssinjs/blob/master/src/transformers/px2rem.ts) ## Shadow DOM Usage Since ` ``` #### ✅ Correct {#correct} ```html ``` --- Title: Ant Design of Vue URL: https://www.antdv-next.com/docs/vue/introduce.md --- Following the Ant Design specification, we developed a Vue UI library `antdv-next` that contains a set of high quality components for building rich, interactive user interfaces.
+ =
--- ## ✨ Features {#features} - 🌈 Enterprise-class UI designed for web applications. - 📦 A set of high-quality Vue3 components out of the box. - 🛡 Written in TypeScript with predictable static types. - ⚙️ Share the Ant Design of React design resource system. - 🌍 Internationalization support for dozens of languages. - 🎨 Powerful theme customization in every detail. ## Environment Support - Modern browsers - Server-side Rendering - [Electron](https://www.electronjs.org/) | [Edge](https://godban.github.io/browsers-support-badges/)
Edge | [Firefox](https://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](https://godban.github.io/browsers-support-badges/)
Chrome | [Safari](https://godban.github.io/browsers-support-badges/)
Safari | [Opera](https://godban.github.io/browsers-support-badges/)
Opera | [Electron](https://godban.github.io/browsers-support-badges/)
Electron | | --- | --- | --- | --- | --- | --- | | Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions | > Dropped support of IE8 after `vue3`. `antdv-next` does not support IE by default. We recommend starting from `vue@3.5.x` version. ## Version - Stable: [![npm package](https://img.shields.io/npm/v/antdv-next.svg?style=flat-square)](https://www.npmjs.org/package/antdv-next) ## Installation ### Using npm or yarn or pnpm or bun **We recommend using [npm](https://www.npmjs.com/) or [yarn](https://github.com/yarnpkg/yarn/) or [pnpm](https://pnpm.io/) or [bun](https://bun.sh/) to install**, it not only makes development easier, but also allows you to take advantage of the rich ecosystem of JavaScript packages and tooling. If you are in a bad network environment, you can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm). ### Import in Browser Add `script` and `link` tags in your browser and use the global variable `antd`. We provide `antd.js`, `antd.css` and `reset.css` under the `dist` folder in antdv-next's npm package. You can also download these files directly from [![](https://data.jsdelivr.com/v1/package/npm/antdv-next/badge)](https://www.jsdelivr.com/package/npm/antdv-next) or [UNPKG](https://unpkg.com/antdv-next/dist/). > **We strongly discourage loading the entire files**, as this will add bloat to your application and make it more difficult to receive bugfixes and updates. > Note: You should import `vue`, `dayjs` before using `antd.js`. ```html Import in browser demo
{{msg}} click
``` ## Usage ```vue ``` ### Use modularized antdv-next `antdv-next` is a Pure ESM project and supports ES modules tree shaking by default. ### TypeScript `antdv-next` is written in TypeScript with complete definitions. ## Links - [Home page](/) - [Components](/components/overview) --- Title: Awesome URL: https://www.antdv-next.com/docs/vue/awesome.md --- ## Official Ecosystem | Name | Description | | ---- | ---- | | [vue-components](https://github.com/antdv-next/vue-components) | Headless styled components built on top of `@v-c/*` | | [@antdv-next/x](https://github.com/antdv-next/x) | AI component library | | [@antdv-next/auto-import-resolver](https://github.com/antdv-next/auto-import-resolver) | Auto-import resolver for on-demand usage | | [@antdv-next/icons](https://github.com/antdv-next/icons) | SVG icon package | | [@antdv-next/nuxt](https://github.com/antdv-next/nuxt) | Nuxt module | | [admin](https://github.com/antdv-next/admin) | Admin dashboard starter template | | [antdv-style](https://github.com/antdv-next/antdv-style) | CSS-in-JS solution based on `Emotion` | | [antdv-next-playground](https://github.com/antdv-next/antdv-next-playground) | Online playground built on `@vue/repl` | | [css-plugin](https://github.com/antdv-next/css-plugin) | Plugins for `@antdv-next/unocss` and `@antdv-next/tailwind` | | [docs-base](https://github.com/antdv-next/docs-base) | Documentation starter template | | [vite-plugin-dayjs](https://github.com/antdv-next/vite-plugin-dayjs) | Converts Day.js CommonJS imports to ESM automatically | ## Community Ecosystem | Name | Description | | ---- | ---- | | [Fantastic-admin](https://fantastic-admin.hurui.me/) | AI-oriented admin system framework | | [antdv-next-tiptap](https://pengyinghao.github.io/antdv-next-tiptap/) | A rich text editor built with Vue3, antdv-next, and tiptap | | [antdv-next-pro-components](https://github.com/lucasjeke/pro-components/) | A component library based on antdv-next with enterprise-level components | | [Naive Admin](https://naiveadmin.com) | Out-of-the-box front-end and back-end framework | --- Title: CLI URL: https://www.antdv-next.com/docs/vue/cli.md --- This guide explains how to use `@antdv-next/cli` to query antdv-next component knowledge, analyze project usage, and guide version migrations from the command line. ## What is Antdv Next CLI? {#what-is-antdv-next-cli} [`@antdv-next/cli`](https://github.com/antdv-next/cli) is the official command-line tool that brings Antdv Next knowledge to your terminal. All metadata is installed with the package: every Props, Events, Slots, Token, Demo, and Changelog entry can be queried in milliseconds, completely offline. ## Highlights {#highlights} - 📦 **Fully offline** — All metadata is installed with the package. No network requests, no latency, and no API key required. - 🎯 **Version-accurate** — Query the exact API for antdv-next@x.y.z instead of only "latest". - 🤖 **Agent-optimized** — Every command supports `--format json`, with structured error codes and suggested fixes. stdout and stderr are strictly separated. - 🔮 **Smart corrections** — Typed `Buttn`? The CLI suggests `Button` based on Levenshtein distance, prioritizing candidates with the same first letter. - 🔌 **MCP server** — `antdv mcp` starts a stdio server with native integration for Claude Desktop, Cursor, and other IDEs. ## Installation {#install} ```bash npm install -g @antdv-next/cli ``` Node.js `>=20.0.0` is required. You can also install it globally with `pnpm add -g @antdv-next/cli` or `bun add -g @antdv-next/cli`. ## Quick Start {#quick-start} ```bash antdv init # Initialize a project antdv list # List all components and version information antdv info Button # Component props, events, slots, types, and defaults antdv doc Button # Complete Markdown documentation antdv demo Select basic # Runnable demo source code antdv token DatePicker # Design Token values antdv design.md # Design language documentation (design.md) antdv semantic Table # class / styles structure antdv changelog 1.2.0 1.0.0 Select # Compare API differences across versions antdv doctor # Diagnose project configuration issues antdv env # Collect environment information for bug reports antdv usage ./src # Analyze antdv-next imports in a project antdv lint ./src # Check deprecated APIs and best practices antdv migrate 1 2 # v1-to-v2 migration guide antdv migrate 1 2 --apply ./src # Generate an Agent migration prompt antdv mcp # Start the MCP server for IDE integration antdv setup --client claude # Connect an AI Agent through MCP/Skill antdv upgrade # Upgrade the CLI to the latest version ``` ## Commands {#commands} ### Project Initialization | Command | Description | | --- | --- | | `antdv init [project-name]` | Initialize a Vite project by default | | `antdv init [project-name] --nuxt` | Initialize a Nuxt-based antdv-next project | ### Knowledge Queries {#knowledge-query} | Command | Description | | --- | --- | | `antdv list` | List all components, including bilingual names, categories, and the version in which they were introduced | | `antdv info ` | Display Props, Events, and Slots tables with types, default values, and descriptions | | `antdv doc ` | Display the complete Markdown documentation for a component | | `antdv demo [name]` | Display runnable demo source code (TSX) | | `antdv token [Component]` | Display global or component-level Design Tokens | | `antdv design.md` | Display the design language document for AI design tools | | `antdv semantic ` | Display the semantic `class` / `styles` structure and usage examples | | `antdv changelog [v1] [v2] [component]` | Display Changelog entries, a version range, or an API comparison across versions | #### antdv design.md {#design-md} `antdv design.md` outputs the antdv-next design language description file, following the [google-labs-code/design.md](https://github.com/google-labs-code/design.md) specification. The file is intended for AI design tools such as Figma Make and Google Stitch, enabling them to follow the antdv-next visual language when generating UIs. ```bash antdv design.md # Output the complete design.md content antdv design.md --format json # Output in JSON format ``` The file includes: - **YAML Front Matter** — Structured Token definitions for colors, typography, border radii, spacing, and core components, with support for the `{path.to.token}` reference syntax - **Design overview** — The four antdv-next values: Natural, Certain, Meaningful, and Growing - **Color system** — Functional colors, preset palettes, and why neutral colors use `rgba()` - **Typography** — A 14px base font size, the font stack, and a two-weight constraint - **Layout** — A 4px grid, spacing scale, and three-layer surface model - **Hierarchy and depth** — Four shadow levels, motion durations, and easing functions - **Shape** — A default 6px border radius and per-component classifications - **Components** — Style descriptions for core component archetypes and states - **Design guidance** — Do's and Don'ts The file is also published at [antdv-next.com/design.md](https://antdv-next.com/design.md), allowing AI tools to read it directly from the URL. ### Project Analysis {#project-analysis} | Command | Description | | --- | --- | | `antdv doctor` | Run 10 diagnostic checks covering Vue compatibility, duplicate installations, peer dependencies, SSR, and Babel plugins | | `antdv env [dir]` | Collect antdv-next-related environment information for bug reports or AI-assisted diagnosis | | `antdv usage [dir]` | Report import statistics, subcomponent distribution, and non-component exports | | `antdv lint [target]` | Check deprecated APIs, accessibility issues, performance problems, and best practices | | `antdv migrate ` | Produce a migration checklist that distinguishes automatic fixes from manual work; `--apply` generates an Agent prompt | ### Issue Reporting {#issue-reporting} | Command | Description | | --- | --- | | `antdv bug` | Report a bug to the antdv-next repository | | `antdv bug-cli` | Report a bug to the antdv-next/cli repository | ### CLI Management {#cli-management} | Command | Description | | --- | --- | | `antdv mcp` | Start an MCP server that provides six tools and supports IDE integration with Claude Code, Cursor, VS Code, and more | | `antdv setup` | Connect Antdv Next MCP/Skill to Claude Code, Cursor, VS Code, or Codex | | `antdv upgrade` | Upgrade the CLI to the latest version | The `antdv mcp` command starts a [Model Context Protocol](https://modelcontextprotocol.io/) server, giving AI assistants direct access to Antdv Next knowledge. See the [MCP Server](/docs/vue/mcp) guide for detailed configuration instructions. The `antdv setup` command can write MCP configuration, install the built-in Antdv Next Skill, or do both: ```bash antdv setup --client claude antdv setup --client cursor --mode both antdv setup --client vscode --write-instructions antdv setup --client codex antdv setup --client claude --dry-run antdv setup --client claude --check ``` ### Global Options {#global-flags} | Option | Description | Default | | --- | --- | --- | | `--format json\|text\|markdown` | Output format | `text` | | `--ver ` | Target antdv-next version (for example, `1.5.0`) | Auto-detected | | `-V, --version` | Print the CLI version | - | The target version is detected in the following order: the `--version` option, `node_modules/antd`, the dependency declaration in `package.json`, and finally the default fallback version. ## Usage with AI Tools {#usage-with-ai-tools} The CLI includes a [Skill file](https://github.com/antdv-next/cli/blob/main/skills/antdv/SKILL.md) that guides coding agents to invoke the right command at the right time: ```bash npx skills add antdv-next/cli ``` | Tool | Description | | --- | --- | | **Claude Code** | Install it as an Agent Skill or use the `antdv` command directly in the terminal. [Documentation](https://docs.anthropic.com/en/docs/claude-code) | | **Cursor** | After the Skill is installed, the Agent automatically invokes CLI commands. [Documentation](https://docs.cursor.com/zh/context/@-symbols/@-docs) | | **Codex** | Install the Skill to give the Agent access. [Documentation](https://github.com/openai/codex) | | **Gemini CLI** | Install the Skill to enable automatic command invocation. [Documentation](https://github.com/google-gemini/gemini-cli) | All Agents compatible with the [skills](https://github.com/nicepkg/agent-skills) protocol are supported. ## Learn More {#learn-more} - [@antdv-next/cli GitHub repository](https://github.com/antdv-next/cli) - [@antdv-next/cli on npm](https://www.npmjs.com/package/@antdv-next/cli) - [Antdv Next LLMs.txt guide](/docs/vue/llms) - [Antdv Next MCP Server](/docs/vue/mcp) --- Title: Common Props URL: https://www.antdv-next.com/docs/vue/common-props.md --- > Tips: The following generic properties apply to most antdv-next components; those not supported are described separately. | Property | Description | Type | Default | |---------------| --- | --- | --- | | style | The additional style | CSSProperties | - | | class | The additional css class | string | - | | rootClass | ClassName on the root element | string | - | | autoFocus | Auto focus when component mounted, only effective for focusable elements like forms, links, etc. | boolean | false | --- Title: Contributing URL: https://www.antdv-next.com/docs/vue/contributing.md --- This guide will help you understand how to contribute to Antdv Next. Please take a few minutes to read this guide before submitting an issue or pull request. ## Code of Conduct We use the same [Code of Conduct](https://github.com/antdv-next/antdv-next/blob/main/CODE_OF_CONDUCT.md) as the Ant Design community. We hope all contributors will abide by it. Please take the time to read it thoroughly to ensure you understand what is and isn't allowed. ## Transparent Development All our development work is done on [Github](https://github.com/antdv-next/antdv-next). Whether it's a pull request from a team member or a community contributor, all pull requests must go through the same review process. ## Branch Management We currently maintain two long-term branches: `main` and `feat`. If you need to fix a bug, please send a pull request to `main`. We will release a `patch` version from `main` every period of time (at most one month). If you need to add a new feature pull request, please base it on the `feat` branch. We will try to merge `feat` into `main` within two months and release a `minor` version containing new features. :::info Why is the cycle uncertain? We don't have a large team like Ant Design to support frequent version releases, so we can only release new versions as quickly as possible while ensuring quality. We hope everyone understands. ::: ## First Contribution If you're not sure how to submit a Pull Request on GitHub, you can read the following article to learn: [How to Contribute on GitHub](https://opensource.guide/how-to-contribute/) To help you get started with your first attempt, we've marked some relatively easy-to-fix bugs and small features with [good first issues](https://github.com/antdv-next/antdv-next/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). These issues can serve as a good first attempt. If you plan to start working on an issue, please check the comments below the issue first to make sure no one else is working on it. If no one is currently working on it, you can leave a comment to let others know you will be handling this issue to avoid duplicate work. If someone previously commented that they would handle the issue but there has been no activity for a week or two, you can also take over the issue, but you still need to leave a comment to inform others. ## Pull Request The Antdv Next Team will pay attention to all pull requests. We will review and merge your code, and may also ask you to make some changes or tell you why we cannot accept such changes. **Before you send a Pull Request**, please make sure you follow these steps: 1. Make changes based on the [correct branch](#branch-management). 2. Run `pnpm install` in the project root directory. 3. If you fixed a bug or added a new feature, please make sure to write corresponding tests. This is important. Since most of antdv-next is based on `vue-components`, sometimes you need to send a pull request to the [vue-components](https://github.com/antdv-next/vue-components) repository. If you fix a bug, we will release a patch version as soon as possible after merging your changes, and then you just need to reinstall your dependencies to use the newly released version. If your pull request adds a new feature, after your changes are merged and a version is released, you also need to send a pull request to Antdv Next to upgrade the corresponding dependencies, documentation, and TypeScript type definitions. ## Development Workflow Our project is a monorepo by default, using [pnpm workspace](https://pnpm.io/workspaces) to manage multiple sub-packages. So before you start contributing code, please make sure you understand the basic usage of pnpm workspace. The following steps assume you have already installed and configured pnpm. 1. Fork this repository to your personal account. 2. Clone your forked repository locally: `git clone https://github.com/xxx/antdv-next.git`. 3. Enter the project directory: `cd antdv-next`. 4. Install dependencies: `pnpm install`. 5. Run the development environment: `pnpm dev`. 6. Run code style check: `pnpm lint`. 7. Build the site: `pnpm build`. 8. Compile and build: `pnpm build:antdv`. ## Acknowledgements Thanks to all the friends who contributed code and documentation to Antdv Next. You make this project better! We look forward to more contributors joining this project to promote the development of Antdv Next together. --- Title: Customize Theme URL: https://www.antdv-next.com/docs/vue/customize-theme.md --- Antdv Next allows you to customize our design tokens to satisfy UI diversity from business or brand requirements, including primary color, border radius, border color, etc. We provide a new way to customize themes. With CSS-in-JS, the ability of theming has also been enhanced, including but not limited to: 1. Switching theme dynamically; 2. Multiple themes; 3. Customizing theme variables for some components; 4. ... ## Configure Theme We call the smallest element that affects the theme **Design Token**. By modifying the Design Token, we can present various themes or components. You can pass `theme` to `ConfigProvider` to customize theme. :::warning `ConfigProvider` will not take effect on static methods such as `message.xxx`, `Modal.xxx`, `notification.xxx`, because in these methods, antdv-next will dynamically create new Vue entities through `render`. Its context is not the same as the context of the current code, so context information cannot be obtained. When you need context information (such as the content configured by ConfigProvider), you can use the `Modal.useModal` method to return the modal entity and the contextHolder node. Just insert it where you need to get the context, or you can use [App Component](/components/app) to simplify the problem of using Modal and other methods that need to manually implant the contextHolder. ::: ### Customize Design Token By modifying `token` property of `theme`, we can modify Design Token globally. Some tokens will affect other tokens. We call these tokens Seed Token. ```stackblitz {title="Customize Design Token"} ``` ### Use Preset Algorithms Themes with different styles can be quickly generated by modifying `algorithm`. We provide three sets of preset algorithms by default: - default algorithm `theme.defaultAlgorithm` - dark algorithm `theme.darkAlgorithm` - compact algorithm `theme.compactAlgorithm` You can switch algorithms by modifying the `algorithm` property of `theme` in ConfigProvider, and multiple algorithms can be configured to take effect in sequence. ```stackblitz {title="Use Preset Algorithms"} ``` ### Customize Component Token In addition to Design Token, each component will also have its own Component Token to achieve style customization capabilities for components, and different components will not affect each other. Similarly, other Design Token of components can also be overridden in this way. :::info Algorithm of Component Token By default, all component tokens can only override global token and will not be derived based on Seed Token. In version `>= 1.0.0`, component tokens support the `algorithm` property, which can be used to enable algorithm or pass in other algorithms. ::: ```stackblitz {title="Customize Component Token"} ``` ### Disable Motion antdv-next has built-in interaction animations to make enterprise-level pages more detailed. In some extreme scenarios, it may affect the performance of page interaction. If you need to turn off the animation, try setting `motion` of `token` to `false`: ```stackblitz {title="Disable Motion"} ``` ## Advanced ### Zero Runtime {#zero-runtime} We provide `zeroRuntime` mode to further improve application performance. When enabled, Antdv Next will no longer generate component styles at runtime, so you need to manually import the style files. :::warning Notice This configuration is static and cannot be dynamically configured through `ConfigProvider`! ::: Import the style file in `main.ts`: ```ts import 'antdv-next/dist/antd.css' ``` Configure the theme in `App.vue`: ```vue ``` `antdv-next/dist/antd.css` contains all antdv-next component styles, but does not include hashed className. ### Switch Themes Dynamically Dynamically switching themes is very simple for users. You can dynamically switch themes at any time through the `theme` property of `ConfigProvider` without any additional configuration. ```stackblitz {title="Switch Themes Dynamically"} ``` ### Nested Theme By nesting `ConfigProvider` you can apply local theme to some parts of your page. Design Tokens that have not been changed in the child theme will inherit the parent theme. ```stackblitz {title="Nested Theme"} ``` ### Consume Design Token If you want to consume the Design Token under the current theme, we provide `useToken` hook to get Design Token. ```stackblitz {title="Consume Design Token"} ``` ### Static Consume (e.g. Atomic CSS) Normally we recommend using atomic CSS to consume Design Token. We provide a UnoCSS plugin to make it easier to use Design Token. #### Installation ```shell npm install -D @antdv-next/unocss # or pnpm add -D @antdv-next/unocss ``` #### Configuration Import the plugin in `uno.config.ts`: ```ts import { presetAntd } from '@antdv-next/unocss' export default defineConfig({ presets: [ presetAntd(), ] }) ``` #### Usage Please install the `unocss` extension in `vscode` or `webstorm` for better hints. By default, we have added some configurations on top of `unocss`. If you want to distinguish between `unocss` and `antdv-next` tokens, you can use the `a-` prefix for class names: ```vue ``` We support both usages. Since we provide completion in the plugin, we won't go into details here. ## Design Token In Design Token, we provide a three-layer structure that is more suitable for the design, and disassemble the Design Token into three parts: Seed Token, Map Token and Alias Token. These three groups of Tokens are not simple groupings, but a three-layer derivation relationship. Map Tokens are derived from Seed Tokens, and Alias Tokens are derived from Map Tokens. In most cases, using Seed Tokens is sufficient for custom themes. But if you need a higher degree of theme customization, you need to understand the life cycle of Design Token in antd. ### Life of Design Token ![token](https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*uF3kTrY4InUAAAAAAAAAAAAAARQnAQ) ### Seed Token Seed Token means the origin of all design intent. For example, we can change the theme color by changing `colorPrimary`, and the algorithm inside antd will automatically calculate and apply a series of corresponding colors according to the Seed Token: ```tsx const theme = { token: { colorPrimary: '#1890ff', }, } ``` ### Map Token Map Token is a gradient variable derived from Seed. It is recommended to implement custom Map Token through `theme.algorithm`, which can ensure the gradient relationship between Map Tokens. It can also be overridden by `theme.token` to modify the value of some map tokens individually. ```tsx const theme = { token: { colorPrimaryBg: '#e6f7ff', }, } ``` ### Alias Token Alias Token is used to control the style of some common components in batches, which is basically a Map Token alias, or a specially processed Map Token. ```tsx const theme = { token: { colorLink: '#1890ff', }, } ``` ### Algorithm The basic algorithm is used to expand the Seed Token into a Map Token, such as calculating a gradient color palette from a basic color, or calculating rounded corners of various sizes from a basic rounded corner. Algorithms can be used alone or in any combination, for example, dark and compact algorithms can be combined to get a dark and compact theme. ```tsx import { theme } from 'antdv-next' const { darkAlgorithm, compactAlgorithm } = theme const theme = { algorithm: [darkAlgorithm, compactAlgorithm], } ``` ## API ### Theme | Property | Description | Type | Default | Version | | --- | --- | --- | --- |----| | token | Modify Design Token | `AliasToken` | - | | | inherit | Inherit theme configured in upper ConfigProvider | boolean | true | | | algorithm | Modify the algorithms of theme | `(token: SeedToken) => MapToken` \| `((token: SeedToken) => MapToken)[]` | `defaultAlgorithm` | | | components | Modify Component Token and Alias Token applied to components | `ComponentsConfig` | - | | | cssVar | CSS Variables Configuration | [cssVar](#css-var) | - | | | hashed | Style patch on the hash className | boolean | true | | | zeroRuntime | Enable zero-runtime mode, which will not generate style at runtime, need to import additional CSS file | boolean | true | - | ### ComponentsConfig | Property | Description | Type | Default | | --- | --- | --- | --- | | `Component` (Can be any antd Component name like `Button`) | Modify Component Token or override Component used Alias Token | `ComponentToken & AliasToken & { algorithm: boolean \| (token: SeedToken) => MapToken` \| `((token: SeedToken) => MapToken)[]}` | - | > `algorithm` of component is `false` by default, which means tokens of component will only override global token. When it is set with `true`, the algorithm will be the same as global. You can also pass algorithm or Array of algorithm, and it will override algorithm of global. ### cssVar {#css-var} | Property | Description | Type | Default | Version | | --- | --- | --- |----------------------| --- | | prefix | Prefix of CSS variables, same as `prefixCls` configured on ConfigProvider by default | string | `ant` | | | key | Unique key for current theme, filled with `useId` by default | string | `useId` in Vue 3 | | ### SeedToken ### MapToken > Inherit all SeedToken properties ### AliasToken > Inherit all SeedToken and MapToken properties ## FAQ ### Why component re-mounted when `theme` changed from `undefined` to some object or to `undefined`? In ConfigProvider, we pass context through `DesignTokenContext`. When `theme` is `undefined`, a layer of Provider will not be set, so Vue VirtualDOM structure changes from scratch or from existence to nothing, causing components to be re-mounted. Solution: Replace `undefined` with an empty object `{}`. --- Title: Design.md URL: https://www.antdv-next.com/docs/vue/design-md.md --- `design.md` is a design language description file following the [google-labs-code/design.md](https://github.com/google-labs-code/design.md) specification. It is intended for AI design tools such as Figma Make and Google Stitch, giving them a structured understanding of the antdv-next default Light theme — visual language, component patterns, and theme Tokens — so generated UIs match the library out of the box. ## Where It Comes From `design.md` is generated from the component library's theme Tokens by the [`@antdv-next/cli`](https://github.com/antdv-next/cli) tooling (`scripts/tokens.ts` extracts Tokens, `antdv design.md` outputs the file). The published file is the single source of truth for both the CLI and this site. ## Where to Get It The file is available from multiple sources: | Source | Description | | --- | --- | | [design.md](https://antdv-next.com/design.md) | Published raw file, readable directly by AI tools | | `antdv design.md` | CLI command that outputs the same content ([CLI guide](/docs/vue/cli)) | | [llms.txt](https://antdv-next.com/llms.txt) | Navigation file that links to design.md and all component docs | ## Design Token The front matter of `design.md` carries machine-readable tokens. Key values of the default Light theme: ### Colors | Token | Value | Usage | | --- | --- | --- | | `primary` | `#1677FF` | Brand color for primary actions, links, focus states | | `success` / `warning` / `error` / `info` | `#52C41A` / `#FAAD14` / `#FF4D4F` / `#1677FF` | Semantic feedback colors | | `surface` | `#FFFFFF` | Container surfaces (buttons, inputs, cards) | | `surface-container` | `#FAFAFA` | Muted containers: table headers, tags, hovers | | `surface-layout` | `#F5F5F5` | Page background | | `on-surface` | `#1F1F1F` | Primary text on surfaces | | `on-surface-variant` | `#595959` | Secondary text | | `on-surface-disabled` | `#BFBFBF` | Disabled text | | `outline` | `#D9D9D9` | Default borders | | `outline-variant` | `#F0F0F0` | Lighter borders, dividers | ### Typography | Token | Value | | --- | --- | | `fontFamily` | `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif` | | `fontFamilyCode` | `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace` | | `display-lg` → `body-sm` | `38px` → `12px` scale (headings `600` weight, body `400`) | ### Shapes, Spacing & Size | Token | Value | | --- | --- | | `rounded` | `none 0 / sm 2 / md 4 / DEFAULT 6 / lg 8 / xl 16 / full 9999px` | | `spacing.unit` | `4px` grid (`xs 4 / sm 8 / md 16 / lg 24 / xl 32`) | | `control-height` | `32px` default control height | ## Component Patterns `design.md` also describes the component layer of the design system — how Tokens combine into recurring UI patterns: - **Button (primary)** — `#1677FF` background, white text, `6px` radius, `32px` height, `0 15px` padding; hover `#4096FF`, active `#0958D9` - **Button (default)** — `surface` background, `on-surface` text - **Input / Select** — `surface` background, `32px` height, `6px` radius; focus `#4096FF` border - **Card** — `surface` background, `8px` radius, `24px` padding - **Modal** — `surface` background, `8px` radius, `20px 24px` padding - **Tag** — `surface-container` background, `4px` radius, `0 7px` padding, `12px` text - **Table header** — `surface-container` background, `600` weight `14px` text, `16px` padding - **Menu selected** — `#E6F4FF` background with primary text ## Validation `design.md` is a formal spec — validate it, check WCAG contrast, and compare token regressions with the official CLI: ```bash npx @google/design.md lint design.md npx @google/design.md diff design.md design-v2.md ``` ## Related - [LLMs.txt guide](/docs/vue/llms) — structured documentation for AI tools - [CLI guide](/docs/vue/cli) — `antdv design.md` and other offline commands - [Customize Theme](/docs/vue/customize-theme) — theme Tokens and algorithms --- Title: FAQ URL: https://www.antdv-next.com/docs/vue/faq.md --- ## Components are not vertically aligned when placed in single row. Try [Space](/components/space/) component to make them aligned. ## Why do third-party SVG icons have margin-block-end? {#faq-icon-margin-block-end} Components such as Breadcrumb, Collapse, Segmented, Tabs, and Tag apply `display: inline-block`, `vertical-align: middle`, and `margin-block-end: 0.2em` to SVGs rendered directly in the corresponding icon slots to adjust their visual alignment with text. In inline layout, an SVG has no text baseline, so its bottom edge participates in baseline alignment by default, which can make it appear too high next to text. `display: inline-block` keeps the icon in the inline flow, while `vertical-align: middle` aligns the center of its margin box to the parent's baseline plus half its x-height (the height of a lowercase x), making the alignment independent of the icon's height. However, the center of the x-height is usually lower than the center of capital letters, so a small upward optical adjustment is needed. `margin-block-end: 0.2em` adds a margin below the icon. Once the margin box is centered, the icon itself moves up by about `0.1em`, bringing it closer to the center of capital letters in common fonts. The `0.2em` value approximates the difference between cap height and x-height in common fonts, and using `em` makes the adjustment scale with the font size. These styles target directly rendered SVGs. Icons from `@antdv-next/icons` wrap their SVG in an extra container and use their own alignment styles. Different fonts, internal icon whitespace, or an icon's own `vertical-align` can affect the result. If an icon already handles its own alignment, or an icon-only use case does not need text alignment compensation, you can locally override the corresponding SVG with `margin-block-end: 0` and adjust its own styles as needed. ## My component's default locale is English, how do I switch back to Chinese? {#how-to-switch-the-default-locale-to-chinese} Try wrapping your app with the [ConfigProvider](/components/config-provider#config-provider-demo-locale) component. If the locale of date components still does not take effect, set `dayjs.locale('zh-cn')` and **check whether the `dayjs` version in your project matches the `dayjs` version required by `antdv-next`**. ## Date-related components locale is not working? Please check whether you have imported dayjs locale correctly. ```jsx import dayjs from 'dayjs'; import 'dayjs/locale/zh-cn'; dayjs.locale('zh-cn'); ``` Please check whether there are two versions of dayjs installed. ```jsx npm ls dayjs ``` If you are using a mismatched version of dayjs with antdv-next dependent dayjs in your project. That would be a problem cause locale not working. ## Why is a DOM node still rendered for some empty content? {#vue-renderable} antdv-next uses the internal `isRenderable` utility to determine whether a content wrapper DOM should be created. It is designed as a compatibility-oriented content presence check, not a validator for valid Vue nodes, and it does not recursively predict whether Vue will eventually produce visible content. `isRenderable` treats only `null`, `undefined`, `false`, and the empty string `''` as having no content. All other values are treated as content. Therefore, when it controls whether a wrapper DOM is rendered: | Value | `isRenderable` | Result | | --- | --- | --- | | `null`, `undefined`, `false`, `''` | `false` | Neither the wrapper DOM nor any content is rendered | | `true` | `true` | The wrapper DOM is created, but Vue renders no text content for `true` | | `0` | `true` | The wrapper DOM is created and `0` is rendered normally | | Non-empty strings, other numbers, VNodes, etc. | `true` | The wrapper DOM is created and Vue handles the content | Here, `false` is treated as an explicit no-content marker, while `true` means that content was provided. Although `true` itself produces no text node, the wrapper DOM is still created. Similarly, an empty array, an empty Fragment, or a component that eventually returns `null` passes the check. The number `0` is not mistaken for empty content and is rendered normally. ## Camelcase slots / render props (e.g. `#tagRender`) don't work when using the CDN (UMD) build? This is a limitation of Vue **in-DOM templates**, not a component bug. When the template is written directly in the page's HTML (e.g. inside `
`), the browser's HTML parser **lowercases** tag and attribute names — including slot names, so `#tagRender` reaches the component as `tagrender` instead of `tagRender`, and the camelCase slot never fires. This applies to every camelCase slot (`tagRender`, `maxTagPlaceholder`, `popupRender`, …), and writing `#tagrender` in lowercase does not help either. See the Vue docs on [in-DOM template parsing caveats](https://vuejs.org/guide/essentials/component-basics.html#in-dom-template-parsing-caveats). Pick any of the following (the first two need no build tooling): **Option 1: Write the template as a JS string** (recommended for CDN usage, smallest change). Instead of putting the markup in the page HTML, move it into the `template` option string, which Vue's runtime compiler parses case-sensitively: ```js const App = { template: ` `, setup() { return { treeData } }, } Vue.createApp(App).use(window.antd).mount('#app') ``` **Option 2: Use a render function `h`**: ```js const { h } = Vue h(window.antd.TreeSelect, { treeData, multiple: true }, { tagRender: props => h('span', { style: 'color: red' }, props.label), }) ``` **Option 3: Use a Single-File Component (`.vue`) with a build tool** such as Vite / webpack. Recommended for real projects — the SFC compiler preserves case and is not affected by this limitation. ## Why do popups have no animation, or flash at the viewport edge before settling? {#popup-animation-missing-with-reduced-motion} This is usually not a component issue but a global "reduced motion" style on the page. Many projects copy this CSS from boilerplate: ```css @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } ``` It only takes effect when the operating system asks for reduced motion. This is an OS setting, not a browser one: - Windows 11: Settings → Accessibility → Visual effects, when "Animation effects" is turned off (on Windows 10: Settings → Ease of Access → Display → "Show animations in Windows"). It is also often off over Remote Desktop, in virtual machines, and when the performance options are set to "Adjust for best performance". - macOS: System Settings → Accessibility → Display, when "Reduce motion" is turned on. It is off by default. That is why the problem looks like it "only happens on some Windows machines". Once the style applies: 1. `animation-duration` shortens the enter/leave animations (CSS keyframes) of popups such as Dropdown, Select and Tooltip to 0.01ms, so they look like they have no animation. 2. `transition-property` defaults to `all`, so `transition-duration` gives every element a transition it never declared, including the popup's position properties. Popups aligned to the right or bottom (e.g. a `bottomRight` dropdown or a `top` Tooltip) may then appear at the viewport edge in the first frame after opening and jump into place afterwards. **How to check**: run `matchMedia('(prefers-reduced-motion: reduce)').matches` in the browser console. `true` means the OS asks for reduced motion. On another machine you can reproduce it by emulating `prefers-reduced-motion: reduce` in the Rendering panel of Chrome DevTools. **How to fix**: - If animations should look the same on every device, remove the global style and write reduced-motion rules only for the elements that need them. antdv-next components do not follow this OS setting themselves, which matches antd. - If you want to keep the global rule but let popups animate as usual, exclude the popup root elements from it. If you changed `prefixCls`, replace `ant` with your prefix: ```css @media (prefers-reduced-motion: reduce) { *:not(.ant-dropdown, .ant-select-dropdown, .ant-cascader-dropdown, .ant-picker-dropdown, .ant-tooltip, .ant-popover), *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } ``` --- Title: For Agents URL: https://www.antdv-next.com/docs/vue/for-agents.md --- This page provides a ready-to-use prompt that helps any AI coding agent work effectively with antdv-next. ## Copy This Prompt {#copy-prompt} Copy it into your Agent conversation or automation workflow. ```text This version may contain breaking changes. Its component APIs, conventions, and file structure may differ from those in your training data. Before writing any code, read https://antdv-next.com/docs/vue/for-agents.md and https://raw.githubusercontent.com/antdv-next/cli/main/skills/antdv/SKILL.md, pay attention to deprecation notices, and follow the instructions for using antdv-next. If you can install skills, run: npx skills add antdv-next/cli ``` ## What the Agent Gets {#what-the-agent-gets} ### CLI — Offline Knowledge and Project Tools {#cli} [`@antdv-next/cli`](https://github.com/antdv-next/cli) installs all metadata with the package: every Prop, Event, Slot, Token, Demo, and Changelog entry can be queried in milliseconds, completely offline. ```bash npm install -g @antdv-next/cli ``` ```bash antdv init # Initialize a project antdv list # List all components and version information antdv info Button # Component props, events, slots, types, and defaults antdv doc Button # Complete Markdown documentation antdv demo Select basic # Runnable demo source code antdv token DatePicker # Design Token values antdv design.md # Design language documentation (design.md) antdv semantic Table # class / styles structure antdv changelog 1.2.0 1.0.0 Select # Compare API differences across versions antdv doctor # Diagnose project configuration issues antdv env # Collect environment information for bug reports antdv usage ./src # Analyze antdv-next imports in a project antdv lint ./src # Check deprecated APIs and best practices antdv migrate 1 2 # v1-to-v2 migration guide antdv migrate 1 2 --apply ./src # Generate an Agent migration prompt antdv mcp # Start the MCP server for IDE integration antdv setup --client claude # Connect an AI Agent through MCP/Skill antdv upgrade # Upgrade the CLI to the latest version ``` Complete reference: [CLI](/docs/vue/cli) ### design.md — Design Language Context {#design-md} [design.md](https://antdv-next.com/design.md) is intended for AI design tools. It describes the visual language, component patterns, and theme Tokens of the default antdv-next Light theme. Complete reference: [design.md](/docs/vue/design-md) ### MCP Server — IDE Integration {#mcp} The CLI can also run as an MCP server. It provides seven tools and supports integration with IDEs such as Claude Code, Cursor, and VS Code. ```json { "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } } ``` Complete reference: [MCP Server](/docs/vue/mcp) ### LLMs.txt — Structured Documentation for LLMs {#llms-txt} Inject the complete component documentation directly into the AI context: | File | Description | | --- | --- | | [llms.txt](https://antdv-next.com/llms.txt) | Navigation file containing links to all documentation and components | | [design.md](https://antdv-next.com/design.md) | Design language description for AI design tools | | [llms-full.txt](https://antdv-next.com/llms-full.txt) | Complete component documentation in English | | [llms-full-cn.txt](https://antdv-next.com/llms-full-cn.txt) | Complete component documentation in Chinese | You can also retrieve documentation for an individual component at `https://antdv-next.com/components/.md`. Complete references: [LLMs.txt](/docs/vue/llms) and [design.md](/docs/vue/design-md) --- Title: Getting Started URL: https://www.antdv-next.com/docs/vue/getting-started.md --- Antdv Next is dedicated to providing a **good development experience** for programmers. Before starting, it is recommended to learn [Vue](https://vuejs.org/) first, and correctly install and configure [Node.js](https://nodejs.org/) v20 or above. The official guide assumes that you have intermediate knowledge about HTML, CSS, and JavaScript, and have fully mastered the correct development approach with the Vue ecosystem. If you are just starting to learn front-end or Vue, it may not be the best idea to use the UI framework as your first step. --- ## Your First Example {#first-example} Here is a simple online StackBlitz demo of an Antdv Next component to show the usage of Antdv Next. Follow the steps below to play around with Antdv Next yourself: ### 1. Create a StackBlitz {#create-stackblitz} Visit [Antdv Next Start Template](https://stackblitz.com/edit/vitejs-vite-stk21cho?file=src%2FApp.vue) to create an online StackBlitz example -- don't forget to save to create a new instance. ### 2. Use a Component {#use-antdv-next-component} If you are working in a local Vue project, install `antdv-next` first. The StackBlitz created above already includes this dependency. Replace the contents of `App.vue` with the following code. As you can see, you can directly use `antdv-next` components with the SFC approach. ```vue ``` ### 3. Explore More Components {#explore-components} You can view the list of components in the side menu of the Components page, such as the [Alert](/components/alert) component. Plenty of examples are also provided in the component pages and API documentation at the bottom. Find the first example in the code demo section and click the "Show Code" icon to expand the source code. You can copy the code directly to your StackBlitz to try and adjust it yourself. ## Import on Demand {#import-on-demand} ### Tree Shaking Import `antdv-next` supports tree shaking of ES modules by default, so using `import { Button } from 'antdv-next';` would drop js code you didn't use. ### Auto Import with `unplugin-vue-components` You can use [unplugin-vue-components](https://github.com/unplugin/unplugin-vue-components) to achieve automatic on-demand import. We provide a library adapter `@antdv-next/auto-import-resolver`. #### Installation #### Usage > This section only introduces usage with Vite. For more details, please refer to [@antdv-next/auto-import-resolver](https://www.npmjs.com/package/@antdv-next/auto-import-resolver). ```ts import { AntdvNextResolver } from '@antdv-next/auto-import-resolver' // vite.config.ts import Components from 'unplugin-vue-components/vite' export default defineConfig({ plugins: [ Components({ resolvers: [AntdvNextResolver()], }), ], }) ``` --- Title: Internationalization URL: https://www.antdv-next.com/docs/vue/i18n.md --- The default language of `antdv-next` is currently English. If you wish to use other languages, follow the instructions below. ## ConfigProvider `antdv-next` provides a Vue Component [ConfigProvider](/components/config-provider) for configuring antd locale text globally. ```vue ``` You can see the complete configuration here: [ConfigProvider](/components/config-provider). Note: `fr_FR` is the filename, the following table also follows the same rules. The following languages are currently supported: ### Supported languages: | Language | Filename | | ------------------------ | -------- | | Arabic | ar_EG | | Azerbaijani | az_AZ | | Bulgarian | bg_BG | | Bangla (Bangladesh) | bn_BD | | Belarusian | by_BY | | Catalan | ca_ES | | Czech | cs_CZ | | Danish | da_DK | | German | de_DE | | Greek | el_GR | | English (United Kingdom) | en_GB | | English | en_US | | Spanish | es_ES | | Spanish (United States) | es_US | | Basque | eu_ES | | Estonian | et_EE | | Persian | fa_IR | | Finnish | fi_FI | | French (Belgium) | fr_BE | | French (Canada) | fr_CA | | French (France) | fr_FR | | Irish (Ireland) | ga_IE | | Galician (Spain) | gl_ES | | Hebrew | he_IL | | Hindi | hi_IN | | Croatian | hr_HR | | Hungarian | hu_HU | | Armenian | hy_AM | | Indonesian | id_ID | | Italian | it_IT | | Icelandic | is_IS | | Japanese | ja_JP | | Georgian | ka_GE | | Kurdish (Kurmanji) | kmr_IQ | | Kannada | kn_IN | | Kazakh | kk_KZ | | Khmer | km_KH | | Korean | ko_KR | | Lithuanian | lt_LT | | Latvian | lv_LV | | Macedonian | mk_MK | | Malayalam (India) | ml_IN | | Marathi (India) | mr_IN | | Mongolian | mn_MN | | Malay (Malaysia) | ms_MY | | Burmese | my_MM | | Norwegian | nb_NO | | Nepali | ne_NP | | Dutch (Belgium) | nl_BE | | Dutch | nl_NL | | Polish | pl_PL | | Portuguese (Brazil) | pt_BR | | Portuguese | pt_PT | | Romanian | ro_RO | | Russian | ru_RU | | Sinhalese / Sinhala | si_LK | | Slovak | sk_SK | | Serbian | sr_RS | | Slovenian | sl_SI | | Albanian | sq_AL | | Swedish | sv_SE | | Tamil | ta_IN | | Thai | th_TH | | Turkish | tr_TR | | Turkmen | tk_TK | | Urdu (Pakistan) | ur_PK | | Ukrainian | uk_UA | | Uzbek(latn) | uz_UZ | | Vietnamese | vi_VN | | Chinese (Simplified) | zh_CN | | Chinese (Traditional) | zh_HK | | Chinese (Traditional) | zh_TW | See more usage at [ConfigProvider](/components/config-provider). --- Title: LLMs.txt URL: https://www.antdv-next.com/docs/vue/llms.md --- This guide explains how to enable AI tools like Cursor, Windsurf, and Claude to better understand Antdv Next. ## What is LLMs.txt? We support [LLMs.txt](https://llmstxt.org/) files for making the Antdv Next documentation available to large language models (LLMs). This feature helps AI tools better understand our component library, its APIs, and usage patterns. ## Available Routes We provide several LLMs.txt routes to help AI tools access our documentation: - [llms.txt](https://antdv-next.com/llms.txt) - Contains a structured overview of all components and their documentation links - [llms-full.txt](https://antdv-next.com/llms-full.txt) - Provides comprehensive documentation including implementation details and examples ## Usage with AI Tools ### Cursor Use the `@Docs` feature in Cursor to include the LLMs.txt files in your project. This helps Cursor provide more accurate code suggestions and documentation for Antdv Next components. [Read more about @Docs in Cursor](https://docs.cursor.com/context/@-symbols/@-docs) ### Windsurf Reference the LLMs.txt files using `@` or in your `.windsurf/rules` files to enhance Windsurf's understanding of Antdv Next components. [Read more about Windsurf Memories](https://docs.windsurf.com/windsurf/cascade/memories) ### Claude Code In Claude Code, add `LLMs.txt` to the workspace Knowledge Base (Docs / Context Files) configuration. This allows the file to be referenced during code completion and explanation, improving understanding of Antdv Next components. [Learn more about Claude Code document context configuration](https://code.claude.com/docs) ### Gemini CLI In Gemini CLI, you can specify the `LLMs.txt` file path with the `--context` parameter or in `.gemini/config.json`, enabling Gemini to reference the document when answering or generating code. [Learn more about Gemini CLI context configuration](https://ai.google.dev/gemini-api/docs?hl=en) ### Trae In Trae, place the `LLMs.txt` file into the project’s knowledge sources and enable referencing in the settings. This allows Trae to better support Antdv Next components when generating or analyzing code. [Learn more about Trae knowledge sources](https://trae.ai/docs) ### Qoder In Qoder, you can add `LLMs.txt` as an external knowledge file in `.qoder/config.yml`, or temporarily reference it in a conversation with `@docs LLMs.txt`, enhancing support for Antdv Next components. [Learn more about Qoder configuration](https://docs.qoder.com/) ### Other AI Tools Any AI tool that supports LLMs.txt can use these routes to better understand Antdv Next. Simply point your tool to any of the routes above. --- Title: MCP Server URL: https://www.antdv-next.com/docs/vue/mcp.md --- This guide explains how to use antdv-next with AI tools through the Model Context Protocol (MCP). ## What is MCP? {#what-is-mcp} [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open protocol that enables AI models to interact with external tools and data sources. Through MCP, AI assistants can access up-to-date documentation, code examples, and API references. ## Official MCP Server {#official-mcp-server} After installing [`@antdv-next/cli`](https://github.com/antdv-next/cli), you can start the official MCP server with the `antdv mcp` command. It provides seven tools and supports IDE integration. ### Tools {#tools} | Tool | Description | | --- | --- | | `antdv_list` | List available components | | `antdv_info` | Get component API specifications | | `antdv_doc` | Get complete documentation | | `antdv_demo` | Get runnable code examples | | `antdv_token` | Query Design Token values | | `antdv_design_md` | Get the design language document | | `antdv_semantic` | Inspect the DOM structure and styling hooks | ### Configuration {#configuration} Add the MCP server to your IDE configuration: ```json { "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } } ``` If you have installed the CLI globally (`npm i -g @antdv-next/cli`), you can also use: ```json { "mcpServers": { "antdv": { "command": "antdv", "args": ["mcp"] } } } ``` You can specify an antdv-next version with an additional option: ```json { "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp", "--ver", "1.5.0"] } } } ``` You can also let the CLI write the configuration for a supported client automatically: ```bash antdv setup --client claude antdv setup --client cursor --mode both antdv setup --client vscode --write-instructions antdv setup --client codex ``` Supported clients include `claude`, `cursor`, `vscode`, and `codex`. Available setup modes are `mcp`, `skill`, and `both`. ## Usage with AI Tools {#usage-with-ai-tools} | Tool | Instructions | Configuration | | --- | --- | --- | | **Cursor** | Add it to `.cursor/mcp.json` or go to Settings → Features → MCP. [Documentation](https://docs.cursor.com/zh/context/@-symbols/@-docs) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **Windsurf** | Add it to `~/.codeium/windsurf/mcp_config.json`. [Documentation](https://docs.windsurf.com/windsurf/cascade/memories) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **Claude Code** | Add it to `mcpServers` in the Claude settings. [Documentation](https://docs.anthropic.com/en/docs/claude-code) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **VS Code** | Add it to `.vscode/mcp.json` or go to Settings → MCP. [Documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) | `{ "servers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **Codex** | Add it to `.codex/mcp.json`. [Documentation](https://github.com/openai/codex) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **Gemini CLI** | Add it to the MCP configuration. [Documentation](https://ai.google.dev/gemini-api/docs?hl=en) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **Trae** | Add it in the MCP settings. [Documentation](https://www.trae.ai/docs) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **Qoder** | Add it to the MCP configuration. [Documentation](https://docs.qoder.com/) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | | **Neovate Code** | Configure MCP in Settings or describe the task in a prompt. [Documentation](https://github.com/neovateai/neovate-code) | `{ "mcpServers": { "antdv": { "command": "npx", "args": ["-y", "@antdv-next/cli", "mcp"] } } }` | ## Alternative: Use LLMs.txt {#alternative-llms-txt} If your AI tool does not support MCP, you can use our [LLMs.txt](/docs/vue/llms) resources instead. We provide: - [llms.txt](https://antdv-next.com/llms.txt) - A structured overview of all components - [llms-full.txt](https://antdv-next.com/llms-full.txt) - Complete documentation with examples ## Learn More {#learn-more} - [Model Context Protocol documentation](https://modelcontextprotocol.io/) - [Antdv Next CLI](/docs/vue/cli) - [@antdv-next/cli GitHub repository](https://github.com/antdv-next/cli) - [Antdv Next LLMs.txt guide](/docs/vue/llms) --- Title: Migrating from Ant Design Vue to Antdv Next URL: https://www.antdv-next.com/docs/vue/migration-antdv-next.md --- This document will help you migrate from `ant-design-vue` to `antdv-next`. `antdv-next` originally implemented some compatibility measures for `ant-design-vue`, but there are still some `API` incompatibilities that cannot be directly adapted. Before upgrading, you need to ensure that your environment meets the new requirements. ## Upgrade Preparation 1. Please upgrade to the latest version of `ant-design-vue@4` to ensure you are using the latest antdv `API`. 2. It is recommended to upgrade Vue 3 to version `3.5.x`. ```shell pnpm add antdv-next # or npm install antdv-next # or yarn add antdv-next ``` ## What are the Incompatible Changes ### Replacing @ant-design/icons-vue - ⚠️ **Important:** `@ant-design/icons-vue` is not adapted for `antdv-next`, which may cause theme switching and `layer` mode to not work properly. Please ensure you install and use `@antdv-next/icons`. ```shell pnpm add @antdv-next/icons # or npm install @antdv-next/icons # or yarn add @antdv-next/icons ``` ### DOM Structure Adjustments - antdv-next has upgraded and optimized the DOM structure of many components to improve maintainability and consistency. - For most projects that normally use `ant-design-vue` styles, this will not have a significant impact. - ⚠️ If your project has custom styles targeting internal DOM nodes of components (such as relying on specific selectors or hierarchical structures), you may need to manually check and adjust styles after upgrading. ### API Adjustments ⚠️ The following APIs have been marked as **Deprecated**. Although these properties can still be used currently, the console will show deprecation warnings, and they will be removed in 2.0. To maintain code maintainability and compatibility, **it is recommended to migrate to the corresponding replacement properties as soon as possible**. - `Alert` - `closeText` deprecated, changed to `closable.closeIcon`. - `message` deprecated, changed to `title`. - `Anchor` - `Anchor children` deprecated, changed to `items`. - `AutoComplete` - `dropdownMatchSelectWidth` deprecated, changed to `popupMatchSelectWidth`. - `dropdownStyle` deprecated, changed to `styles.popup.root`. - `dropdownClassName` deprecated, changed to `classes.popup.root`. - `popupClassName` deprecated, changed to `classes.popup.root`. - `dropdownRender` deprecated, changed to `popupRender`. - `onDropdownVisibleChange` deprecated, changed to `onOpenChange`. - `dataSource` deprecated, changed to `options`. - `Avatar.Group` - `maxCount` deprecated, changed to `:max="{count: number}"`. - `maxStyle` deprecated, changed to `:max="{style: CSSProperties}"`. - `maxPopoverPlacement` deprecated, changed to `:max="{popover: PopoverProps}"`. - `maxPopoverTrigger` deprecated, changed to `:max="{popover: PopoverProps}"`. - `BackTop` - `FloatButton.BackTop` deprecated, changed to `FloatButton.BackTop`. - `Breadcrumb` - `routes` deprecated, changed to `items`. - `routes.children` deprecated, changed to `items.menu`. - `itemRender="props"` deprecated, changed to `itemRender="item"`. - `Breadcrumb.Item` and `Breadcrumb.Separator` deprecated, changed to `items`. - `Button.Group` - `BackTop` deprecated, changed to `FloatButton.BackTop`. - `Button` - `iconPosition` deprecated, changed to `iconPlacement`. - `Calendar` - `dateFullCellRender` deprecated, changed to `fullCellRender`. - `dateCellRender` deprecated, changed to `cellRender`. - `monthFullCellRender` deprecated, changed to `fullCellRender`. - `monthCellRender` deprecated, changed to `cellRender`. - `Card` - `headStyle` deprecated, changed to `styles.header`. - `bodyStyle` deprecated, changed to `styles.body`. - `bordered` deprecated, changed to `variant`. - `Carousel` - `dotPosition` deprecated, changed to `dotPlacement`. - `Cascader` - `dropdownClassName` deprecated, changed to `classes.popup.root`. - `dropdownStyle` deprecated, changed to `styles.popup.root`. - `dropdownRender` deprecated, changed to `popupRender`. - `dropdownMenuColumnStyle` deprecated, changed to `styles.popup.listItem`. - `popupMenuColumnStyle` deprecated, changed to `styles.popup.listItem`. - `onDropdownVisibleChange` deprecated, changed to `onOpenChange`. - `onPopupVisibleChange` deprecated, changed to `onOpenChange`. - `bordered` deprecated, changed to `variant`. - `Collapse` - `destroyInactivePanel` deprecated, changed to `destroyOnHidden`. - `expandIconPosition` deprecated, changed to `expandIconPlacement`. - `Collapse.Panel` - `disabled` deprecated, changed to `collapsible="disabled"`. - `ConfigProvider` - `dropdownMatchSelectWidth` deprecated, changed to `popupMatchSelectWidth`. - `DatePicker.RangePicker` - `dropdownClassName` deprecated, changed to `classes.popup.root`. - `popupClassName` deprecated, changed to `classes.popup.root`. - `popupStyle` deprecated, changed to `styles.popup.root`. - `bordered` deprecated, changed to `variant`. - `onSelect` deprecated, changed to `onCalendarChange`. - `DatePicker` - `dropdownClassName` deprecated, changed to `classes.popup.root`. - `popupClassName` deprecated, changed to `classes.popup.root`. - `popupStyle` deprecated, changed to `styles.popup.root`. - `bordered` deprecated, changed to `variant`. - `onSelect` deprecated, changed to `onCalendarChange`. - `Descriptions` - `labelStyle` deprecated, changed to `styles.label`. - `contentStyle` deprecated, changed to `styles.content`. - `Divider` - `type` deprecated, changed to `orientation`. - `orientationMargin` deprecated, changed to `styles.content.margin`. - `Drawer` - `headerStyle` deprecated, changed to `styles.header`. - `bodyStyle` deprecated, changed to `styles.body`. - `footerStyle` deprecated, changed to `styles.footer`. - `contentWrapperStyle` deprecated, changed to `styles.wrapper`. - `destroyOnClose` deprecated, changed to `destroyOnHidden`. - `maskStyle` deprecated, changed to `styles.mask`. - `drawerStyle` deprecated, changed to `styles.section`. - `destroyInactivePanel` deprecated, changed to `destroyOnHidden`. - `width` deprecated, changed to `size`. - `height` deprecated, changed to `size`. - `Dropdown.Button` - `Dropdown.Button` deprecated, changed to `Space.Compact + Dropdown + Button`. - `Dropdown` - `dropdownRender` deprecated, changed to `popupRender`. - `destroyPopupOnHide` deprecated, changed to `destroyOnHidden`. - `overlay(v-slot)` deprecated, changed to `popupRender`. - `overlayClassName` deprecated, changed to `classes.root`. - `overlayStyle` deprecated, changed to `styles.root`. - `placement: xxxCenter` deprecated, changed to `placement: xxx`. - `` deprecated, changed to ``. - `Empty` - `imageStyle` deprecated, changed to `styles.image`. - `FloatButton` - `description` deprecated, changed to `content`. - `Image` - `wrapperStyle` deprecated, changed to `styles.root`. - `visible` deprecated, changed to `open`. - `onVisibleChange` deprecated, changed to `onOpenChange`. - `maskClassName` deprecated, changed to `classes.cover`. - `rootClassName` deprecated, changed to `classes.root`. - `toolbarRender` deprecated, changed to `actionsRender`. - `Input` - `addonAfter` deprecated, changed to `SpaceCompact`. - `addonBefore` deprecated, changed to `SpaceCompact`. - `Input.Group` - `Input.Group` deprecated, changed to `Space.Compact`. - `InputNumber` - `bordered` deprecated, changed to `variant`. - `addonAfter` deprecated, changed to `Space.Compact`. - `addonBefore` deprecated, changed to `Space.Compact`. - `Mentions` - `Mentions.Option` deprecated, changed to `options`. - `Menu` - `value` deprecated, changed to `key`. - `children` deprecated, changed to `items`. - `select` event, changed to `(value: string | number, option: Option) => void`. - `Modal` - `bodyStyle` deprecated, changed to `styles.body`. - `maskStyle` deprecated, changed to `styles.mask`. - `destroyOnClose` deprecated, changed to `destroyOnHidden`. - `Notification` - `btn` deprecated, changed to `actions`. - `message` deprecated, changed to `title`. - `Progress` - `strokeWidth` deprecated, changed to `size`. - `width` deprecated, changed to `size`. - `trailColor` deprecated, changed to `railColor`. - `gapPosition` deprecated, changed to `gapPlacement`. - `Select` - `dropdownMatchSelectWidth` deprecated, changed to `popupMatchSelectWidth`. - `dropdownStyle` deprecated, changed to `styles.popup.root`. - `dropdownClassName` deprecated, changed to `classes.popup.root`. - `popupClassName` deprecated, changed to `classes.popup.root`. - `dropdownRender` deprecated, changed to `popupRender`. - `onDropdownVisibleChange` deprecated, changed to `onOpenChange`. - `bordered` deprecated, changed to `variant`. - `Slider` - `tooltipPrefixCls` deprecated, changed to `tooltip.prefixCls`. - `getTooltipPopupContainer` deprecated, changed to `tooltip.getPopupContainer`. - `tipFormatter` deprecated, changed to `tooltip.formatter`. - `tooltipPlacement` deprecated, changed to `tooltip.placement`. - `tooltipVisible` deprecated, changed to `tooltip.open`. - `SpaceCompact` - `direction` deprecated, changed to `orientation`. - `Space` - `direction` deprecated, changed to `orientation`. - `split` deprecated, changed to `separator`. - `Spin` - `tip` deprecated, changed to `description`. - `wrapperClassName` deprecated, changed to `classes.root`. - `Splitter` - `layout` deprecated, changed to `orientation`. - `Countdown` - `` deprecated, changed to ``. - `Statistic` - `valueStyle` deprecated, changed to `styles.content`. - `Steps` - `labelPlacement` deprecated, changed to `titlePlacement`. - `progressDot` deprecated, changed to `type="dot"`. - `direction` deprecated, changed to `orientation`. - `items.description` deprecated, changed to `items.content`. - `Table` - `pagination.position` deprecated, changed to `pagination.placement`. - `onSelectInvert` deprecated, changed to `onChange`. - `filterDropdownOpen` deprecated, changed to `filterDropdownProps.open`. - `onFilterDropdownOpenChange` deprecated, changed to `filterDropdownProps.onOpenChange`. - `filterCheckall` deprecated, changed to `locale.filterCheckAll`. - `customRender` deprecated, changed to `render`. - `customRow` deprecated, changed to `onRow`. - `onResizeColumn` deprecated, changed to `onResize`. - `customFilterIcon` deprecated, changed to `filterIcon`. - `customFilterDropdown` deprecated, changed to `filterDropdown`. - `customCell` deprecated, changed to `onCell`. - `Tabs` - `popupClassName` deprecated, changed to `classes.popup`. - `tabPosition` deprecated, changed to `tabPlacement`. - `destroyInactiveTabPane` deprecated, changed to `destroyOnHidden`. - `Tabs.TabPane` deprecated, changed to `items`. - `Tag` - `bordered={false}` deprecated, changed to `variant="filled"`. - `color="xxx-inverse"` deprecated, changed to `variant="solid"`. - `TimePicker` - `addon` deprecated, changed to `renderExtraFooter`. - `Timeline` - `Timeline.Item` deprecated, changed to `items`. - `pending` deprecated, changed to `items`. - `pendingDot` deprecated, changed to `items`. - `mode=left|right` deprecated, changed to `mode=start|end`. - `Tooltip` - `overlayStyle` deprecated, changed to `styles.root`. - `overlayInnerStyle` deprecated, changed to `styles.container`. - `overlayClassName` deprecated, changed to `classes.root`. - `destroyTooltipOnHide` deprecated, changed to `destroyOnHidden`. - `Popover` - `overlayClassName` deprecated, changed to `classes.container`. - `Transfer` - `listStyle` deprecated, changed to `styles.section`. - `operationStyle` deprecated, changed to `styles.actions`. - `operations` deprecated, changed to `actions`. - `TreeSelect` - `dropdownMatchSelectWidth` deprecated, changed to `popupMatchSelectWidth`. - `dropdownStyle` deprecated, changed to `styles.popup.root`. - `dropdownClassName` deprecated, changed to `classes.popup.root`. - `popupClassName` deprecated, changed to `classes.popup.root`. - `dropdownRender` deprecated, changed to `popupRender`. - `onDropdownVisibleChange` deprecated, changed to `onOpenChange`. - `bordered` deprecated, changed to `variant`. - `Tree` - `tree.dataRef` deprecated, changed to `tree`. - `treeData.title(v-slot)` deprecated, changed to `titleRender`. - `notification` - `message` deprecated, changed to `title`. - `btn` deprecated, changed to `actions`. - `close` deprecated, changed to `destroy`. ### Overlay Components (Modal, Drawer, etc.) - Added `mask` overlay functionality with blur effect support. - Enabled by default, can be disabled with the following configuration: ```vue ``` ### Tag Margin Adjustment `antdv-next` removes the default margin at the end of the `Tag` component (previously, Tag had an additional `margin-inline-end` at the end). If your layout or custom styles depend on this behavior, please use the `tag.styles` option in `ConfigProvider` to supplement it: ```vue ``` ### Tooltip Adjustments The `overlay` slot has been removed. Use `popupRender` instead. ### Form Adjustments - Removed `a-form-rest` to cancel passive collection of components. By default, we do not actively collect components inside `a-form-item` as form fields, and you need to manually specify them through the `name` attribute. ## Upgrade Impact Investigation Checklist To ensure that your project runs normally after upgrading to `antdv-next`, please refer to the following checklist and confirm each item: - **Vue Version**: It is recommended to use `vue@3.5.x`. - **@ant-design/icons Upgrade**: Confirm that the `@ant-design/icons` version has been upgraded to `@antdv-next/icons` to match `antdv-next`. - **Browser Compatibility**: Confirm that the target user browsers are modern browsers and support CSS variables. - **Custom Style Check**: If you have CSS customizations targeting internal DOM nodes of components, verify that they still work under `antdv-next`. - **Overlay Mask Configuration**: Check if Modal, Drawer, and other overlay components need to disable the `mask` blur effect. If not needed, keep the default. - **Build Tool Configuration**: Confirm that there are no errors after the upgrade build, and that CSS variables and CSS-in-JS work properly. - **Console Warnings**: Run the application and observe the console, handling all `legacy API` prompts. ## Encountering Issues If you encounter problems during the upgrade process, please provide feedback on [GitHub issues](https://github.com/antdv-next/antdv-next/issues/). We will respond as soon as possible and improve the relevant documentation. --- Title: Nuxt URL: https://www.antdv-next.com/docs/vue/nuxt.md --- `@antdv-next/nuxt` is the official Nuxt module for `antdv-next`. ## Version Requirements - Nuxt >= 4.0.0 - Vue >= 3.5.0 - antdv-next >= 1.0.4 - @antdv-next/icons >= 1.0.1 ## Installation ```shell npx nuxi@latest module add @antdv-next/nuxt ``` Or install dependencies manually: ## Configuration ```ts export default defineNuxtConfig({ modules: ['@antdv-next/nuxt'], antd: { icon: true, }, }) ``` The module config key is `antd`. ## Usage ```vue ``` By default, components are registered with prefix `A`, for example `AButton`, `ATable`, and `AQrcode`. ## Styles Add reset styles: ```ts export default defineNuxtConfig({ css: ['antdv-next/dist/reset.css'], }) ``` If you use zero-runtime theme mode (recommended), also include: ```ts export default defineNuxtConfig({ css: [ 'antdv-next/dist/reset.css', 'antdv-next/dist/antd.css', ], }) ``` ## Options | Option | Type | Default | Description | | --- | --- | --- | --- | | `icon` | `boolean` | `false` | Enable auto-registration for `@antdv-next/icons`. | | `prefix` | `string` | `'A'` | Prefix for all auto-registered components. | | `include` | `ComponentName[]` | `undefined` | Only register listed components. Higher priority than `exclude`. | | `exclude` | `ComponentName[]` | `undefined` | Exclude listed components when `include` is not set. | | `includeIcons` | `IconName[]` | `undefined` | Only register listed icons. Higher priority than `excludeIcons`. | | `excludeIcons` | `IconName[]` | `undefined` | Exclude listed icons when `includeIcons` is not set. | Notes: - `includeIcons` and `excludeIcons` work only when `icon` is enabled. - `ComponentName` and `IconName` are exported from the module type definitions. ## Full Example `assets/entry.css` ```css @import "antdv-next/dist/reset.css"; ``` ```ts export default defineNuxtConfig({ modules: ['@antdv-next/nuxt'], css: ['~/assets/entry.css'], antd: { prefix: 'A', icon: true, include: ['Button', 'Table', 'QRCode'], includeIcons: ['HomeOutlined', 'SearchOutlined'], }, }) ``` --- Title: Secondary Development URL: https://www.antdv-next.com/docs/vue/secondary-development.md --- If you want to build your own business component library, documentation site, and demo system on top of `antdv-next`, we provide a ready-to-use starter repository: [docs-base](https://github.com/antdv-next/docs-base). This template is more than a basic scaffold. It combines component source code, documentation pages, a Markdown demo pipeline, and library build outputs in one project, making it suitable for teams that want to evolve and publish internal or public component libraries continuously. ## Template Repository - GitHub: [https://github.com/antdv-next/docs-base](https://github.com/antdv-next/docs-base) - Chinese README: [README.zh-CN.md](https://github.com/antdv-next/docs-base/blob/main/README.zh-CN.md) - English README: [README.md](https://github.com/antdv-next/docs-base/blob/main/README.md) ## When to use it Use this template when you want to: - build a business-oriented component library based on `antdv-next` - keep component source, demos, and documentation in one place - ship typed Vue 3 components - write docs in Markdown while embedding real Vue demos - maintain Chinese and English docs with the same structure - create your own theme system instead of inheriting a fixed visual style ## What is included - Vue 3 + TypeScript + Vite - `antdv-next` as the UI foundation - preserved module output, bundled ESM, and UMD builds - generated type declarations - a custom Markdown-to-Vue docs pipeline - live demo rendering, source extraction, and hot updates - UnoCSS, Vue Router, Pinia, and Vue I18n integration - sample components and documentation pages that you can extend directly ## One thing to do before you start The template uses `@org/components` as a placeholder package name. Before secondary development, do a global search and replace for `@org/components` and switch it to your actual package name. ## Quick Start ### 1. Clone the template ```bash git clone https://github.com/antdv-next/docs-base.git cd docs-base ``` ### 2. Install dependencies ```bash pnpm install ``` ### 3. Run the docs app ```bash pnpm docs:dev ``` The local development site runs at [http://localhost:6878](http://localhost:6878) by default. ### 4. Build the library ```bash pnpm build ``` Other useful commands: ```bash pnpm docs:build pnpm docs:preview pnpm type-check pnpm test:unit ``` ## Recommended Workflow ### 1. Rename the package and publishing metadata - replace `@org/components` globally - update the package name and publish metadata in `package.json` ### 2. Build your business components Create or adapt components under `components/`, and export them from `components/index.ts` so the public API stays explicit and stable. ### 3. Write documentation pages Add Markdown pages under `docs/src/pages/`. The template auto-registers `.md` files as routes through `import.meta.glob`. Recommended locale naming: - `*.zh-CN.md` - `*.en-US.md` ### 4. Add demos next to docs pages Place demo files in a sibling `demo/` directory and reference them like this: ```md Basic example ``` The docs pipeline will automatically: - render the live Vue demo - extract the source code - generate highlighted code blocks - hot-update demo metadata during development ## Project Structure ```text . ├─ components/ # Business component source ├─ docs/ # Documentation app │ ├─ src/pages/ # Markdown pages and home page │ ├─ src/components/demo/ # Demo renderer and source viewer │ └─ plugins/markdown/ # Markdown / demo transform pipeline ├─ vite.build.config.ts # Preserve-module build ├─ vite.esm.config.ts # Bundled ESM build ├─ vite.umd.config.ts # UMD build └─ global.d.ts # Global component typings ``` ## Theme Notes The template is intentionally theme-neutral. You can build your own brand style, design tokens, and component appearance on top of it. For the theming side, see [Customize Theme](/docs/vue/customize-theme). ## Who this template is for If you do not want to maintain demos in a separate repo and prefer to keep: - component implementation - documentation pages - live examples - multilingual content - build outputs in a single codebase, `docs-base` is a practical starting point. --- Title: Skills URL: https://www.antdv-next.com/docs/vue/skills.md --- Agent Skills are modular capabilities that extend AI functionality. Antdv Next Skills provide AI Agents with specialized knowledge of the Antdv Next component library, enabling AI to accurately understand and use components. ## What are Agent Skills? Agent Skills are reusable, file-system based resources that provide AI Agents with domain-specific expertise: workflows, context, and best practices, transforming a general-purpose agent into an expert. Unlike prompts (which are conversation-level, one-time task instructions), **Skills are loaded on-demand without needing to repeat the same guidance across multiple conversations**. ### Why Use Antdv Next Skills? **Key Benefits**: - **Specialize AI**: Customize functionality for Antdv Next component development, making AI a component library expert - **Reduce Repetition**: Create once, use automatically. No need to tell AI how to use components every time - **Compose Capabilities**: Combine Skills to build complex component development workflows - **Reduce Hallucinations**: Avoid AI generating non-existent Props or incorrect usage by providing real documentation and examples - **Offline Available**: Skills localizes documentation content, ensuring stability and reliability without depending on external links ## How Skills Work Skills leverage AI Agent's virtual machine environment to provide capabilities beyond what's possible with prompts alone. AI Agents run in a virtual machine with file system access, allowing Skills to exist as directories containing instructions, executable code, and reference materials. This file-system based architecture supports **progressive disclosure**: AI Agents load information on-demand in stages, rather than consuming context upfront. ### Three-Level Loading Mechanism Skills can contain three types of content, each loaded at different times: | Level | Load Time | Token Cost | Content | |---|---|---|---| | **Level 1: Metadata** | Always (at startup) | ~100 tokens | `name` and `description` in YAML frontmatter | | **Level 2: Instructions** | When Skill is triggered | < 5k tokens | SKILL.md body with instructions and guidance | | **Level 3: Resources** | On-demand | Virtually unlimited | Bundled files executed via bash, not loaded into context | **What does this mean?** - AI Agent only knows at startup that "there's an Antdv Next Skill available to help with components" - When you request "create a Button component", the AI loads the complete Button documentation - If documentation references example code, AI reads those files on-demand - Unused component documentation doesn't consume any context > 💡 **Analogy**: Like an onboarding guide for a new team member. They know the guide exists (metadata), open relevant chapters when needed (instructions), and consult detailed appendices when necessary (resources). ## Installation :::success Important Note We recommend using Antdv Next Skill together with [Antfu's Skills Collection](https://github.com/antfu/skills) for better results. If you use `vue`, consider importing the `vue` skill and related skills to reduce AI hallucinations and ensure more standardized output! ::: Install the Antdv Next skill set via Skills CLI: ```bash npx skills add antdv-next/skills ``` ## Usage Once installed, AI Agents will **automatically use** Skills when you make requests related to Antdv Next components. For the most stable results, it's recommended to explicitly declare: ``` use antdv-next skill, ``` This explicitly triggers the skill; otherwise, activation may be unstable due to insufficient matching. ### Usage Examples **Basic Component Development**: ``` use antdv-next skill, create a login page with form validation ``` **Complex Interactions**: ``` use antdv-next skill, implement a data table with search, pagination, and filtering ``` **Component Customization**: ``` use antdv-next skill, refactor the Button component according to AGENTS.md specifications, ensuring Props/Emits/Slots are correctly defined ``` **Problem Diagnosis**: ``` use antdv-next skill, why isn't my Form component validation working? ``` ## Technical Implementation ### Skill Structure Antdv Next Skills follows the standard Skill structure: ```yaml --- name: antdv-next description: Antdv Next component library development expert... --- # Antdv Next Component Development ## Quick Start [Component development workflow] ## API Conventions [Props/Emits/Slots specifications] ## Examples For specific component usage, see [references/components/](references/components/) ``` ### Generation Process 1. **Documentation Extraction**: Extract component documentation markdown files from the playground 2. **Example Conversion**: Convert Vue SFC examples to markdown format 3. **Content Aggregation**: Copy documentation and examples to the `references/` directory 4. **Metadata Generation**: Create YAML frontmatter and main instructions 5. **Offline Optimization**: Ensure all content is available offline without depending on external links The generation scripts support single-language output to reduce Skill size: ```bash pnpm run generate:en # Generate English version pnpm run generate:zh # Generate Chinese version ``` ## Supported AI Platforms Antdv Next Skills, as a **custom Skill**, can be used on multiple AI platforms: 1. Claude Code 2. Codex 3. Github Copilot 4. Cursor 5. Antigravity 6. ... ## Contributing This project is an **early experiment** aimed at providing specialized skills for AI Agents working with Antdv Next. Feedback via [GitHub Issues](https://github.com/antdv-next/skills/issues) is welcome to help us improve coverage and accuracy. --- Title: Tailwind CSS URL: https://www.antdv-next.com/docs/vue/tailwindcss.md --- Before anything else, wrap the `App.vue` entry with `a-app` so the runtime has a parent style container: ```vue ``` If you want to keep using Tailwind CSS in an `antdv-next` project while aligning utility classes with Ant Design design tokens, use `@antdv-next/tailwind`. This plugin maps Ant Design CSS variables into Tailwind's theme system, so utilities like `bg-primary`, `shadow-card`, and `text-h1` can still follow `antdv-next` runtime theming. ## Version Compatibility `@antdv-next/tailwind` ships in lockstep with `antdv-next`. Pick the matching version from the table below: | `antdv-next` | `@antdv-next/tailwind` | Notes | | --- | --- | --- | | `>=1.3.0` | `^1.1.0` | **Current recommended.** Spacing tokens are aligned with antdv 1.3.0 (`p-xxl`, `p-xxxl`, `m-xxxl` are removed) and many new semantic tokens are added (`primary-text`, `success-bg-hover`, `text-placeholder`, `bg-solid`, …). Also introduces the v4 namespace-safe entry `compat.css`. | | `<1.3.0` | `<1.1.0` | antdv before 1.3.0 still exposes the old spacing tokens. Pinning `@antdv-next/tailwind@<1.1.0` avoids referencing variables that no longer exist. | > When you bump `antdv-next` to 1.3.0, bump `@antdv-next/tailwind` to `>=1.1.0` together. If you are still on antdv-next 1.2.x or earlier, pin `@antdv-next/tailwind` to the 1.0.x line. ## Package Info - Package: `@antdv-next/tailwind` - `peerDependencies`: `tailwindcss >= 3.0.0` ## Installation For antdv-next 1.3.0+: ```bash pnpm add -D tailwindcss @antdv-next/tailwind@^1.1.0 ``` For antdv-next 1.2.x and earlier: ```bash pnpm add -D tailwindcss @antdv-next/tailwind@~1.0 ``` ## When to use it This package is a good fit when: - your project already uses Tailwind CSS - you want utilities aligned with Ant Design design tokens - you want to keep the Tailwind workflow while integrating `antdv-next` theme variables - you need runtime theme switching instead of fixed build-time colors If you prefer an UnoCSS-based approach, see the [UnoCSS](/docs/vue/unocss) guide. ## Tailwind CSS v4 (Recommended) Tailwind CSS v4 wires the theme through the `@theme` mechanism. Starting from 1.1.0, `@antdv-next/tailwind` ships **two parallel entries**: | Entry | Utility example | When to use | | --- | --- | --- | | `theme.css` (classic) | `bg-primary`, `p-lg`, `text-lg`, `shadow-card` | Existing projects; accept antdv tokens occupying Tailwind's native utility namespace | | `compat.css` (**recommended**) | `bg-ant-primary`, `p-ant-lg`, `text-ant-lg`, `shadow-ant-card` (plus optional `a-bg-primary` etc. shortcuts) | New projects; avoid clashes with Tailwind built-in tokens or project-level custom tokens | > For the design rationale, see [css-plugin Issue #7 (RFC)](https://github.com/antdv-next/css-plugin/issues/7). ### Option 1: Import the theme file directly ```css @import "tailwindcss"; /* Pick one — classic entry */ @import "@antdv-next/tailwind/theme.css"; /* Or — namespace-safe entry (recommended) */ @import "@antdv-next/tailwind/compat.css"; ``` ### Option 2: Generate theme CSS dynamically If you need a custom CSS variable prefix or namespace, use the generators exported from the `v4` entry: ```ts import { generateCompatThemeCSS, generateThemeCSS, } from '@antdv-next/tailwind/v4' // Classic entry (default antPrefix='ant') const css = generateThemeCSS({ antPrefix: 'my-app', }) // Namespace-safe entry const compatCss = generateCompatThemeCSS({ antPrefix: 'ant', // antdv CSS variable prefix tokenPrefix: 'ant', // produces --color-ant-primary, @utility p-ant-lg prefix: 'a', // also emits @utility a-bg-primary shortcuts allowPrefixedUtilities: true, // toggle the shortcuts above }) ``` ### compat.css options - `antPrefix`: the antdv-next CSS variable prefix (must match your `ConfigProvider` `prefixCls`) - `tokenPrefix`: namespace injected into every Tailwind v4 theme token, e.g. `--color-ant-primary`, `--padding-ant-lg`, `--text-ant-lg`. Also emits `@utility p-ant-lg { padding: var(--padding-ant-lg) }` style safe directional utilities so Tailwind's native `p-*` is not overridden - `prefix`: extra prefixed utility shortcuts (e.g. `a-bg-primary`, `a-p-lg`) bound directly to antdv variables — they do not depend on `tokenPrefix` - `allowPrefixedUtilities`: toggle the prefixed shortcuts. Disable it to keep only the namespaced tokens in `@theme inline` ## Tailwind CSS v3 If you are still on Tailwind CSS v3, use the plugin form. ### Basic setup ```ts import antdPlugin from '@antdv-next/tailwind' export default { content: ['./src/**/*.{vue,js,ts,jsx,tsx}'], plugins: [antdPlugin], } ``` ### Custom setup ```ts import { createAntdPlugin } from '@antdv-next/tailwind' export default { content: ['./src/**/*.{vue,js,ts,jsx,tsx}'], plugins: [ createAntdPlugin({ antPrefix: 'ant', }), ], } ``` ## Usage Example ```vue ``` ## Tailwind v4 Utility Mapping | Category | Classic `theme.css` | Recommended `compat.css` | Shortcut | | --- | --- | --- | --- | | Color | `bg-primary`, `text-blue-5` | `bg-ant-primary`, `text-ant-blue-5` | `a-bg-primary`, `a-c-primary` | | Padding | `p-lg`, `px-sm` | `p-ant-lg`, `px-ant-sm` | `a-p-lg`, `a-px-sm` | | Margin | `m-lg`, `my-sm` | `m-ant-lg`, `my-ant-sm` | `a-m-lg`, `a-my-sm` | | Radius | `rounded-lg` | `rounded-ant-lg` | `a-rounded-lg`, `a-rd-lg` | | Font size | `text-h1` | `text-ant-h1` | `a-text-h1` | | Shadow | `shadow-card` | `shadow-ant-card` | `a-shadow-card` | ## Common Utility Reference ### Colors and Backgrounds | Classic `theme.css` | Namespace-safe `compat.css` | Description | | --- | --- | --- | | `bg-primary` | `bg-ant-primary` | Primary background color | | `text-primary` | `color-ant-primary` | Primary text color | | `bg-success` | `bg-ant-success` | Success background color | | `text-text-secondary` | `color-ant-text-secondary` | Secondary text color | | `bg-container` | `bg-ant-container` | Container background color | | `border-border` | `border-ant-border` | Default border color | ### Spacing and Layout | Classic | Namespace-safe | Description | | --- | --- | --- | | `p-lg` | `p-ant-lg` | Large padding | | `px-md` | `px-ant-md` | Medium horizontal padding | | `py-sm` | `py-ant-sm` | Small vertical padding | | `m-md` | `m-ant-md` | Medium margin | | `mt-sm` | `mt-ant-sm` | Small top margin | | `rounded-lg` | `rounded-ant-lg` | Large border radius | ### Typography and Shadows | Classic | Namespace-safe | Description | | --- | --- | --- | | `text-h1` | `text-ant-h1` | H1 title size | | `text-lg` | `text-ant-lg` | Large text | | `text-sm` | `text-ant-sm` | Small text | | `shadow-card` | `shadow-ant-card` | Card shadow | | `shadow-sec` | `shadow-ant-sec` | Secondary shadow | | `shadow-ter` | `shadow-ant-ter` | Tertiary shadow | ## Spacing Tokens (aligned with antdv 1.3.0) - Padding: `xxs`, `xs`, `sm`, `md`, `lg`, `xl` - Margin: `xxs`, `xs`, `sm`, `md`, `lg`, `xl`, `xxl` > Starting from 1.1.0, `p-xxl`, `p-xxxl`, and `m-xxxl` are no longer generated because antdv 1.3.0 removed the underlying CSS variables. If you are still on antdv-next 1.2.x or earlier, pin `@antdv-next/tailwind` to the 1.0.x line. ## New Tokens Added in 1.3.0 (available since 1.1.0) The semantic token set is now fully aligned with antdv 1.3.0: - Primary / Success / Warning / Error / Info each provide ten steps: `*-bg`, `*-bg-hover`, `*-border`, `*-border-hover`, `*-hover`, `*`, `*-active`, `*-text`, `*-text-hover`, `*-text-active` - Error extras: `error-bg-filled-hover`, `error-bg-active`, `error-affix` - Warning extras: `warning-affix` - Text: `text-placeholder`, `text-disabled`, `text-heading`, `text-label`, `text-description`, `text-light-solid` - Fill: `fill-content`, `fill-content-hover`, `fill-alter` - Background: `container-disabled`, `spotlight`, `blur`, `solid`, `solid-hover`, `solid-active` - Border: `border-disabled`, `border-bg` - Icon: `icon`, `icon-hover` - Misc: `highlight`, `white` ## Relation to Theming This plugin relies on Ant Design CSS variables, so your app should already be wrapped with `ConfigProvider`. Combine it with [Customize Theme](/docs/vue/customize-theme) when you need to adjust tokens. ```vue ``` ## Notes - For v4 the recommended path is importing `compat.css`: namespace-safe, no collisions with Tailwind built-in utilities. You can keep `theme.css` for existing projects. - Starting from 1.1.0, `theme.css` no longer emits `p-xxl` / `p-xxxl` / `m-xxxl` so it stays consistent with antdv 1.3.0's actual CSS variables. - Both v3 and v4 keep Tailwind global spacing behavior intact, so classes like `gap-*` and `max-w-*` still follow Tailwind defaults. - If you change the CSS variable prefix, keep `antPrefix` aligned in the plugin / generator config. - `compat.css`'s namespace defaults to `ant` (i.e. `bg-ant-primary`). Override it via `generateCompatThemeCSS({ tokenPrefix: 'antd' })` to get `bg-antd-primary` style utilities. --- Title: UnoCSS URL: https://www.antdv-next.com/docs/vue/unocss.md --- Before anything else, wrap the `App.vue` entry with `a-app` so the runtime has a parent style container: ```vue ``` If you want to use atomic utility classes in an `antdv-next` project and have those classes map directly to Ant Design CSS variables, use `@antdv-next/unocss`. This package provides UnoCSS presets built around Ant Design design tokens. It is a good fit when you want to keep UnoCSS / Wind-style utilities while preserving runtime theming. ## Version Compatibility `@antdv-next/unocss` ships in lockstep with `antdv-next`. Pick the matching version from the table below: | `antdv-next` | `@antdv-next/unocss` | Notes | | --- | --- | --- | | `>=1.3.0` | `^1.1.0` | **Current recommended.** Spacing tokens are aligned with antdv 1.3.0 (`p-xxl`, `p-xxxl`, `m-xxxl` are removed) and many new semantic tokens are added (`primary-text`, `success-bg-hover`, `text-placeholder`, `bg-solid`, …). Also introduces the namespace-safe mode (`bg-ant-primary`). | | `<1.3.0` | `<1.1.0` | antdv before 1.3.0 still exposes the old spacing tokens. Pinning `@antdv-next/unocss@<1.1.0` avoids generating utilities that point at variables which no longer exist. | > When you bump `antdv-next` to 1.3.0, bump `@antdv-next/unocss` to `>=1.1.0` together. If you are still on antdv-next 1.2.x or earlier, pin `@antdv-next/unocss` to the 1.0.x line. ## Package Info - Package: `@antdv-next/unocss` - `peerDependencies`: `unocss >= 66.0.0` ## Installation For antdv-next 1.3.0+: ```bash pnpm add -D unocss @antdv-next/unocss@^1.1.0 ``` For antdv-next 1.2.x and earlier: ```bash pnpm add -D unocss @antdv-next/unocss@~1.0 ``` ## When to use it This package fits well when: - you are already using UnoCSS - you want to keep UnoCSS / Wind-style utility syntax - you want colors, radius, shadows, and typography utilities to follow `antdv-next` CSS variables - you need runtime theme switching instead of build-time fixed values If you are using Tailwind CSS, see the [Tailwind CSS](/docs/vue/tailwindcss) guide. ## Available Presets ### `presetAntd` The default preset. It follows the regular UnoCSS Wind3-style structure and works for most UnoCSS projects. ```ts // uno.config.ts import { defineConfig } from 'unocss' import { presetAntd } from '@antdv-next/unocss' export default defineConfig({ presets: [ presetAntd({ prefix: 'a', // class prefix, default: 'a' allowPrefixedUtilities: true, // keep a-* utilities, default: true allowUnprefixed: true, // keep legacy bare classes like bg-primary, default: true antPrefix: 'ant', // CSS variable prefix, default: 'ant' tokenPrefix: 'ant', // namespace prefix, default: 'ant' (empty disables) }), ], }) ``` Theme keys: - `colors` - `borderRadius` - `fontSize` - `boxShadow` ### `presetAntdTailwind4` If you want to keep UnoCSS but prefer Tailwind CSS v4-style theme key naming, use this preset. ```ts // uno.config.ts import { defineConfig } from 'unocss' import { presetAntdTailwind4 } from '@antdv-next/unocss' export default defineConfig({ presets: [ presetAntdTailwind4({ prefix: 'a', allowPrefixedUtilities: true, allowUnprefixed: true, antPrefix: 'ant', tokenPrefix: 'ant', }), ], }) ``` Theme keys: - `colors` - `radius` - `text` - `shadow` - `defaults` ## Which one should you choose ### Choose `presetAntd` - when you already have an UnoCSS setup - when you want to keep the standard UnoCSS theme structure - when you are combining it with presets like Wind3 or Attributify ### Choose `presetAntdTailwind4` - when you prefer Tailwind CSS v4-style naming - when you are migrating from Tailwind v4 to UnoCSS or mixing both approaches - when you want theme keys such as `radius`, `shadow`, and `text` ## Three Utility Patterns (since 1.1.0) Both presets emit three parallel utility forms that can be toggled independently: | Mode | Example | Control | Use when | | --- | --- | --- | --- | | **Prefixed (stable)** | `a-bg-primary`, `a-p-lg` | `allowPrefixedUtilities` (default `true`) | Most projects; clearly isolates antdv utilities | | **Namespace-safe (preferred replacement for the legacy bare form)** | `bg-ant-primary`, `p-ant-lg` | `tokenPrefix` (default `'ant'`, empty disables) | You want short class names without polluting UnoCSS native tokens | | **Legacy bare (back-compat)** | `bg-primary`, `p-lg` | `allowUnprefixed` (default `true`; will flip to `false` next major) | Existing projects only | Example: ```vue ``` Important details: - Text color uses `color-primary` or `c-primary` (or `color-ant-primary` / `c-ant-primary` in namespace mode) - `text-*` is primarily for font size, e.g. `text-lg`, `text-h1` (in namespace mode: `text-ant-lg`) If you want to allow only `a-*` and `*-ant-*` utilities while disabling the legacy bare form: ```ts // uno.config.ts import { defineConfig } from 'unocss' import { presetAntd } from '@antdv-next/unocss' export default defineConfig({ presets: [ presetAntd({ allowUnprefixed: false, // disables bg-primary / text-sm style classes // allowPrefixedUtilities: true and tokenPrefix: 'ant' remain in effect }), ], }) ``` > `allowUnprefixed: false` only disables legacy bare classes — it **does not** rewrite theme keys. `a-bg-primary` and `bg-ant-primary` continue to work. ## Spacing Tokens (aligned with antdv 1.3.0) - Padding: `xxs`, `xs`, `sm`, `md`, `lg`, `xl` - Margin: `xxs`, `xs`, `sm`, `md`, `lg`, `xl`, `xxl` > Starting from 1.1.0, `p-xxl`, `p-xxxl`, and `m-xxxl` are no longer generated because antdv 1.3.0 removed the underlying CSS variables. If you are still on antdv-next 1.2.x or earlier, pin `@antdv-next/unocss` to the 1.0.x line. ## Utility Examples ```vue ``` Common utility groups (each has `a-*`, `*-ant-*`, and bare forms): - colors: `color-*`, `bg-*`, `border-*` (plus shorthand `b-*` and directional `bt-`, `bx-`, etc.) - spacing: `m-*`, `p-*`, `mx-*`, `py-*` - radius: `rounded-*`, `rd-*` - shadows: `shadow-*` - typography: `text-*` ## Common Utility Reference ### Colors and Backgrounds | Prefixed | Namespace-safe | Description | | --- | --- | --- | | `a-bg-primary` | `bg-ant-primary` | Primary background | | `a-bg-container` | `bg-ant-container` | Container background | | `a-bg-success-bg` | `bg-ant-success-bg` | Light success background | | `a-color-primary` | `color-ant-primary` | Primary text color | | `a-color-text` | `color-ant-text` | Default text color | | `a-color-text-secondary` | `color-ant-text-secondary` | Secondary text | | `a-border-border` | `border-ant-border` | Default border | | `a-border-t-primary` | `border-t-ant-primary` | Top primary border | ### Spacing and Layout | Prefixed | Namespace-safe | Description | | --- | --- | --- | | `a-p-lg` | `p-ant-lg` | 24px padding | | `a-px-md` | `px-ant-md` | 20px horizontal padding | | `a-py-sm` | `py-ant-sm` | 12px vertical padding | | `a-mt-sm` | `mt-ant-sm` | 12px top margin | | `a-mx-lg` | `mx-ant-lg` | 24px horizontal margin | | `a-my-xs` | `my-ant-xs` | 8px vertical margin | ### Radius, Shadow, Typography | Prefixed | Namespace-safe | Description | | --- | --- | --- | | `a-rounded-sm` | `rounded-ant-sm` | Small radius | | `a-rounded-lg` | `rounded-ant-lg` | Large radius | | `a-rounded` | `rounded-ant` | Default radius | | `a-shadow-card` | `shadow-ant-card` | Card shadow | | `a-shadow` | `shadow-ant` | Default shadow | | `a-text-lg` | `text-ant-lg` | Large text | | `a-text-h1` | `text-ant-h1` | H1 title size | ## New Tokens Added in 1.3.0 (available since 1.1.0) The semantic token set is now fully aligned with antdv 1.3.0: - Primary / Success / Warning / Error / Info each provide ten steps: `*-bg`, `*-bg-hover`, `*-border`, `*-border-hover`, `*-hover`, `*`, `*-active`, `*-text`, `*-text-hover`, `*-text-active` - Error extras: `error-bg-filled-hover`, `error-bg-active`, `error-affix` - Warning extras: `warning-affix` - Text: `text-placeholder`, `text-disabled`, `text-heading`, `text-label`, `text-description`, `text-light-solid` - Fill: `fill-content`, `fill-content-hover`, `fill-alter` - Background: `container-disabled`, `spotlight`, `blur`, `solid`, `solid-hover`, `solid-active` - Border: `border-disabled`, `border-bg` - Icon: `icon`, `icon-hover` - Misc: `highlight`, `white` ## Theme and Variables These presets map utilities to Ant Design CSS variables, so colors, radius, shadows, and typography follow the active theme automatically. In practice, make sure your app is already wired with `ConfigProvider`, and combine it with [Customize Theme](/docs/vue/customize-theme) when you need to adjust design tokens. ## Notes - The preset mainly customizes `m-*` / `p-*` related utilities and does not override UnoCSS global spacing behavior (`w-*`, `max-w-*`, `gap-*` keep their UnoCSS defaults). - The default `prefix` is `a`, so generated classes usually look like `a-bg-primary` and `a-p-lg`. - `allowUnprefixed` defaults to `true` today but will flip to `false` in the next major. Migrate to `a-*` or `*-ant-*` writers early. - `allowUnprefixed: false` only disables the legacy bare form — it **does not** rewrite theme keys (`colors.primary` stays `colors.primary`). - The default `antPrefix` is `ant`. If you customize your CSS variable prefix, keep this option aligned. - The default `tokenPrefix` is `ant`. Override it (for example `'antd'`) to customize the namespace, or pass an empty string to disable namespace mode. --- Title: Affix URL: https://www.antdv-next.com/components/affix.md --- ## When To Use {#when-to-use} On longer web pages, it's helpful to stick component into the viewport. This is common for menus and actions. Please note that Affix should not cover other content on the page, especially when the size of the viewport is small. ## Examples {#examples} ### Basic The simplest usage. ```vue ``` ### Callback Callback with affixed state. ```vue ``` ### Container to scroll. Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`). ```vue ``` ## API ### Props Common props ref:[Common props](/docs/vue/common-props) | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | offsetTop | Offset from the top of the viewport (in pixels) | number | 0 | - | × | | offsetBottom | Offset from the bottom of the viewport (in pixels) | number | - | - | × | | target | Specifies the scrollable area DOM node | () => Window \| HTMLElement \| null | () => window | - | × | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | change | Callback for when Affix state is changed | (affixed?: boolean) => void | - | ### Methods | Method | Description | Type | Version | | --- | --- | --- | --- | | updatePosition | - | ReturnType<typeof throttleByAnimationFrame> | - | **Note:** Children of `Affix` must not have the property `position: absolute`, but you can set `position: absolute` on `Affix` itself: ```html ... ``` ## Design Token {#design-token} See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. ## FAQ ### When binding container with `target` in Affix, elements sometimes move out of the container. {#faq-target-container} We only listen to container scroll events for performance consideration. You can add custom listeners if you still want to: Related issues:[#3938](https://github.com/ant-design/ant-design/issues/3938) [#5642](https://github.com/ant-design/ant-design/issues/5642) [#16120](https://github.com/ant-design/ant-design/issues/16120) ### When Affix is ​​used in a horizontal scroll container, the position of the element `left` is incorrect. {#faq-horizontal-scroll} Affix is ​​generally only applicable to areas with one-way scrolling, and only supports usage in vertical scrolling containers. If you want to use it in a horizontal container, you can consider implementing with the native `position: sticky` property. Related issues:[#29108](https://github.com/ant-design/ant-design/issues/29108) --- Title: Alert URL: https://www.antdv-next.com/components/alert.md --- ## When To Use {#when-to-use} - When you need to show alert messages to users. - When you need a persistent static container which is closable by user actions. ## Examples {#examples} ### Basic The simplest usage for short messages. ```vue ``` ### More types There are 4 types of Alert: `success`, `info`, `warning`, `error`. ```vue ``` ### Closable To show close button. ```vue ``` ### Description Additional description for alert message. ```vue ``` ### Icon A relevant icon will make information clearer and more friendly. ```vue ``` ### Banner Display Alert as a banner at top of page. ```vue ``` ### Loop Banner Use CSS animation to create a loop banner. ```vue ``` ### Smoothly Unmount Smoothly unmount Alert upon close. ```vue ``` ### Custom Icon A relevant icon makes information clearer and more friendly. ```vue ``` ### Custom action Custom action. ```vue ``` ### Component Token Custom component token. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Alert by passing objects/functions through `classes` and `styles`. ```vue ``` ## API ### Props {#props} Common props ref:[Common props](/docs/vue/common-props) | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | type | Type of Alert styles, options: `success`, `info`, `warning`, `error` | 'success' \| 'info' \| 'warning' \| 'error' | `info`, in `banner` mode default is `warning` | - | × | | closable | The config of closable | ClosableType | `false` | - | ✓ | | title | Content of Alert | VueNode | - | - | × | | message | Content of Alert, please use `title` instead | VueNode | - | - | × | | description | Additional content of Alert | VueNode | - | - | × | | afterClose | Called when close animation is finished, please use `closable.afterClose` instead | () => void | - | - | × | | showIcon | Whether to show icon | boolean | false, in `banner` mode default is true | - | × | | role | https://www.w3.org/TR/2014/REC-html5-20141028/dom.html#aria-role-attribute | string | - | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function | AlertClassNamesType | - | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function | AlertStylesType | - | - | ✓ | | banner | Whether to show as banner | boolean | false | - | × | | icon | Custom icon, effective when `showIcon` is true | VueNode | - | - | × | | successIcon | (Only supports global configuration) Custom success icon in Alert icon | VueNode | - | - | ✓ | | infoIcon | (Only supports global configuration) Custom info icon in Alert icon | VueNode | - | - | ✓ | | warningIcon | (Only supports global configuration) Custom warning icon in Alert icon | VueNode | - | - | ✓ | | errorIcon | (Only supports global configuration) Custom error icon in Alert icon | VueNode | - | - | ✓ | | closeIcon | - | VueNode | - | - | ✓ | | action | The action of Alert | VueNode | - | - | × | | id | - | string | - | - | × | ### Events {#events} | Event | Description | Type | Version | | --- | --- | --- | --- | | close | Callback when close Alert | (e: any) => any | - | | mouseenter | - | (e: any) => any | - | | mouseleave | - | (e: any) => any | - | | click | - | (e: any) => any | - | ### Slots {#slots} | Slot | Description | Type | Version | |-------------| --- | --- | --- | | message | Content of Alert, please use `title` instead | () => any | - | | title | Content of Alert| () => any | - | | description | Additional content of Alert | () => any | - | | icon | Custom icon, effective when `showIcon` is true | () => any | - | | closeIcon | Custom close icon | () => any | - | | action | The action of Alert | () => any | - | ### ClosableType {#closable-type} | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | afterClose | Called when close animation is finished | () => void | - | - | | closeIcon | Custom close icon | VueNode | - | - | | disabled | Whether the close button is disabled | boolean | false | - | | onClose | Callback when Alert is closed | (e: MouseEvent) => void | - | - | ## Semantic DOM ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: Anchor URL: https://www.antdv-next.com/components/anchor.md --- ## When To Use {#when-to-use} For displaying anchor hyperlinks on page and jumping between them. > Notes for developers > > Anchor is implemented with a functional component. Some methods of obtaining `ref` and calling internal instance methods are invalid. ## Examples {#examples} ### Basic The simplest usage. ```vue ``` ### Horizontal Anchor Horizontally aligned anchors ```vue ``` ### Static Anchor Do not change state when page is scrolling. ```vue ``` ### Customize the onClick event Clicking on an anchor does not record history. ```vue ``` ### Customize the anchor highlight Customize the anchor highlight. ```vue ``` ### Set Anchor scroll offset Anchor target scroll to screen center. ```vue ``` ### Listening for anchor link change Listening for anchor link change. ```vue ``` ### Replace href in history Replace path in browser history, so back button returns to previous page instead of previous anchor item. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Anchor by passing objects/functions through `classes` and `styles`. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Anchor #### Props {#anchor-props} | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- |---| --- | --- | --- | | affix | Fixed mode of Anchor | boolean \| Omit<AffixProps, 'offsetTop' \| 'target' \| 'children'> | true | | × | | bounds | Bounding distance of anchor area | number | 5 | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), string> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), string> | - | - | ✓ | | getContainer | Scrolling container | () => HTMLElement | () => window | - | × | | getCurrentAnchor | Customize the anchor highlight | (activeLink: string) => string | - | - | × | | offsetTop | Pixels to offset from top when calculating position of scroll | number | 0 | - | × | | showInkInFixed | Whether show ink-square when `affix={false}` | boolean| false | - | × | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | - | ✓ | | targetOffset | Anchor scroll offset, default as `offsetTop`, [example](#anchor-demo-targetoffset) | number | - | - | × | | items | Data configuration option content, support nesting through children | { key, href, title, target, children }\[] [see](#anchoritem) | - | | × | | direction | Set Anchor direction | `vertical` \| `horizontal`| `vertical` | | × | | replace | Replace items' href in browser history instead of pushing it | boolean | false | | × | #### Events {#anchor-events} | Event | Description | Type | Version | | --- | --- |----------------------------------------------------------------------| --- | | click | Set the handler to handle `click` event | (e: MouseEvent, link: { title: VueNode, href: string }) => void | - | | change | Listening for anchor link change | (currentActiveLink: string) => void | - | #### Slots {#anchor-slots} | Slot | Description | Type | Version | | --- | --- | --- | --- | | item | Customize anchor item rendering | (item: AnchorItem) => any | - | ## Types ### AnchorItem | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | key | The unique identifier of the Anchor Link | string \| number | - | - | | href | The target of hyperlink | string | - | - | | target | Specifies where to display the linked URL | string | - | - | | title | The content of hyperlink | VueNode | - | - | | children | Nested Anchor Link, `Attention: This attribute does not support horizontal orientation` | [AnchorItem](#anchoritem)\[] | - | - | | replace | Replace item href in browser history instead of pushing it | boolean | false | | #### AnchorItemLink We recommend using the items form instead. | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | href | The target of hyperlink | string | - | - | | target | Specifies where to display the linked URL | string | - | - | | title | The content of hyperlink | VueNode | - | - | ## Semantic DOM ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. ## FAQ ### The `:target` pseudo-class of the destination element does not take effect as expected after anchor navigation. {#faq-target-pseudo-class} For the purpose of page performance optimization, the implementation of anchor navigation has been changed from `window.location.href` to `window.history.pushState/replaceState`. Since `pushState/replaceState` does not trigger a page reload, the browser will not automatically update the matching state of the `:target` pseudo-class. To resolve this issue, you can manually construct the full URL: `href = window.location.origin + window.location.pathname + '#xxx'`. Related issues: [#53143](https://github.com/ant-design/ant-design/issues/53143) [#54255](https://github.com/ant-design/ant-design/issues/54255) --- Title: App URL: https://www.antdv-next.com/components/app.md --- ## When To Use {#when-to-use} - Provide reset styles based on `.ant-app` element. - You could use static methods of `message/notification/Modal` form `useApp` without writing `contextHolder` manually. ## Examples {#examples} ### Basic Get instance for `message`, `notification`, `modal`. ```vue ``` ### Hooks config Config for `message`, `notification`. ```vue ``` ```html ``` ```html ``` ## How to use ### Basic usage App provides upstream and downstream method calls through `provide/inject`, because useApp needs to be used as a subcomponent, we recommend encapsulating App at the top level in the application. Note: App.useApp must be available under App. ### Embedded usage scenarios (if not necessary, try not to do nesting) ```html ... ... ``` #### Sequence with ConfigProvider The App component can only use the token in the `ConfigProvider`, if you need to use the Token, the ConfigProvider and the App component must appear in pairs. ```html ... ``` ## API ### Property {#property} Common props ref:[Common props](/docs/vue/common-props) | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | ------------ | --------------------------------------------------------- | ------------------ | ------- | ------- | --- | | message | Global config for Message | MessageConfig | - | | × | | notification | Global config for Notification | NotificationConfig | - | | × | | component | Config render element, if`false` will not create DOM node | any | div | | × | ## Design Token ## FAQ ### CSS Var doesn't work inside `` {#faq-css-var-component-false} Antdv Next uses CSS variables by default. App needs a valid HTML element to hold its CSS variable class name. When `component` is `false`, App only provides context without rendering a root DOM node, so no App root class name or default styles are applied. The `class`, `rootClass`, and `style` properties cannot be applied in this mode and trigger a development warning. Keep the default `div` or specify another valid element when these styles are required. --- Title: AutoComplete URL: https://www.antdv-next.com/components/auto-complete.md --- ## When To Use {#when-to-use} - When you need an input box instead of a selector. - When you need input suggestions or helping text. The differences with Select are: - AutoComplete is an input box with text hints, and users can type freely. The keyword is aiding **input**. - Select is selecting among given choices. The keyword is **select**. ## Examples {#examples} ### Basic Usage Basic Usage, set data source of autocomplete with `options` property. ```vue ``` ### Customized Options You could set custom `Option` label ```vue ``` ### Custom Input Component Customize Input Component ```vue ``` ### Non-case-sensitive AutoComplete A non-case-sensitive AutoComplete ```vue ``` ### Lookup-Patterns - Certain Category Demonstration of [Lookup Patterns: Certain Category](https://ant.design/docs/spec/reaction#lookup-patterns). Basic Usage, set options of autocomplete with `options` property. ```vue ``` ### Lookup-Patterns - Uncertain Category Demonstration of [Lookup Patterns: Uncertain Category](https://ant.design/docs/spec/reaction#lookup-patterns). ```vue ``` ### Status Add status to AutoComplete with `status`, which could be `error` or `warning`. ```vue ``` ### Variants There are `outlined`, `filled`, `borderless`, and `underlined` variants to choose from. ```vue ``` ### Customize clear button Customize clear button ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of AutoComplete by passing objects/functions through `classes` and `styles`. ```vue ``` ### Custom input with allowClear debug Custom input with `allowClear` on hover debug. ```vue ``` ### Disabled custom input debug Disabled custom input debug. ```vue ``` ### Filled custom input debug Filled custom input debug. ```vue ``` ### Disabled text colour in Form debug Disabled text colour inside a Form, debug. Checks that the input text uses the disabled colour both when the Form is disabled and when the component itself is. ```vue ``` ## API ### Props Common props ref:[Common props](/docs/vue/common-props) | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | allowClear | Show clear button | boolean \| { clearIcon?: VueNode } | false | - | × | | backfill | If backfill selected item the input when using keyboard | boolean | false | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function | Record<[SemanticDOM](#semantic-dom), string> \| (info: { props }) => Record<[SemanticDOM](#semantic-dom), string> | - | - | × | | defaultActiveFirstOption | Whether active first option by default | boolean | true | - | × | | disabled | Whether disabled select | boolean | false | - | × | | getPopupContainer | Parent node of the dropdown. Default to body, if you encountered positioning problems during scroll, try changing to the scrollable area and position relative to it | (triggerNode: HTMLElement) => HTMLElement | () => document.body | - | × | | labelRender | Customize selected label render | (props: LabelInValueType) => VueNode | - | - | × | | notFoundContent | Specify content to show when no result matches | VueNode | - | - | × | | open | Controlled open state of dropdown | boolean | - | - | × | | options | Select options. Will get better perf than jsx definition | { label: VueNode; value: string }[] | - | - | × | | optionRender | Customize the rendering dropdown options | (option: FlattenOptionData<BaseOptionType>, info: { index: number }) => VueNode | - | - | × | | placeholder | The placeholder of input | string | - | - | × | | popupMatchSelectWidth | Determine whether the dropdown menu and the select input are the same width. Default set `min-width` same as input. Will ignore when value less than select width. `false` will disable virtual scroll | boolean \| number | true | - | × | | popupRender | Customize dropdown content | (menu: VNode) => VueNode | - | - | × | | showSearch | Search configuration | boolean \| [SearchConfig](#showsearch) | true | - | × | | size | The size of the input box | `large` \| `medium` \| `small` | - | - | × | | status | Set validation status | `error` \| `warning` | - | - | × | | styles | Customize inline style for each semantic structure inside the component. Supports object or function | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props }) => Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | - | × | | value | Selected option, support `v-model:value` | string | - | - | × | | variant | Variants of input | `outlined` \| `borderless` \| `filled` \| `underlined` | `outlined` | - | × | | virtual | Disable virtual scroll when set to false | boolean | true | - | × | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | blur | Called when blur | (e: FocusEvent) => void | - | | change | Called when selecting an option or changing input value | (value: string) => void | - | | clear | Called when clear | () => void | - | | focus | Called when focus | (e: FocusEvent) => void | - | | inputKeydown | Called when key pressed | (e: KeyboardEvent) => void | - | | openChange | Called when dropdown open | (open: boolean) => void | - | | popupScroll | Called when dropdown scrolls | (e: UIEvent) => void | - | | search | Called when searching items | (value: string) => void | - | | select | Called when an option is selected, the params are option's value (or key) and option instance | (value: string, option: Option) => void | - | ### AutoComplete Methods {#methods} | Name | Description | Version | | --- | --- | --- | | blur() | Remove focus | - | | focus() | Get focus | - | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | default | Customize input element, or provide `AutoComplete.Option` children | () => VueNode | - | | labelRender | Customize selected label render | (props: LabelInValueType) => VueNode | - | | notFoundContent | Specify content to show when no result matches | () => VueNode | - | | optionRender | Customize the rendering dropdown options | (option: FlattenOptionData<BaseOptionType>, info: { index: number }) => VueNode | - | | popupRender | Customize dropdown content | (menu: VNode) => VueNode | - | | prefix | The custom prefix | () => VueNode | - | | suffixIcon | The custom suffix icon | () => VueNode | - | ## Types ### showSearch | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | filterOption | If true, filter options by input, if function, filter options against it. The function will receive two arguments, `inputValue` and `option`, if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded | boolean \| (inputValue: string, option?: Option) => boolean | true | - | | onSearch | Called when searching items | (value: string) => void | - | - | ## Semantic DOM ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. ## FAQ ### Why doesn't the text composition system work well with onSearch in controlled mode? {#faq-controlled-onsearch-composition} Please use `onChange` to manage control state. `onSearch` is used for searching input which is not the same as `onChange`. Besides, clicking on the option will not trigger the `onSearch` event. Related issue: [#18230](https://github.com/ant-design/ant-design/issues/18230) [#17916](https://github.com/ant-design/ant-design/issues/17916) ### Why won't a controlled open AutoComplete display a drop-down menu when options are empty? {#faq-empty-options-controlled-open} The AutoComplete component is essentially an extension of the Input form element. When the `options` property is empty, displaying empty text could mislead the user into believing the component is not operational, when in fact they are still able to input text. To avoid confusion, the `open` property will not display the drop-down menu when set to `true` and in combination with an empty `options` property. The `open` property must be used in conjunction with the `options` property. --- Title: Avatar URL: https://www.antdv-next.com/components/avatar.md --- ## When To Use {#when-to-use} ## Examples {#examples} ### Basic Three sizes and two shapes are available. ```vue ``` ### Type Image, Icon and letter are supported, and the latter two kinds of avatar can have custom colors and background colors. ```vue ``` ### Autoset Font Size For letter type Avatar, when the letters are too long to display, the font size can be automatically adjusted according to the width of the Avatar. You can also use `gap` to set the unit distance between left and right sides. ```vue ``` ### With Badge Usually used for reminders and notifications. ```vue ``` ### Avatar.Group Avatar group display. ```vue ``` ### maxCount includes overflow Wrap `Avatar.Group` to add `overflowInFinal` prop. When enabled, `max.count` represents the total number of elements to display and reserves 1 slot for the overflow indicator. ```vue ``` ### Responsive Size Avatar size can be automatically adjusted based on the screen size. ```vue ``` ## API ### Avatar #### Props {#avatar-props} Common props ref:[Common props](/docs/vue/common-props) | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | shape | The shape of avatar | `circle` \| `square` | `circle` | - | × | | size | The size of the avatar | number \| `large` \| `medium` \| `small` \| `{ xs: number, sm: number, ... }` | `medium` | - | × | | gap | Letter type unit distance between left and right sides | number | 4 | - | × | | src | The address of the image for an image avatar or image element | VueNode | - | - | × | | srcSet | A list of sources to use for different screen resolutions | string | - | - | × | | draggable | Whether the picture is allowed to be dragged | boolean \| `'true'` \| `'false'` | true | - | × | | icon | Custom icon type for an icon avatar | VueNode | - | - | × | | alt | This attribute defines the alternative text describing the image | string | - | - | × | | crossOrigin | CORS settings attributes | '' \| 'anonymous' \| 'use-credentials' | - | - | × | | onError | Handler when img load error, return false to prevent default fallback behavior | () => boolean | - | - | × | #### Events {#avatar-events} | Event | Description | Type | Version | | --- | --- | --- | --- | | click | - | (e: MouseEvent) => void | - | ### Slots {#avatar-slots} | Slot | Description | Type | Version | | --- | --- | --- | --- | | icon | Custom icon type for an icon avatar | () => any | - | | src | The address of the image for an image avatar or image element | () => any | - | ### AvatarGroup #### Props {#avatar-group-props} | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | prefixCls | - | string | - | - | | max | - | { count?: number style?: CSSProperties popover?: PopoverProps } | - | - | | size | The size of the avatar | AvatarSize | `medium` | - | | shape | The shape of avatar | 'circle' \| 'square' | `circle` | - | ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: Badge URL: https://www.antdv-next.com/components/badge.md --- ## When To Use {#when-to-use} Badge normally appears in proximity to notifications or user avatars with eye-catching appeal, typically displaying unread messages count. ## Examples {#examples} ### Basic Simplest Usage. Badge will be hidden when `count` is `0`, but we can use `showZero` to show it. ```vue ``` ### Standalone Used in standalone when children is empty. ```vue ``` ### Overflow Count `${overflowCount}+` is displayed when count is larger than `overflowCount`. The default value of `overflowCount` is `99`. ```vue ``` ### Red badge This will simply display a red badge, without a specific count. If count equals 0, it won't display the dot. ```vue ``` ### Dynamic The count will be animated as it changes. ```vue ``` ### Clickable The badge can be wrapped with `a` tag to make it linkable. ```vue ``` ### Offset Set offset of the badge dot, the format is `[left, top]`, which represents the offset of the status dot from the left and top of the default position. ```vue ``` ### Size Set size of numeral Badge. ```vue ``` ### Status Standalone badge with status. ```vue ``` ### Colorful Badge We preset a series of colorful Badge styles for use in different situations. You can also set it to a hex color string for custom color. ```vue ``` ### Ribbon Use ribbon badge. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Badge by passing objects/functions through `classes` and `styles`. ```vue ``` ### Title The badge will display `title` when hovered over, instead of `count`. ```vue ``` ## API ### Props {#props} Common props ref:[Common props](/docs/vue/common-props) | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | count | Number to show in badge | VueNode | - | - | × | | showZero | Whether to show badge when `count` is zero | boolean | false | - | × | | overflowCount | Max count to show | number | 99 | - | × | | dot | Whether to display a red dot instead of `count` | boolean | false | - | × | | scrollNumberPrefixCls | - | string | - | - | × | | status | Set Badge as a status dot | PresetStatusColorType | - | - | × | | color | Customize Badge dot color | LiteralUnion<PresetColorKey> | - | - | × | | text | If `status` is set, `text` sets the display text of the status `dot` | VueNode | - | - | × | | size | If `count` is set, `size` sets the size of badge | `medium` \| `small` | - | - | × | | offset | Set offset of the badge dot | [number \| string, number \| string] | - | - | × | | title | Text to show when hovering over the badge; set `null` or `false` to remove the native title | string \| null \| false | - | null/false: 1.4.0 | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | BadgeClassNamesType | - | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | BadgeStylesType | - | - | ✓ | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | count | Customize the badge indicator content | () => any | - | | text | If `status` is set, `text` sets the display text of the status `dot` | () => any | - | ## Semantic DOM ### Badge ### BadgeRibbon ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: BorderBeam URL: https://www.antdv-next.com/components/border-beam.md --- ## When To Use - Use when a container needs stronger visual emphasis without introducing business state semantics. - Suitable for login panels, recommendation cards, AI modules, and key CTA blocks. - As a decorative effect, it should not replace focus rings, validation borders, or status feedback. ## Examples ### Basic Basic usage. Wrap any container with `BorderBeam` to add a continuous decorative beam effect along its border. ```vue ``` ### Show on hover Hide the border beam by default, and reveal it when hovering over the container. ```vue ``` ### Multiple beams Use `count` to set the number of beams. Multiple beams are evenly distributed around the container border. It should be a positive integer, and the default value is `1`. ```vue ``` ### Custom Container A custom container can also host `BorderBeam`. The beam layer is inserted into the child node and positioned with `position: absolute` along the container edge, so the host element needs to provide a positioning context. In most cases, set `position: relative`. ```vue ``` ### Gradients Use the `color` prop to feed BorderBeam a solid color string or an array of gradient stops. `percent` accepts values from `0` to `100`; BorderBeam reserves tail space for the transparent fade automatically. ```vue ``` ### Duration Use `duration` to control how many seconds the beam takes to complete one loop. The default is 6 seconds. ```vue ``` ### Size Use `size` to control the size of the visible beam segment. The default is `100px`, and numbers are treated as pixels. ```vue ``` ### Line Width Use `lineWidth` to adjust the beam width of an individual BorderBeam. The default value is `1px`, and numbers are treated as pixels. ```vue ``` ### Non-uniform radius For clipped containers or non-uniform radii, the `outset` prop controls how far the beam sits outside the container edge. Set it to `0` to align the beam exactly with the container border. ```vue ``` ### Component Token Override the BorderBeam `lineWidth` token via `ConfigProvider` theme.components to adjust the beam thickness. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Props | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | color | Beam color configuration. Supports a single color string or gradient stops. `percent` uses the `0 ~ 100` input range and BorderBeam reserves tail space for the transparent fade | `string \| { color: string, percent: number }[]` | - | - | × | | count | Number of beams | number | 1 | - | × | | duration | Time in seconds for the beam to complete one loop | number | 6 | - | × | | lineWidth | Width of the beam line. Numbers are treated as pixels | `number \| string` | `1px` | - | × | | outset | Outset distance of the beam layer from the container edge. Set to `0` for clipped containers | `number \| string` | - | - | × | | size | Size of the visible beam segment. Numbers are treated as pixels | `number \| string` | 100 | - | × | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | default | Decorated content. Must be a single DOM element or a Vue component that forwards its ref to a DOM element | () => any | - | ## Design Token ## FAQ ### How does BorderBeam behave when reduced motion is enabled? {#faq-reduced-motion} `BorderBeam` treats the beam as a decorative effect. When `prefers-reduced-motion: reduce` is active, the beam effect is hidden. ### What does `percent` mean in `color`? {#faq-color-percent} `percent` represents the authored stop position and accepts values from `0` to `100`. BorderBeam maps those stops into the visible beam segment and reserves the trailing area for transparent fade-out so the moving tail stays visible. ### `size` limits {#faq-size-limit} `BorderBeam` creates the beam with a square gradient layer whose side length is `size`. The layer travels around the container border, and a mask exposes the areas where it overlaps the border. `size` sets the side length independently of the border path length. Along a horizontal edge, the gradient layer extends about `size / 2` to either side of the edge. If `size` approaches or exceeds twice the mask overlay height, the square can cover both the top and bottom edges. The same geometry applies to the width while the beam travels along a vertical edge. Keep `size` well below twice the shorter side of the mask overlay: `size < 2 × min(width, height)`. The mask overlay is usually close in size to the decorated container, while `outset` changes its dimensions. Border radius, `lineWidth`, and transparent areas in the gradient also affect the point at which the overlap becomes visible. ### Why is `BorderBeam` not working? {#faq-not-working} `BorderBeam` needs to resolve the actual DOM node from the default slot and insert the beam layer into that node. Make sure the slot content is a native DOM element, or a Vue component that correctly forwards its `ref` to a DOM element. Otherwise BorderBeam cannot locate the real container and the beam cannot be rendered. The beam layer is positioned with `position: absolute`, so the resolved DOM node also needs to provide a positioning context. In most cases, set `position: relative` on the wrapped element. BorderBeam does not inspect or patch the child positioning style for you. For performance reasons, whether the slot can host the beam and its positioning information are resolved during initialization, and are not continuously updated when the child structure or positioning styles change later. ### How do I keep the beam radius aligned with my container? {#faq-radius} `BorderBeam` renders the beam layer as a child of the actual container and directly inherits its radius through `border-radius: inherit`. For a single-container child such as `Card`, the beam automatically follows the container radius. For more complex child trees, make sure the radius is set on the actual container root. The radius stays in sync through CSS inheritance, without being read or measured during initialization. Later changes made through `class`, responsive styles, or CSS variables are automatically reflected by the beam layer. --- Title: Breadcrumb URL: https://www.antdv-next.com/components/breadcrumb.md --- ## When To Use {#when-to-use} - When the system has more than two layers in a hierarchy. - When you need to inform the user of where they are. - When the user may need to navigate back to a higher level. ## Examples {#examples} ### Basic Usage The simplest use. ```vue ``` ### With an Icon The icon should be placed in front of the text. ```vue ``` ### With Params With route params. ```vue ``` ### Configuring the Separator The separator can be customized by setting the separator property: `separator=">"`. ```vue ``` ### Bread crumbs with drop down menu Breadcrumbs support drop down menu. ```vue ``` ### Configuring the Separator Independently Customize separator for each other. ```vue ``` ### SFC Mode Support SFC mode using `a-breadcrumb-item` and `a-breadcrumb-separator` with dropdown menu. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Breadcrumb by passing objects/functions through `classes` and `styles`. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Props | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | classes | Customize class for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), string> \| (info: \{ props \})=> Record<[SemanticDOM](#semantic-dom), string> | - | - | ✓ | | dropdownIcon | Custom dropdown icon | VueNode | `` | - | ✓ | | itemRender | Custom item renderer, work with vue-router | (route, params, routes, paths) => VueNode | - | - | × | | params | Routing parameters | object | - | - | × | | items | The routing stack information of router | [ItemType\[\]](#itemtype) | - | - | × | | separator | Custom separator | VueNode | `/` | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: \{ props \})=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | - | ✓ | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | clickItem | Triggered when clicking a breadcrumb item | (item: ItemType, event: MouseEvent) => void | - | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | itemRender | Custom item renderer, work with vue-router | (context: \{ route: ItemType, params: AnyObject, routes: ItemType[], paths: string[] \}) => any | - | | titleRender | Custom title renderer | (params: \{ item: ItemType, index: number \}) => any | - | | separator | Custom separator | () => any | - | | menuLabelRender | Custom menu label renderer | (params: \{ item: ItemType, index: number, menu: MenuItem \}) => any | - | | menuExtraRender | Custom menu extra content renderer | (params: \{ item: ItemType, index: number, menu: MenuItem \}) => any | - | ## Types {#types} ### ItemType {#itemtype} > type ItemType = Omit<RouteItemType, 'title' | 'path'> | SeparatorType ### RouteItemType {#routeitemtype} | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | dropdownProps | The dropdown props | [Dropdown](/components/dropdown) | - | - | | href | Target of hyperlink. Can not work with path | string | - | - | | path | Connected path. Each path will connect with prev one. Can not work with href | string | - | - | | menu | The menu props | [MenuProps](/components/menu#api) | - | - | | onClick | Set the handler to handle click event | (e: MouseEvent) => void | - | - | | title | item name | VueNode | - | - | ### SeparatorType {#separatortype} ```ts const item = { type: 'separator', // Must have separator: '/', } ``` | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | type | Mark as separator | `separator` | - | - | | separator | Custom separator | VueNode | `/` | - | ## Use with vue-router {#use-with-vue-router} The link of Breadcrumb item targets `#` by default, you can use `itemRender` slot to make a vue-router Link. ```vue ``` ## Semantic DOM ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: Button URL: https://www.antdv-next.com/components/button.md --- ## When To Use {#when-to-use} A button means an operation (or a series of operations). Clicking a button will trigger its corresponding business logic. In Antdv Next we provide 5 types of button. - 🔵 Primary button: used for the main action, there can be at most one primary button in a section. - ⚪️ Default button: used for a series of actions without priority. - 😶 Dashed button: commonly used for adding more actions. - 🔤 Text button: used for the most secondary action. - 🔗 Link button: used for external links. And 4 other properties additionally. - 🔴 `danger`: used for actions of risk, like deletion or authorization. - 👻 `ghost`: used in situations with complex background, home pages usually. - 🚫 `disabled`: used when actions are not available. - 🔃 `loading`: adds a loading spinner in button, avoids multiple submits too. ## Examples {#examples} ### Syntactic sugar Through the `type` syntactic sugar, use the preset button styles: `primary` buttons, `default` buttons, `dashed` buttons, `text` buttons, and `link` buttons. ```vue ``` ### Color & Variant You can set the `color` and `variant` attributes at the same time can derive more variant buttons. ```vue ``` ### Icon You can add an icon using the `icon` prop/slot. ```vue ``` ### Icon Placement You can set the position of a button's icon by setting the `iconPlacement` to `start` or `end` respectively. ```vue ``` ### Disabled To mark a button as disabled, add the `disabled` property to the `Button`. ```vue ``` ### Loading A loading indicator can be added to a button by setting the `loading` property on the `Button`. The `loading.icon` can be used to customize the loading icon. ```vue ``` ### Size Antdv Next supports three sizes of buttons: small, default and large. If a large or small button is desired, set the `size` property to either `large` or `small` respectively. Omit the `size` property for a button with the default size. ```vue ``` ### Ghost Button The `ghost` property will make a button's background transparent, this is commonly used in colored background. ```vue ``` ### Danger Buttons The `danger` property renders a button with danger semantics and can be combined with any button type. ```vue ``` ### Block Button The `block` property will make a button fit to its parent width. ```vue ``` ### Multiple Buttons If you need several buttons, we recommend that you use 1 primary button + n secondary buttons. If there are more than three operations, you can group some of them into a [Dropdown](/components/dropdown/#dropdown-demo-dropdown-button). ```vue ``` ### Gradient Button You can add custom styles by setting `button.classes` in ConfigProvider. This example shows how to add a gradient effect to buttons. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Button by passing objects/functions through `classes` and `styles`. ```vue ``` ## API ### Props Common props ref:[Common props](/docs/vue/common-props) Different button styles generated by setting Button properties. The recommended order is: `type` -> `shape` -> `size` -> `loading` -> `disabled`. | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | autoInsertSpace | We add a space between two Chinese characters by default. Set `autoInsertSpace` to `false` to disable. | boolean | `true` | - | ✓ | | block | Option to fit button width to its parent width | boolean | false | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), string> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), string> | - | - | ✓ | | color | Set button color | `default` \| `primary` \| `danger` \| [PresetColors](#presetcolors) | - | - | ✓ | | danger | Syntactic sugar. Set the danger status of button. Will follow `color` if provided | boolean | false | - | × | | disabled | Disabled state of button | boolean | false | - | × | | ghost | Make background transparent and invert text and border colors | boolean | false | - | × | | href | Redirect url of link button | string | - | - | × | | htmlType | Set the original html `type` of `button`, see: [HTML Standard](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type) | `submit` \| `reset` \| `button` | `button` | - | × | | iconPlacement | Set the icon position of button | `start` \| `end` | `start` | - | × | | loading | Set the loading status of button | boolean \| { delay: number, icon: VueNode } | false | - | × | | loadingIcon | (Global config only) Set the loading icon of button | VueNode | `` | - | ✓ | | shape | Can be used to set button shape | `default` \| `circle` \| `round` | `default` | - | ✓ | | size | Set the size of button | `large` \| `medium` \| `small` | `medium` | - | × | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: { props })=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | - | ✓ | | target | Same as target attribute of a, works when href is specified | string | - | - | × | | type | Syntactic sugar. Set button type. Will follow `variant` & `color` if provided | `primary` \| `dashed` \| `link` \| `text` \| `default` | `default` | - | × | | variant | Set button variant | `outlined` \| `dashed` \| `solid` \| `filled` \| `text` \| `link` | - | - | ✓ | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | `click` | Callback executed when button is clicked | `(event: MouseEvent) => void` | - | ### Slots | Slot | Description | Type | Version | | --- | --- | ---- | --- | | `icon` | Set the icon component of button | - | - | | `loadingIcon` | Set the loading icon component of button | - | - | ## Types ### PresetColors > type PresetColors = 'blue' | 'purple' | 'cyan' | 'green' | 'magenta' | 'pink' | 'red' | 'orange' | 'yellow' | 'volcano' | 'geekblue' | 'lime' | 'gold'; ## Semantic DOM ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. ## FAQ ### How to choose type and color & variant? {#faq-type-color-variant} Type is essentially syntactic sugar for colors and variants. It internally provides a set of mapping relationships between colors and variants for the type. If both exist at the same time, the colors and variants will be used first. ```vue ``` Equivalent ```vue ``` ### How to close the click wave effect? {#faq-close-wave-effect} If you don't need this feature, you can set `disabled` of `wave` in [ConfigProvider](/components/config-provider#api) as `true`. ```vue ``` --- Title: Calendar URL: https://www.antdv-next.com/components/calendar.md --- ## When To Use {#when-to-use} When data is in the form of dates, such as schedules, timetables, prices calendar, lunar calendar. This component also supports Year/Month switch. ## Examples {#examples} ### Basic A basic calendar component with Year/Month switch. ```vue ``` ### Notice Calendar This component can be rendered by using `dateCellRender` and `monthCellRender` with the data you need. ```vue ``` ### Card Nested inside a container element for rendering in limited space. ```vue ``` ### Selectable Calendar A basic calendar component with Year/Month switch. ```vue ``` ### Lunar Calendar Display lunar calendar, solar terms and other information. ```vue ``` ### Show Week Show week number in fullscreen calendar by setting `showWeek` prop to `true`. ```vue ``` ### Customize Header Customize Calendar header content. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Calendar by passing objects/functions through `classes` and `styles`. ```vue ``` ## API ### Props Common props ref:[Common props](/docs/vue/common-props) | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | prefixCls | - | string | - | - | × | | rootClass | - | string | - | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | CalendarClassNamesType<DateType> | - | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | CalendarStylesType<DateType> | - | - | ✓ | | locale | The calendar's locale | typeof enUS | [(default)](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) | - | × | | validRange | To set valid range | [DateType, DateType] | - | - | × | | disabledDate | Function that specifies the dates that cannot be selected, `currentDate` is same dayjs object as `value` prop which you [shouldn't mutate it](https://github.com/ant-design/ant-design/issues/30987) | (date: DateType) => boolean | - | - | × | | dateFullCellRender | Customize the display of the date cell, the returned content will override the cell | (date: DateType) => VueNode | - | - | × | | dateCellRender | Deprecated. | (date: DateType) => VueNode | - | - | × | | monthFullCellRender | Deprecated. | (date: DateType) => VueNode | - | - | × | | monthCellRender | Deprecated. | (date: DateType) => VueNode | - | - | × | | cellRender | Customize cell content | (date: DateType, info: any) => VueNode | - | - | × | | fullCellRender | Customize cell content | (date: DateType, info: any) => VueNode | - | - | × | | headerRender | Render custom header in panel | HeaderRender<DateType> | - | - | × | | value | The current selected date, support `v-model:value` | DateType | - | - | × | | defaultValue | The date selected by default | DateType | - | - | × | | mode | The display mode of the calendar | CalendarMode | `month` | - | × | | fullscreen | Whether to display in full-screen | boolean | true | - | × | | showWeek | Whether to display week number | boolean | false | - | × | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | change | Callback for when date changes | (date: DateType) => void | - | | update:value | - | (date: DateType) => void | - | | panelChange | Callback for when panel changes | (date: DateType, mode: CalendarMode) => void | - | | select | Callback for when a date is selected, include source info | (date: DateType, selectInfo: SelectInfo) => void | - | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | dateFullCellRender | Customize the display of the date cell, the returned content will override the cell | (ctx: { date: AnyObject }) => any | - | | dateCellRender | - | (ctx: { date: AnyObject }) => any | - | | monthFullCellRender | - | (ctx: { date: AnyObject }) => any | - | | monthCellRender | - | (ctx: { date: AnyObject }) => any | - | | cellRender | Customize cell content | (ctx: { date: AnyObject, info: any }) => any | - | | fullCellRender | Customize cell content | (ctx: { date: AnyObject, info: any }) => any | - | | headerRender | Render custom header in panel | (config: { value: AnyObject, type: CalendarMode, onChange: (date: AnyObject) => void, onTypeChange: (type: CalendarMode) => void }) => any | - | ## Semantic DOM ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: Card URL: https://www.antdv-next.com/components/card.md --- ## When To Use {#when-to-use} A card can be used to display content related to a single subject. The content can consist of multiple elements of varying types and sizes. ## Examples {#examples} ### Basic card A basic card containing a title, content and an extra corner content. Supports two sizes: `default` and `small`. ```vue ``` ### No border A borderless card on a gray background. ```vue ``` ### Simple card A simple card only containing a content area. ```vue ``` ### Customized content You can use `a-card-meta` to support more flexible content. ```vue ``` ### Card in column Cards usually cooperate with grid column layout in overview page. ```vue ``` ### Loading card Shows a loading indicator while the contents of the card is being fetched. ```vue ``` ### Grid card Grid style card content. ```vue ``` ### Inner card It can be placed inside the ordinary card to display the information of the multilevel structure. ```vue ``` ### With tabs More content can be hosted. ```vue ``` ### Support more content configuration A Card that supports `cover`, `avatar`, `title` and `description`. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Card by passing objects/functions through `classes` and `styles`. ```vue ``` ### Cover and actions without body ```vue ``` ### Debug button icon alignment in Card extra Debug vertical alignment of button icons inside Card extra (#57727, #57896, #58428). ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Card #### Props {#card-props} | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | title | Card title | VueNode | - | - | × | | extra | Content to render in the top-right corner of the card | VueNode | - | - | × | | bordered | Toggles rendering of the border around the card, please use `variant` instead | boolean | true | - | × | | headStyle | Deprecated. | CSSProperties | - | - | × | | bodyStyle | Deprecated. | CSSProperties | - | - | × | | loading | Shows a loading indicator while the contents of the card are being fetched | boolean | false | - | × | | hoverable | Lift up when hovering card | boolean | false | - | × | | id | - | string | - | - | × | | size | Size of card | CardSize | `medium` | - | × | | type | Card style type, can be set to `inner` or not set | CardType | - | - | × | | cover | Card cover | VueNode | - | - | × | | actions | The action list, shows at the bottom of the Card | VueNode[] | - | - | × | | tabList | List of TabPane's head | CardTabListType[] | - | - | × | | tabBarExtraContent | Extra content in tab bar | VueNode \| { [key: string]: VueNode } | - | - | × | | activeTabKey | Current TabPane's key | string | - | - | × | | defaultActiveTabKey | Initial active TabPane's key, if `activeTabKey` is not set | string | `The key of first tab` | - | × | | tabProps | [Tabs](/components/tabs/#tabs) | Record<string, any> | - | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | CardClassNamesType | - | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | CardStylesType | - | - | ✓ | | variant | Variants of Card | 'borderless' \| 'outlined' | `outlined` | - | ✓ | #### Events {#card-events} | Event | Description | Type | Version | | --- | --- | --- | --- | | tabChange | Callback when tab is switched | (key: string) => void | - | | update:activeTabKey | - | (key: string) => void | - | #### Slots {#card-slots} | Slot | Description | Type | Version | | --- | --- | --- | --- | | title | Card title | () => any | - | | extra | Content to render in the top-right corner of the card | () => any | - | | cover | Card cover | () => any | - | | actions | The action list, shows at the bottom of the Card | () => any | - | | tabContentRender | - | TabsSlots['contentRender'] | - | | tabLabelRender | - | TabsSlots['labelRender'] | - | | tabBarExtraContent | Extra content in tab bar | () => any | - | ### CardGrid #### Props {#card-grid-props} | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | prefixCls | - | string | - | - | | hoverable | Lift up when hovering card | boolean | false | - | ### CardMeta #### Props {#card-meta-props} | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | prefixCls | - | string | - | - | × | | avatar | - | VueNode | - | - | × | | title | Card title | VueNode | - | - | × | | description | - | VueNode | - | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | CardMetaClassNamesType | - | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | CardMetaStylesType | - | - | ✓ | #### Slots {#card-meta-slots} | Slot | Description | Type | Version | | --- | --- | --- | --- | | avatar | Avatar | () => any | - | | title | Title | () => any | - | | description | Description | () => any | - | ## Semantic DOM {#semantic-dom} ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: Carousel URL: https://www.antdv-next.com/components/carousel.md --- ## When To Use {#when-to-use} - When there is a group of content on the same level. - When there is insufficient content space, it can be used to save space in the form of a revolving door. - Commonly used for a group of pictures/cards. ## Examples {#examples} ### Basic Basic usage. ```vue ``` ### Position There are 4 position options available. ```vue ``` ### Scroll automatically Timing of scrolling to the next card/picture. ```vue ``` ### Fade in Slides use fade for transition. ```vue ``` ### Arrows for switching Show the arrows for switching. ```vue ``` ### Progress of dots Show progress of dots. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Props | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | effect | Transition effect | CarouselEffect | `scrollx` | - | × | | id | - | string | - | - | × | | slickGoTo | - | number | - | - | × | | dotPosition | The position of the dots, which can be one of `top` `bottom` `left` `right` `start` `end`, Please use `dotPlacement` instead | DotPlacement \| 'left' \| 'right' | `bottom` | - | × | | dotPlacement | The position of the dots, which can be one of `top` `bottom` `start` `end` | DotPlacement | `bottom` | - | × | | dots | Whether to show the dots at the bottom of the gallery, `object` for `dotsClass` | boolean \| { class?: string } | true | - | × | | waitForAnimate | Whether to wait for the animation when switching | boolean | false | - | × | | autoplay | Whether to scroll automatically, you can specify `autoplay={{ dotDuration: true }}` to display the progress bar | boolean \| { dotDuration?: boolean } | false | - | × | | prevArrow | - | VueNode | - | - | × | | nextArrow | - | VueNode | - | - | × | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | init | - | NonNullable<Settings['onInit']> | - | | reInit | - | NonNullable<Settings['onReInit']> | - | | edge | - | NonNullable<Settings['onEdge']> | - | | swipe | - | NonNullable<Settings['onSwipe']> | - | | lazyLoad | - | NonNullable<Settings['onLazyLoad']> | - | | lazyLoadError | - | NonNullable<Settings['onLazyLoadError']> | - | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | prevArrow | - | () => any | - | | nextArrow | - | () => any | - | ### Methods | Method | Description | Type | Version | | --- | --- | --- | --- | | goTo | - | (slide: number, dontAnimate?: boolean) => void | - | | next | - | () => void | - | | prev | - | () => void | - | | autoPlay | - | (playType?: 'update' \| 'leave' \| 'blur') => void | - | | innerSlider | - | any | - | ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: Cascader URL: https://www.antdv-next.com/components/cascader.md --- ## When To Use {#when-to-use} - When you need to select from a set of associated data set. Such as province/city/district, company level, things classification. - When selecting from a large data set, with multi-stage classifications separated for easy selection. - Chooses cascade items in one float layer for better user experience. ## Examples {#examples} ### Basic Cascade selection box for selecting province/city/district. ```vue ``` ### Default value Specifies default value by an array. ```vue ``` ### Custom trigger Separate trigger button and result. ```vue ``` ### Hover Hover to expand sub menu, click to select option. ```vue ``` ### Disabled option Disable option by specifying the `disabled` property in `options`. ```vue ``` ### Change on select Allows the selection of only parent options. ```vue ``` ### Multiple Select multiple options. Disable the `checkbox` by adding the `disableCheckbox` property and selecting a specific item. The style of the disable can be modified by the className. ```vue ``` ### ShowCheckedStrategy Shows a selected item in a box using `showCheckedStrategy`. ```vue ``` ### Size Cascade selection box of different sizes. ```vue ``` ### Custom render For instance, add an external link after the selected value. ```vue ``` ### Search Search and select options directly. > Now, `Cascader[showSearch]` doesn't support search on server, more info [#5547](https://github.com/ant-design/ant-design/issues/5547) ```vue ``` ### Load Options Lazily Load options lazily with `loadData`. > Note: `loadData` cannot work with `showSearch`. ```vue ``` ### Custom Field Names Custom field names. ```vue ``` ### Prefix and Suffix Use `prefix` to customize the prefix content, use `suffixIcon` to customize the selection box suffix icon, and use `expandIcon` to customize the current item expand icon. ```vue ``` ### Custom dropdown Customize the dropdown menu via `popupRender`. ```vue ``` ### Placement You can manually specify the position of the popup via `placement`. ```vue ``` ### Variants Variants of Cascader, there are four variants: `outlined` `filled` `borderless` and `underlined`. ```vue ``` ### Status Add status to Cascader with `status`, which could be `error` or `warning`. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Cascader by passing objects/functions through `classes` and `styles`. ```vue ``` ### Panel Used for inline view case. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Props | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | allowClear | Show clear button | boolean \| \{ clearIcon?: VueNode \} | true | - | × | | changeOnSelect | Change value on each selection if set to true (always works when `multiple` is `true`) | boolean | false | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), string> \| (info: \{ props \})=> Record<[SemanticDOM](#semantic-dom), string> | - | - | ✓ | | disabled | Whether disabled select | boolean | false | - | × | | expandTrigger | expand current item when click or hover, one of `click` `hover` | string | `click` | - | × | | fieldNames | Custom field name for label and value and children | object | \{ label: `label`, value: `value`, children: `children` \} | - | × | | getPopupContainer | Parent Node which the selector should be rendered to. Default to `body`. When position issues happen, try to modify it into scrollable content and position it relative. [example](https://codepen.io/afc163/pen/zEjNOy?editors=0010) | function(triggerNode) | () => document.body | - | × | | loadData | To load option lazily, and it cannot work with `showSearch` | (selectedOptions) => void | - | - | × | | loadingIcon | Customize the loading icon while options are loading lazily | VueNode | - | - | ✓ | | maxTagCount | Max tag count to show. `responsive` will cost render performance | number \| `responsive` | - | - | × | | maxTagPlaceholder | Placeholder for not showing tags | VueNode \| function(omittedValues) | - | - | × | | maxTagTextLength | Max tag text length to show | number | - | - | × | | multiple | Support multiple or not | boolean | - | - | × | | open | Set visible of cascader popup | boolean | - | - | × | | options | The data options of cascade | [Option](#option)\[] | - | - | × | | placeholder | The input placeholder | string | - | - | × | | placement | Use preset popup align config from builtinPlacements | `bottomLeft` `bottomRight` `topLeft` `topRight` | `bottomLeft` | - | × | | showCheckedStrategy | The way to show selected items in the box (only effective when `multiple` is `true`). `Cascader.SHOW_CHILD`: just show child treeNode. `Cascader.SHOW_PARENT`: just show parent treeNode (when all child treeNode under the parent treeNode are checked) | `Cascader.SHOW_PARENT` \| `Cascader.SHOW_CHILD` | `Cascader.SHOW_PARENT` | - | × | | showSearch | Whether show search input in single mode | boolean \| [Object](#showsearch) | false | - | × | | size | The input size | `large` \| `medium` \| `small` | `medium` | - | × | | status | Set validation status | 'error' \| 'warning' | - | - | × | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: \{ props \})=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | - | ✓ | | value | The selected value, support `v-model:value` | string\[] \| number\[] | - | - | × | | variant | Variants of selector | `outlined` \| `borderless` \| `filled` \| `underlined` | `outlined` | - | ✓ | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | change | Callback when finishing cascader select | (value, selectedOptions) => void | - | | openChange | Callback when popup shown or hidden | (open: boolean) => void | - | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | displayRender | The render function of displaying selected options | (label, selectedOptions) => VueNode | - | | expandIcon | Customize the current item expand icon | VueNode | - | | loadingIcon | Customize the loading icon while options are loading lazily | VueNode | - | | notFoundContent | Specify content to show when no result matches | VueNode | - | | optionRender | Customize the rendering dropdown options | (option: Option) => VueNode | - | | popupRender | Customize dropdown content | (menus: VNode) => VueNode | - | | prefix | The custom prefix | VueNode | - | | removeIcon | The custom remove icon | VueNode | - | | suffixIcon | The custom suffix icon | VueNode | - | | tagRender | Custom render function for tags in `multiple` mode | (\{ label: string, onClose: function, value: string \}) => VueNode | - | ### Methods | Method | Description | Version | | --- | --- | --- | | blur() | Remove focus | - | | focus() | Get focus | - | ## Types ### showSearch Fields for showSearch when it's an object: | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | autoClearSearchValue | Whether the current search will be cleared on selecting an item. Only applies when `multiple` is `true` | boolean | true | - | | filter | The function will receive two arguments, inputValue and option, if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded | function(inputValue, path): boolean | - | - | | limit | Set the count of filtered items | number \| false | 50 | - | | matchInputWidth | Whether the width of list matches input, ([how it looks](https://github.com/ant-design/ant-design/issues/25779)) | boolean | true | - | | render | Used to render filtered options | function(inputValue, path): VueNode | - | - | | sort | Used to sort filtered options | function(a, b, inputValue) | - | - | | searchValue | Set search value, Need work with `showSearch` | string | - | - | | onSearch | The callback function triggered when input changed | (search: string) => void | - | - | ### Option ```typescript interface Option { value: string | number label?: VueNode disabled?: boolean children?: Option[] // Determines if this is a leaf node(effective when `loadData` is specified). // `false` will force trade TreeNode as a parent node. // Show expand icon even if the current node has no children. isLeaf?: boolean } ``` ## Semantic DOM ## Design Token --- Title: Checkbox URL: https://www.antdv-next.com/components/checkbox.md --- ## When To Use {#when-to-use} ## Examples {#examples} ### Basic Basic usage of checkbox. ```vue ``` ### Disabled Disabled checkbox. ```vue ``` ### Controlled Checkbox Communicated with other components. ```vue ``` ### Checkbox Group Generate a group of checkboxes from an array. ```vue ``` ### Check all The `indeterminate` property can help you to achieve a 'check all' effect. ```vue ``` ### Use with Grid We can use Checkbox and Grid in CheckboxGroup, to implement complex layout. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Checkbox by passing objects/functions through `classes` and `styles`. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Checkbox #### Props {#checkbox-props} | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | checked | Specifies whether the checkbox is selected, support `v-model:checked` | string \| number \| boolean \| object | false | - | × | | checkedValue | The value when checked | string \| number \| boolean \| object | true | - | × | | defaultChecked | Whether to set the initial state | string \| number \| boolean \| object | false | - | × | | disabled | If disable checkbox | boolean | false | - | × | | indeterminate | The indeterminate checked state of checkbox | boolean | false | - | × | | unCheckedValue | The value when unchecked | string \| number \| boolean \| object | false | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), string> \| (info: \{ props \})=> Record<[SemanticDOM](#semantic-dom), string> | - | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<[SemanticDOM](#semantic-dom), CSSProperties> \| (info: \{ props \})=> Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | - | ✓ | #### Events {#checkbox-events} | Event | Description | Type | Version | | --- | --- | --- | --- | | change | The callback function that is triggered when the state changes | (e: CheckboxChangeEvent) => void | - | | focus | Called when entering the component | function() | - | | blur | Called when leaving the component | function() | - | ### CheckboxGroup #### Props {#checkboxgroup-props} | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | options | Specifies options | string\[] \| number\[] \| Option\[] | \[] | - | | disabled | If disable all checkboxes | boolean | false | - | | name | The `name` property of all `input[type="checkbox"]` children | string | - | - | | value | Used for setting the currently selected value, support `v-model:value` | (string \| number \| boolean)\[] | \[] | - | | labelRender | - | (params: { item: CheckboxOptionType, index: number }) => any | - | - | #### Events {#checkboxgroup-events} | Event | Description | Type | Version | | --- | --- | --- | --- | | change | The callback function that is triggered when the state changes | (checkedValue: T[]) => void | - | #### Slots {#checkboxgroup-slots} | Slot | Description | Type | Version | | --- | --- | --- | --- | | labelRender | - | (params: { item: CheckboxOptionType, index: number }) => any | - | ## Semantic DOM {#semantic-dom} ## Design Token See [Customize Theme](/docs/vue/customize-theme) to learn how to use Design Token. --- Title: Collapse URL: https://www.antdv-next.com/components/collapse.md --- ## When To Use {#when-to-use} - Can be used to group or hide complex regions to keep the page clean. - `Accordion` is a special kind of `Collapse`, which allows only one panel to be expanded at a time. ## Examples {#examples} ### Collapse By default, any number of panels can be expanded at a time. The first panel is expanded in this example. ```vue ``` ### Size Antdv Next supports a default collapse size as well as a large and small size. If a large or small collapse is desired, set the `size` property to either `large` or `small` respectively. Omit the `size` property for a collapse with the default size. ```vue ``` ### Accordion In accordion mode, only one panel can be expanded at a time. ```vue ``` ### Nested panel `Collapse` is nested inside the `Collapse`. ```vue ``` ### Borderless A borderless style of Collapse. ```vue ``` ### Custom Panel Customize the background, border, margin styles and icon for each panel. ```vue ``` ### Panel Icon The panel header can carry an icon, rendered here through the `labelRender` slot. Icons from third-party libraries render as a bare `` and stay vertically centred with the title text just the same. ```vue ``` ### SFC Mode Support SFC mode with `a-collapse-panel`. ```vue

A dog is a type of domesticated animal. Known for its loyalty and faithfulness.

It can be found as a welcome guest in many households across the world.

``` ### No arrow You can hide the arrow icon by passing `showArrow=false` to the panel. ```vue ``` ### Extra node Render extra element in the top-right corner of each panel. ```vue ``` ### Ghost Collapse Making collapse's background transparent. ```vue ``` ### Collapsible Specify the trigger area of collapsible by `collapsible`. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of Collapse by passing objects/functions through `classes` and `styles`. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Collapse #### Props {#collapse-props} | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | activeKey | Key of the active panel, support `v-model:active-key` | Array<string \| number> \| string \| number | No default value. In accordion mode, it's the key of the first panel | - | × | | defaultActiveKey | Key of the initial active panel | Array<string \| number> \| string \| number | - | - | × | | accordion | If true, Collapse renders as Accordion | boolean | false | - | × | | destroyOnHidden | Destroy Inactive Panel | boolean | false | - | × | | rootClass | Root container class | string | - | - | × | | bordered | Toggles rendering of the border around the collapse block | boolean | true | - | × | | expandIcon | Allow to customize collapse icon | (panelProps: PanelProps) => any | - | - | ✓ | | expandIconPlacement | Set expand icon placement | `start` \| `end` | `start` | - | × | | ghost | Make the collapse borderless and its background transparent | boolean | false | - | × | | size | Set the size of collapse | SizeType | `medium` | - | × | | collapsible | Specify how to trigger Collapse. Either by clicking icon or by clicking any area in header or disable collapse functionality itself | `header` \| `icon` \| `disabled` | - | - | × | | labelRender | Custom render label | (params: { item: CollapseItemType, index: number }) => any | - | - | × | | contentRender | Custom render content | (params: { item: CollapseItemType, index: number }) => any | - | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | CollapseClassNamesType | - | - | ✓ | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | CollapseStylesType | - | - | ✓ | | items | Collapse items content | CollapseItemType[] | - | - | × | #### Events {#collapse-events} | Event | Description | Type | Version | | --- | --- | --- | --- | | change | Callback function executed when active panel is changed | (key: string[]) => void | - | #### Slots {#collapse-slots} | Slot | Description | Type | Version | | --- | --- | --- | --- | | expandIcon | Allow to customize collapse icon | (panelProps: PanelProps) => any | - | | labelRender | - | (params: { item: CollapseItemType, index: number }) => any | - | | contentRender | - | (params: { item: CollapseItemType, index: number }) => any | - | ### CollapsePanel {#collapsepanel} #### Props {#collapsepanel-props} Deprecated: when using items, prefer configuring panels with `items`. | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | collapsible | Specify how to trigger Collapse. Either by clicking icon or by clicking any area in header or disable collapse functionality itself | `header` \| `icon` \| `disabled` | - | - | | extra | The extra element in the corner | VueNode | - | - | | forceRender | Forced render of content on panel, instead of lazy rendering after clicking on header | boolean | false | - | | header | Title of the panel | VueNode | - | - | | key | Unique key identifying the panel from among its siblings | string \| number | - | - | | showArrow | If false, panel will not show arrow icon. If false, collapsible can't be set as icon | boolean | true | - | #### Slots {#collapsepanel-slots} | Slot | Description | Type | Version | | --- | --- | --- | --- | | default | Body area content | VueNode | - | | header | Title of the panel | VueNode | - | | extra | The extra element in the corner | VueNode | - | ## Types ### ItemType | Property | Description | Type | Default | Version | | --- | --- | --- | --- | --- | | classes | Semantic structure class | Record<[SemanticDOM](#semantic-dom), string> | - | - | | collapsible | Specify whether the panel be collapsible or the trigger area of collapsible | `header` \| `icon` \| `disabled` | - | - | | content | Body area content | VueNode | - | - | | extra | The extra element in the corner | VueNode | - | - | | forceRender | Forced render of content on panel, instead of lazy rendering after clicking on header | boolean | false | - | | key | Unique key identifying the panel from among its siblings | string \| number | - | - | | label | Title of the panel | VueNode | - | - | | showArrow | If false, panel will not show arrow icon. If false, collapsible can't be set as icon | boolean | true | - | | styles | Semantic structure style | Record<[SemanticDOM](#semantic-dom), CSSProperties> | - | - | ## Semantic DOM ## Design Token --- Title: ColorPicker URL: https://www.antdv-next.com/components/color-picker.md --- ## When To Use {#when-to-use} Used when the user needs to make a customized color selection. ## Examples {#examples} ### Basic Usage Basic Usage. ```vue ``` ### Trigger size Antdv Next supports three trigger sizes: small, default and large. If a large or small trigger is desired, set the `size` property to either `large` or `small` respectively. Omit the `size` property for a trigger with the default size. ```vue ``` ### controlled mode Set the component to controlled mode. Will lock the display color if controlled by `onChangeComplete`. ```vue ``` ### Line Gradient Set the color to a single or a gradient color via `mode`. ```vue ``` ### Rendering Trigger Text Renders the default text of the trigger, effective when `showText` is `true`. When customizing text, you can use `showText` as a function to return custom text. ```vue ``` ### Disable Set to disabled state. ```vue ``` ### Disabled Alpha Disabled color alpha. ```vue ``` ### Clear Color Clear Color. ```vue ``` ### Custom Trigger Triggers for customizing color panels. ```vue ``` ### Custom Trigger Event Triggers event for customizing color panels, provide options `click` and `hover`. ```vue ``` ### Color Format Encoding formats, support `HEX`, `HSB`, `RGB`. ```vue ``` ### Value Format Use `valueFormat` to define the output value type of color, supporting `hex`, `rgb`, and `hsb`. ```vue ``` ### Preset Colors Set the presets color of the color picker. ```vue ``` ### Custom Render Panel Rendering of the free control panel via `panelRender`. ```vue ``` ### Custom semantic dom styling You can customize the [semantic dom](#semantic-dom) style of ColorPicker by passing objects or functions through `classes` and `styles`. ```vue ``` ## API Common props ref:[Common props](/docs/vue/common-props) ### Props | Property | Description | Type | Default | Version | [Global Config](/components/config-provider#component-config) | | --- | --- | --- | --- | --- | --- | | allowClear | Allow clearing color selected | boolean | false | - | × | | arrow | Configuration for popup arrow | boolean \| { pointAtCenter: boolean } | true | - | ✓ | | autoAdjustOverflow | Auto adjust placement when popup is invisible | boolean \| AdjustOverflow | - | - | × | | classes | Customize class for each semantic structure inside the component. Supports object or function. | ColorPickerClassNamesType | - | - | ✓ | | defaultFormat | Default format of color | ColorFormatType | `hex` | - | × | | defaultValue | Default value of color | [ColorValueType](#colorvaluetype) | - | - | × | | destroyOnHidden | Whether destroy dom when close | boolean | false | - | × | | disabled | Disable ColorPicker | boolean | false | - | × | | disabledAlpha | Disable Alpha | boolean | false | - | × | | disabledFormat | Disable format of color | boolean | false | - | × | | format | Format of color, support `v-model:format` | ColorFormatType | - | - | × | | getPopupContainer | Specify container for popup | (triggerNode: HTMLElement) => HTMLElement | - | - | × | | mode | Configure single or gradient color | ModeType \| ModeType[] | `single` | - | × | | open | Whether to show popup, support `v-model:open` | boolean | - | - | × | | placement | Placement of popup | TriggerPlacement | `bottomLeft` | - | × | | presets | Preset colors | [PresetsItem](#presetsitem)[] | - | - | × | | panelRender | Custom Render Panel | (params: { panel: any, extra: { components: { Picker: any, Presets: any } } }) => any | - | - | × | | rootClass | Root container class | string | - | - | × | | showText | Show color text | boolean \| ((params: { color: Color }) => any) | false | - | × | | size | Setting the trigger size | SizeType | `medium` | - | × | | styles | Customize inline style for each semantic structure inside the component. Supports object or function. | ColorPickerStylesType | - | - | ✓ | | trigger | ColorPicker trigger mode | TriggerType | `click` | - | × | | valueFormat | Set the output format of color value, supporting `hex`, `rgb`, and `hsb`. After setting, `v-model:value` returns strings in the selected format. Demo: [Value Format](#color-picker-demo-value-format) | ColorFormatType | - | - | × | | value | Value of color, support `v-model:value` | [ColorValueType](#colorvaluetype) | - | - | × | ### Events | Event | Description | Type | Version | | --- | --- | --- | --- | | change | Callback when `value` is changed | (value: Color, css: string) => void | - | | clear | Called when clear | () => void | - | | changeComplete | Called when color pick ends | (value: Color) => void | - | | openChange | Callback when `open` is changed | (open: boolean) => void | - | | formatChange | Callback when `format` is changed | (format?: ColorFormatType) => void | - | ### Slots | Slot | Description | Type | Version | | --- | --- | --- | --- | | default | Trigger content | () => any | - | | panelRender | Custom Render Panel | (params: { panel: any, extra: { components: { Picker: any, Presets: any } } }) => any | - | | showText | Custom text rendering | (params: { color: Color }) => any | - | ## Types ### ColorValueType ```ts type ColorValueType = | string | Color | { color: string | Color, percent: number }[] | null ``` ### PresetsItem ```ts interface PresetsItem { label: VueNode colors: ColorValueType[] defaultOpen?: boolean key?: Key } ``` ### Color | Property | Description | Type | Version | | --- | --- | --- | --- | | toCssString | Convert to CSS support format | () => string | - | | toHex | Convert to `hex` format characters, the return type like: `1677ff` | () => string | - | | toHexString | Convert to `hex` format color string, the return type like: `#1677ff` | () => string | - | | toHsb | Convert to `hsb` object | () => { h: number, s: number, b: number, a: number } | - | | toHsbString | Convert to `hsb` format color string, the return type like: `hsb(215, 91%, 100%)` | () => string | - | | toRgb | Convert to `rgb` object | () => { r: number, g: number, b: number, a: number } | - | | toRgbString | Convert to `rgb` format color string, the return type like: `rgb(22, 119, 255)` | () => string | - | ## Semantic DOM ## Design Token ## FAQ ### Questions about color assignment {#faq-color-assignment} The value of the color selector supports both string color values and selector-generated `Color` objects. However, since there is a precision error when converting color strings of different formats to each other, it is recommended to use selector-generated `Color` objects for assignment operations in controlled scenarios, so that the precision problem can be avoided and the values are guaranteed to be accurate and the selector can work as expected. --- Title: Component Changelog URL: https://www.antdv-next.com/components/changelog.md --- ## V1.6.0 Release Date: 2026-10-02 This release is a performance pass: the derived design token chain is shared across component instances, style hooks resolve the token once, the wrapper layers forward only the props that are actually set to `@v-c/*`, Table hands `@v-c/table` referentially stable column config, and the delayed style-removal timer no longer keeps unmounted component trees in memory. On a production build, 1000 Buttons hot-mount in 116 ms instead of 157 ms with the heap down from 92 MB to 48 MB, 200 DatePickers go from 368 ms to 156 ms, and a 1000-row Table cold-mounts in 225 ms instead of 439 ms. `@antdv-next/cssinjs` 1.1.0 ships alongside with new public APIs, and `@v-c/util`, `trigger`, `picker`, `select`, `table`, `menu` and `tooltip` move to their matching stable releases; since the dependency floor moves as a whole, this is a minor release. It also advances ant-design upstream tracking to `820e1a8c2d` and fixes a batch of Form validation, Alert, Drawer, Descriptions, ColorPicker and ConfigProvider issues; the IDE web-types are now generated from `global.d.ts` and cover all 128 global components. **⚡ Performance** All numbers are production builds on the same machine (Apple M2 Pro, Chrome 154), 3 pages × 5 hot mounts averaged, compared with 1.5.6: | scene | instances | hot mount ms | heap MB | | --- | ---: | ---: | ---: | | Button | 1000 | 157 → 116 | 92 → 48 | | Input | 500 | 91 → 65 | 54 → 27 | | Select | 500 | 305 → 200 | 80 → 77 | | DatePicker | 200 | 368 → 156 | 61 → 47 | | Menu (inline, 500 items) | 1 | 206 → 143 | 77 → 47 | | Form (100 Form.Item + Input) | 1 | 84 → 57 | 40 → 21 | | Table (1000 rows, cold mount) | 1 | 439 → 225 | 64 → 57 | | typical admin page (menu + filter form + paginated table) | 1 | 50 → 38 | 18 → 13 | * perf(theme): the derived design token is computed once per ConfigProvider / DesignTokenProvider / StyleProvider combination and shared by every component instance under it; previously each style hook rebuilt the whole derivation chain, and a Button paid for four of them. Computeds per component instance: Button 219 → 51, Input 263 → 65, FormItem + Input 901 → 178 (via `@antdv-next/cssinjs` 1.1.0) * perf(theme): `genStyleHooks` resolves `useToken()` once and hands it to both the component style hook and the CSS variable register; `useStyleRegister` keeps a single computed (the cache path), `useBaseConfig` / `useComponentBaseConfig` return getter refs, and `usePrefix` / `useCSP` are memoized per config ref * perf(date-picker, select, menu): the wrappers forward only the props that are set to `@v-c/picker`, `@v-c/select` and `@v-c/menu` instead of spreading every declared prop (mostly `undefined`) into layers that normalise them again; props normalisation and reactive proxy spreads used to account for about a third of DatePicker mount time * perf(table): `InternalTable` hands `@v-c/table` referentially stable columns, column transforms and expandable config, and reuses the source column list when no column is `responsive`; these objects used to be rebuilt on every render, which `@v-c/table` treated as a column change and re-rendered every row and cell. Rows and cells now render exactly once per mount, 1000 rows cold mount 439 → 225 ms * perf(semantic): `classes` / `styles` resolve the merged component props object only for the function form; plain objects no longer pay for a full spread per instance * perf(form): a `validateDebounce` wait timer is released as soon as a newer event arrives or the item unmounts, so each Form.Item keeps at most one timer instead of one per keystroke * fix(cssinjs): the 500 ms delayed style-removal timer now lives at module level and no longer retains the unmounted component tree (computeds, DOM refs, app root) through its closure. Heap retained 300 ms after unmounting 1000 Buttons drops from 79 MB to 2.4 MB; the 500 ms delay kept for Transition is unchanged * perf(vc): `@v-c/trigger` 1.1.6 creates its alignment / position-tracking effects on first open, so closed Triggers no longer hold them; `@v-c/table` 1.3.4 keeps one hover memo per row instead of a computed per cell per render and measures the scrollbar only with `scroll.y` / `sticky`; `@v-c/picker` 1.5.2, `@v-c/select` 1.2.8, `@v-c/menu` 1.4.2 and `@v-c/tooltip` 1.1.4 forward only defined props between their layers and replace per-prop computeds with getter refs. Computeds per instance: Select 329 → 140, DatePicker 367 → 111, Menu item 262 → 70, Table row 47 → 9 **🐞 Fixes** * fix(form): event-driven validation (change / blur / focus) honours `validateDebounce`: `validating` is published right away while the rules run after the wait; `validateFields`, `submit` and rule checks stay immediate ([#981](https://github.com/antdv-next/antdv-next/pull/981)) * fix(form): an async validation superseded by a newer one, `clearValidate` or `resetField` no longer writes its stale result; `resetField` no longer swallows the user's next change when the value did not actually change ([#977](https://github.com/antdv-next/antdv-next/pull/977)) * fix(table): Shift-clicking the selection checkbox triggers range selection and `rowSelection.onSelect` receives the click event instead of the change event; with `preserveSelectedRowKeys`, `onSelect` / `onSelectAll` / `onSelectMultiple` receive the preserved records that are no longer in the current data (#59449); the fixed selection header `z-index` matches ant-design ([#968](https://github.com/antdv-next/antdv-next/pull/968)); scrolling to the first row after pagination, sorting or filtering reads the scroll config merged with ConfigProvider `table.scroll` ([#969](https://github.com/antdv-next/antdv-next/pull/969)) * fix(alert): the object form of `closable` supports `onClose` / `afterClose` callbacks and `disabled`, ConfigProvider `alert.closeIcon` takes effect and the ref exposes `nativeElement` ([#971](https://github.com/antdv-next/antdv-next/pull/971), #59432); the close button's semantic class is no longer emitted twice and the icon's semantic class matches React (#59384) * fix(drawer): `extra` renders as a direct child of the header instead of nesting inside `header-title` ([#975](https://github.com/antdv-next/antdv-next/pull/975)); the never-implemented `afterOpenChange` event declaration and docs are removed ([#976](https://github.com/antdv-next/antdv-next/pull/976)) * fix(descriptions): in bordered mode the semantic `classes` / `styles` apply to the cell instead of the inner `span`, and `attrs.style` is merged in ([#972](https://github.com/antdv-next/antdv-next/pull/972)); an empty label / content no longer renders an empty `span` ([#973](https://github.com/antdv-next/antdv-next/pull/973)) * fix(color-picker): `class` / `style` and other attrs go to the trigger instead of the panel ([#966](https://github.com/antdv-next/antdv-next/pull/966)); clearing the colour no longer emits `change` and `update:value` twice ([#964](https://github.com/antdv-next/antdv-next/pull/964)); the `showText` function and slot receive `{ color }` instead of a double-wrapped object ([#962](https://github.com/antdv-next/antdv-next/pull/962), [#963](https://github.com/antdv-next/antdv-next/pull/963)) * fix(config-provider): the `popupMatchSelectWidth`, `popupOverflow`, `calendar`, `carousel`, `cardMeta`, `ribbon` and `warning` configs reach the components ([#967](https://github.com/antdv-next/antdv-next/pull/967)) * fix(date-picker): consume ConfigProvider `datePicker.allowClear` / `clearIcon` ([#970](https://github.com/antdv-next/antdv-next/pull/970)); RangePicker reads the `DatePicker` locale instead of the `Calendar` one ([#978](https://github.com/antdv-next/antdv-next/pull/978)) * fix(card): fall back to `tabProps.defaultActiveKey` when `defaultActiveTabKey` is not set ([#978](https://github.com/antdv-next/antdv-next/pull/978)) * fix(cascader): ConfigProvider `cascader.clearIcon` no longer triggers the deprecated `clearIcon` warning * fix(dropdown, tooltip, popover): a plain-text or Fragment default slot on the trigger is wrapped in a `span`, so the popup still opens when there is no element to attach events to ([#979](https://github.com/antdv-next/antdv-next/pull/979)) * fix(select, dropdown, mentions): the `_InternalPanelDoNotUseOrYouWillBeFired` pure panels no longer leak undeclared attrs onto the wrapper `div` ([#980](https://github.com/antdv-next/antdv-next/pull/980)) * fix(float-button): `update:open` is emitted only when the open state actually changes ([#983](https://github.com/antdv-next/antdv-next/pull/983)) * fix(flex): ConfigProvider `flex.style` is applied to the rendered style ([#982](https://github.com/antdv-next/antdv-next/pull/982)) * fix(carousel): vertical carousels are no longer mirrored in RTL, including when the orientation comes from `dotPlacement` (#59436) * fix(mentions, tree-select): the empty state calls `renderEmpty` with the correct component names `Mentions` / `TreeSelect` (#59364) * fix(breadcrumb): menu item links no longer get an `undefined` prefix when there is no `href` (#59423) * fix(tree): DirectoryTree Shift range selection works again with numeric keys (#59375) * fix(transfer): removing items in one-way mode clears the right-hand selection (#59428) * fix(types): resolve the type errors vue-tsc reported in the sources: `useLocale` returns a readonly tuple, and a few internal types in Carousel, Table, Tag, Timeline and FormItem are tightened without runtime changes **📖 Documentation** * docs(table): the three `scroll` fields are marked as supporting global config; docs(form): document that the `horizontal` layout stacks labels above controls at viewports of `575px` or less, and how to customise that through the `xs` settings of `labelCol` / `wrapperCol` (#59398, #59417) **🧰 Infrastructure & Dependencies** * chore(cssinjs): `@antdv-next/cssinjs` 1.1.0 adds `createGlobalCache` + `useGlobalCacheEntry` (a shareable reactive cache entry plus per-instance reference counting), `createCacheToken`, and the `GlobalCacheEntry` and `UseToken` type exports; `onCacheRemove` callbacks receive the `StyleContextProps` as a third argument so they can be module-level functions instead of closures over the hook scope * chore(deps): upgrade `@v-c/util` 1.3.2 (adds `pickDefined`), `@v-c/trigger` 1.1.6, `@v-c/picker` 1.5.2, `@v-c/select` 1.2.8, `@v-c/table` 1.3.4, `@v-c/menu` 1.4.2, `@v-c/tooltip` 1.1.4, `@v-c/notification` 2.0.5 (repeated pauses no longer bill the paused span into the elapsed time) and `@v-c/tree-select` 1.1.3 * chore(web-types): the IDE web-types are generated with `global.d.ts` as the single source of tags and cover all 128 global components (25 of them, such as the layout sections, radio, textarea, tab pane and table column, had no entry before, and 17 pseudo tags like `a-参数` were emitted); doc headings resolve to real components, `~~prop~~` rows are marked deprecated, `extends` can omit parent items, and markdown escapes and entities in attribute types are cleaned up (`Record` is no longer stripped as an HTML tag); `a-textarea` goes from 3 to 24 attributes and zh descriptions cover 1603 / 1685 attributes; `global.d.ts` declares `AListy`, `ATableColumnGroup`, `ACheckableTagGroup`, `AMentionsOption` and `AMenuDivider` ([#965](https://github.com/antdv-next/antdv-next/issues/965)) * chore(perf): add the `tests/perf` reactive-count regression test (computeds / watchers / child components per component instance, failing above the committed baseline), the `pnpm bench` browser benchmark (headless Chrome over CDP, reporting cold / hot mount time, mounted heap, heap retained after unmount and interaction time, with `--profile` recording a CPU profile) and the `VC_LOCAL` alias for testing against local `@v-c/*` builds * chore(sync): ant-design upstream tracking advances to `820e1a8c2d` (after 6.6.5); incidental deprecated API usages in tests migrate to the current APIs ## V1.5.6 Release Date: 2026-09-25 This release fixes popups that land in the wrong place for one frame when the page carries a global transition style: a common "reduced motion" reset takes effect when the OS asks for reduced motion (e.g. Windows with "Animation effects" turned off), and popups aligned to the right or bottom such as Dropdown, Select and Tooltip used to paint their first frame at the viewport edge before jumping into place. It also upgrades a batch of `@v-c/*` foundation packages: the time panel gains keyboard navigation and screen-reader semantics, Tab and `autoFocus` move focus into the Dropdown menu, and DatePicker's default dayjs config loads in native Node ESM. Collapse `v-model:active-key` now updates, and the Menu event types are exported. **✨ Features** * feat(time-picker, date-picker): keyboard navigation in the time panel — Arrow Up / Down move the cursor and skip disabled cells, Enter / Space select it; time columns and cells get `listbox` / `option` semantics with localized labels (via `@v-c/picker` 1.5.0) * feat(listy): a function `rowKey` receives the item's index in `items` as its second argument; grouping does not change it (via `@v-c/listy` 1.2.0) * feat(menu): export the `MenuInfo` and `SelectInfo` event types ([#961](https://github.com/antdv-next/antdv-next/pull/961), [#693](https://github.com/antdv-next/antdv-next/issues/693)) **🐞 Fixes** * fix(trigger): with a global `transition-duration` on the page (e.g. the common `prefers-reduced-motion` reset), right- or bottom-aligned popups (a `bottomRight` Dropdown, a `top` Tooltip, …) no longer paint their first frame at the viewport edge; the Tooltip frame could also make the page briefly scrollable (via `@v-c/trigger` 1.1.5) * fix(dropdown): pressing Tab while the popup is open moves focus into the menu instead of closing it, also when the menu is wrapped in another element; `autoFocus` now works and focuses without scrolling the page, matching antd (via `@v-c/dropdown` 1.1.1) * fix(menu): calling `focus()` through the ref no longer throws (via `@v-c/menu` 1.4.1) * fix(date-picker): the default dayjs config loads in native Node ESM (e.g. when SSR externalizes dependencies) instead of failing with `ERR_MODULE_NOT_FOUND` (via `@v-c/picker` 1.5.0) * fix(collapse): the `v-model:active-key` binding updates as expected ([#960](https://github.com/antdv-next/antdv-next/pull/960)) **📖 Documentation** * docs(faq): add ["Why do popups have no animation, or flash at the viewport edge before settling?"](/docs/vue/faq#popup-animation-missing-with-reduced-motion), covering how the reduced-motion reset affects popups, the OS settings that trigger it, how to check it and how to fix it **🧰 Infrastructure & Dependencies** * chore(deps): upgrade `@v-c/trigger` 1.1.5, `@v-c/util` 1.3.1, `@v-c/menu` 1.4.1, `@v-c/dropdown` 1.1.1, `@v-c/listy` 1.2.0 and `@v-c/picker` 1.5.0. In `@v-c/util`, `dynamicCSS` no longer throws when the page has no `` / ``, and `set` no longer mutates the source object when removing a nested value * chore(build): the UMD bundles now read the global names of `dayjs` and its plugins and locales from dayjs's own UMD files, so they always match the dayjs builds on the CDN (`@v-c/picker` 1.5.0 imports dayjs plugins with a `.js` extension); the post-build browser bundle check verifies the global every external dependency of the UMD bundles reads, and the build fails on an external without a configured global instead of letting the bundler guess its name ## V1.5.5 Release Date: 2026-09-25 This release advances ant-design upstream tracking to the master after **6.6.5** (`2a04506177`) and starts tracking `ant-design/cssinjs-util`. Table gains resizable columns, Tabs adds `scrollPosition`, Message supports `stack`, and Splitter can animate collapsing; `@antdv-next/cssinjs` 1.0.7 ships alongside it, adding `extraCssVarPrefixCls` to `genStyleHooks` and a CSP `nonce` on CSS variable styles. It also fixes a batch of Vue-adaptation issues: kebab-case `` attributes being ignored, string / array `style` values throwing, props leaking to the DOM in several components, slots and events not taking effect in Avatar / Alert / Breadcrumb / Cascader / Card and others, and Checkbox / Radio `id`, `name` and `blur` not reaching the native input. **✨ Features** * feat(table): columns support `resizable` drag-to-resize with a new `resizeColumn` event `(width, column, columnKey)`, using `minWidth` as the lower bound; group columns do not accept `resizable` and are resized through their leaf columns ([#327](https://github.com/antdv-next/antdv-next/issues/327)) * feat(tabs): add `scrollPosition` to control how the active tab is scrolled into view when switching ([#954](https://github.com/antdv-next/antdv-next/pull/954), [#916](https://github.com/antdv-next/antdv-next/pull/916), #39433) * feat(message): add the `stack` option, and fix semantic `list` class / style forwarding and the reactivity of holder config ([#927](https://github.com/antdv-next/antdv-next/pull/927)) * feat(splitter): add `collapsible.motion`; when enabled, collapsing is animated with the global `motionDurationSlow` and `motionEaseInOut` tokens ([#913](https://github.com/antdv-next/antdv-next/pull/913)) * feat(cssinjs): `genStyleHooks` gains an `extraCssVarPrefixCls` option that takes an array or `({ prefixCls, rootCls }) => string[]` to inject component CSS variables for extra classes; the function form is re-evaluated when `prefixCls` changes (ant-design/cssinjs-util#36, #37) **🐞 Fixes** * fix(table): kebab-case `` attributes such as `data-index` and `min-width` are now resolved instead of rendering empty cells; a bare `resizable` attribute is treated as `true` ([#945](https://github.com/antdv-next/antdv-next/pull/945)) * fix(table): with `preserveSelectedRowKeys`, selecting across pages no longer drops initially selected records from `rowSelection.onChange` ([#881](https://github.com/antdv-next/antdv-next/pull/881)); support semantic pagination styling through Table's `pagination.classes` / `pagination.styles` ([#849](https://github.com/antdv-next/antdv-next/pull/849)); RTL now comes from ConfigProvider `direction` only, matching ant-design ([#907](https://github.com/antdv-next/antdv-next/pull/907)); columns hidden by `responsive` still apply a controlled `filteredValue` ([#886](https://github.com/antdv-next/antdv-next/pull/886), #59198) * fix(card): rename the embedded Tabs class to `ant-card-head-tabs` so style overrides apply again ([#937](https://github.com/antdv-next/antdv-next/pull/937)); semantic `classes` / `styles` functions receive the resolved `variant` ([#939](https://github.com/antdv-next/antdv-next/pull/939)); the `tabBarExtraContent` slot takes priority over the prop of the same name ([#941](https://github.com/antdv-next/antdv-next/pull/941)) * fix(avatar): fall back to `icon` or the default slot when the image fails to load ([#889](https://github.com/antdv-next/antdv-next/pull/889)), and reset that fallback when only `srcSet` changes ([#908](https://github.com/antdv-next/antdv-next/pull/908)); emit `click` when clicked ([#906](https://github.com/antdv-next/antdv-next/pull/906)); expose `nativeElement` via ref and export an `AvatarRef` type ([#909](https://github.com/antdv-next/antdv-next/pull/909)) * fix(badge): the horizontal `offset` is no longer flipped under RTL ([#912](https://github.com/antdv-next/antdv-next/pull/912)); fractional horizontal offsets are no longer truncated ([#948](https://github.com/antdv-next/antdv-next/pull/948), #59314); hide the badge when `text="0"` and `showZero` is not set ([#911](https://github.com/antdv-next/antdv-next/pull/911)) * fix(cascader): make the `loadingIcon` prop work and support a `loadingIcon` slot ([#946](https://github.com/antdv-next/antdv-next/pull/946)); make the top-level `clearIcon` take effect ([#953](https://github.com/antdv-next/antdv-next/pull/953)); stop `dropdownStyle` leaking into DOM attributes ([#952](https://github.com/antdv-next/antdv-next/pull/952)) * fix(alert): the `icon` slot is honored instead of always falling back to the default icon ([#898](https://github.com/antdv-next/antdv-next/pull/898)); the close animation plays with a custom `prefixCls` ([#899](https://github.com/antdv-next/antdv-next/pull/899)) * fix(breadcrumb): emit `clickItem` when an item is clicked ([#928](https://github.com/antdv-next/antdv-next/pull/928)); a menu item's `label` takes priority over `title` ([#929](https://github.com/antdv-next/antdv-next/pull/929)) * fix(input): no border flash when switching away from the borderless variant at runtime ([#862](https://github.com/antdv-next/antdv-next/pull/862), #59269); restore the Input.Password visibility-toggle icon styles ([#938](https://github.com/antdv-next/antdv-next/pull/938), #57271) * fix(input-number): align `allowClear` behavior and clear-icon styles with Input, support ConfigProvider config, and fix the layout with controls, suffix and spinner mode ([#876](https://github.com/antdv-next/antdv-next/pull/876), #59251) * fix(date-picker, time-picker): the `#prefix` slot now renders; complete RangePicker slot types and export `TimeRangePickerSlots`, and warn on the deprecated `addon` slot as well ([#863](https://github.com/antdv-next/antdv-next/pull/863)) * fix(upload): `customRequest` and `defaultRequest` types allow returning an `{ abort }` handle (#59382); file names are no longer focusable buttons when no preview handler is registered ([#924](https://github.com/antdv-next/antdv-next/pull/924), #59295); `Upload.Dragger` keeps the height from `style` when `height` is unset and applies a numeric `height` in pixels ([#923](https://github.com/antdv-next/antdv-next/pull/923), #59319) * fix(transfer): with search enabled, Shift selection only applies to filtered items ([#947](https://github.com/antdv-next/antdv-next/pull/947), #59348); clear stale selections when `dataSource` keys change type ([#886](https://github.com/antdv-next/antdv-next/pull/886), #59166); the `footer` callback and slot always receive `{ direction }` ([#922](https://github.com/antdv-next/antdv-next/pull/922), #59303) * fix(tree): DirectoryTree Shift range selection skips `disabled` and `selectable: false` nodes (#59341) * fix(typography): when editable with a `triggerType` that includes `'text'`, clicking the text starts editing and still emits `click` (#59325) * fix(checkbox, radio): CheckboxGroup no longer includes removed options' values in `change` / `update:value`, and keeps registration in sync when `value` or `skipGroup` changes ([#894](https://github.com/antdv-next/antdv-next/pull/894)); Checkbox and Radio `id` and `name` now reach the native `` and `blur` is emitted, so Form `validateTrigger: 'blur'` works (via `@v-c/checkbox` 1.0.2) * fix: Result, Message, Notification, Avatar and Modal keep a numeric `0` as custom content instead of falling back to the built-in icon ([#917](https://github.com/antdv-next/antdv-next/pull/917), #59153); Form.Item `extra` ([#920](https://github.com/antdv-next/antdv-next/pull/920), #59289) and Descriptions `title` / `extra` ([#919](https://github.com/antdv-next/antdv-next/pull/919), #59125) render when they are `0` * fix: string or array `style` values no longer fail or throw in Avatar, Modal, Tree, Transfer and Typography ([#943](https://github.com/antdv-next/antdv-next/pull/943)); FloatButton, Listy and Tour widen their `style` type to `StyleValue` ([#955](https://github.com/antdv-next/antdv-next/pull/955)) * fix(rate, carousel, collapse): Rate `size` ([#902](https://github.com/antdv-next/antdv-next/pull/902)), Carousel `effect` ([#942](https://github.com/antdv-next/antdv-next/pull/942)) and the Collapse panel `content` ([#959](https://github.com/antdv-next/antdv-next/pull/959)) no longer leak into DOM attributes; Rate `direction` and Carousel `verticalSwiping` are removed from the types, since they always come from ConfigProvider and `vertical` respectively (#59379, #59366) * fix(color-picker): stop mutating user-provided presets while rendering ([#857](https://github.com/antdv-next/antdv-next/pull/857), #59272); when `disabled`, the clear button is no longer clickable, focusable or hover-highlighted ([#886](https://github.com/antdv-next/antdv-next/pull/886), #59164) * fix(notification): `list` / `listContent` semantic classes and styles configured via `useNotification` and ConfigProvider are now applied ([#936](https://github.com/antdv-next/antdv-next/pull/936)) * fix(button): `variant="solid"` renders solid primary again instead of falling back to outlined ([#934](https://github.com/antdv-next/antdv-next/pull/934)) * fix(tabs): Tabs inherits ConfigProvider `direction`, fixing RTL layout inside `App` ([#884](https://github.com/antdv-next/antdv-next/pull/884)) * fix(tour): button callbacks receive the click event ([#949](https://github.com/antdv-next/antdv-next/pull/949), #59332) * fix(anchor): fix external-link navigation, per-link `targetOffset` highlighting, and competing scroll animations on repeated clicks ([#900](https://github.com/antdv-next/antdv-next/pull/900)) * fix(auto-complete): `focus()`, `blur()` and `scrollTo()` are available via ref ([#905](https://github.com/antdv-next/antdv-next/pull/905)) * fix(splitter): panel sizes respect `min` / `max` again after the container is resized ([#886](https://github.com/antdv-next/antdv-next/pull/886), #59084) * fix(skeleton): numeric element sizes are applied in pixels ([#865](https://github.com/antdv-next/antdv-next/pull/865)) * fix(statistic): format correctly when `precision` is `NaN`, and do not throw on a non-function `valueRender` ([#933](https://github.com/antdv-next/antdv-next/pull/933)) * fix(affix): fix the always-`false` style comparison in `lazyUpdatePosition` so scroll frames skip redundant measurement ([#896](https://github.com/antdv-next/antdv-next/pull/896)) * fix(theme): `fontHeight`, `fontHeightSM` and `fontHeightLG` follow custom `fontSize` / `lineHeight` tokens ([#918](https://github.com/antdv-next/antdv-next/pull/918), #59298) * fix(tooltip): narrow the `motion` type to the supported `{ name?: string }` ([#926](https://github.com/antdv-next/antdv-next/pull/926), #59288) * fix(drawer): using the deprecated `destroyOnClose` now warns and points to `destroyOnHidden` ([#921](https://github.com/antdv-next/antdv-next/pull/921), #59299); correct misdirected deprecation warnings and annotations in Drawer, Cascader, Select, TreeSelect, Button and Slider ([#935](https://github.com/antdv-next/antdv-next/pull/935)); remove leftover upstream version numbers and React references from warnings and comments ([#944](https://github.com/antdv-next/antdv-next/pull/944)) * fix(float-button, mentions): mark `BackTopProps` and Mentions `OptionProps` as deprecated and add a `FloatButtonBackTopProps` alias ([#886](https://github.com/antdv-next/antdv-next/pull/886), #58949) * fix(locale): fill in missing DatePicker placeholders and Carousel accessibility labels for multiple locales ([#950](https://github.com/antdv-next/antdv-next/pull/950), #59351) * fix(cssinjs): with CSP enabled, component CSS variable style tags now carry the `nonce` too (ant-design/cssinjs-util#38) **📖 Documentation** * docs: zh-CN and en-US docs now share the same heading structure and anchors; zh-CN headings declare the same ids as their en-US counterparts, and search-index anchors match the rendered pages ([#957](https://github.com/antdv-next/antdv-next/pull/957)) * docs: normalize semantic class terminology and Semantic DOM headings ([#874](https://github.com/antdv-next/antdv-next/pull/874), [#872](https://github.com/antdv-next/antdv-next/pull/872)); normalize component version markers and remove leftover upstream version references ([#877](https://github.com/antdv-next/antdv-next/pull/877), [#895](https://github.com/antdv-next/antdv-next/pull/895)); fix semantic preview highlights, borders, placeholders, clear buttons and popup coverage ([#914](https://github.com/antdv-next/antdv-next/pull/914), [#871](https://github.com/antdv-next/antdv-next/pull/871), [#870](https://github.com/antdv-next/antdv-next/pull/870), [#869](https://github.com/antdv-next/antdv-next/pull/869), [#904](https://github.com/antdv-next/antdv-next/pull/904), [#856](https://github.com/antdv-next/antdv-next/pull/856), [#867](https://github.com/antdv-next/antdv-next/pull/867)); complete the Mentions API docs and popup semantic preview ([#910](https://github.com/antdv-next/antdv-next/pull/910)); document how Tooltip realigns after layout changes ([#925](https://github.com/antdv-next/antdv-next/pull/925), #59304) * docs: the Button loading demo shows an end icon ([#873](https://github.com/antdv-next/antdv-next/pull/873)), the icon demo shows both the `icon` prop and the `#icon` slot ([#930](https://github.com/antdv-next/antdv-next/pull/930)), and the danger demo is reworded ([#890](https://github.com/antdv-next/antdv-next/pull/890)); each group in the Checkbox group demo switches independently ([#887](https://github.com/antdv-next/antdv-next/pull/887)); QRCode demos use the project logo ([#878](https://github.com/antdv-next/antdv-next/pull/878)); Table notes that resizable columns need numeric widths * docs: correct the Divider `plain` default ([#861](https://github.com/antdv-next/antdv-next/pull/861)) and the Masonry en-US frontmatter that broke the search-index build ([#891](https://github.com/antdv-next/antdv-next/pull/891)); the components overview shows Not Found when a search has no results ([#868](https://github.com/antdv-next/antdv-next/pull/868)) and the zh-CN overview gets its border beam effect back ([#866](https://github.com/antdv-next/antdv-next/pull/866)); extract document heading metadata ([#864](https://github.com/antdv-next/antdv-next/pull/864)); wrap the demo container in ThemeProvider to silence an injection warning ([#882](https://github.com/antdv-next/antdv-next/pull/882)) **🧰 Infrastructure & Dependencies** * chore(sync): advance ant-design upstream tracking to master `2a04506177` after **6.6.5**, porting the fixes from 6.6.4, 6.6.5 and later that apply to the Vue implementation; start tracking `ant-design/cssinjs-util`, synced to v2.1.2 * chore(deps): release `@antdv-next/cssinjs` 1.0.7 with the `extraCssVarPrefixCls` and CSP `nonce` changes above * chore(deps): upgrade `@v-c/*`, including `@v-c/tabs` 1.4.2 (`scrollPosition`), `@v-c/table` 1.3.3 (column resizing), `@v-c/checkbox` 1.0.2, `@v-c/slider` 1.1.4 (pushable fixes), `@v-c/virtual-list` 1.1.2 (Tree virtual scroll no longer keeps auto-scrolling after a drag ends), `@v-c/mentions` 1.2.3 (default filtering restored when `filterOption` is not passed), `@v-c/trigger` 1.1.4 (popups realign when their target moves), `@v-c/mutate-observer` 1.0.3 and `@v-c/util` 1.3.0 ([#916](https://github.com/antdv-next/antdv-next/pull/916), [#932](https://github.com/antdv-next/antdv-next/pull/932)) * chore(build): upgrade `vite-plugin-tsx-resolve-types` to 1.1.2 and enable `ignoreTypes` so event-handler types are no longer resolved into runtime props; upgrade UnoCSS to 66.10.5 ([#956](https://github.com/antdv-next/antdv-next/pull/956)) * ci: the size report compares only the final `antd.js` / `antd.esm.js` bundles and runs on every PR ([#860](https://github.com/antdv-next/antdv-next/pull/860)); whitelist PR title types for the semantic check ([#931](https://github.com/antdv-next/antdv-next/pull/931)) * test: adapt the cssinjs hydration test to Vitest 5; remove the Calendar lunar test that asserted on demo source text ([#903](https://github.com/antdv-next/antdv-next/pull/903)) ## V1.5.4 Release Date: 2026-09-10 This release advances ant-design upstream tracking to **6.6.3** (`5d20a26a2b`). InputNumber gains `allowClear` and a fix for `defaultValue` never taking effect; size naming is unified to `medium` (`middle` keeps working); the `@v-c/*` foundation packages are upgraded across the board with Dropdown migrating internally to the `open` / `onOpenChange` API. It also ports a batch of upstream fixes: Modal cancel-button callbacks, mask config being mutated, Segmented selected-text color lag, uncontrolled DirectoryTree expansion, numeric `0` content mistaken for empty, plus locale and accessibility gaps. The test infrastructure moves to Vitest 5. **✨ Features** * feat(input-number): add `allowClear` (accepts a `{ clearIcon, disabled, label }` object), a `clearIcon` slot, a `clear` event and a `clear` semantic class / style, with clear-button styles; also fix `defaultValue` never being passed to the underlying component so the initial value was not shown * feat: unify component size naming on `medium` and update every `middle` usage in docs and demos; Card `size="default"` is deprecated in favor of `medium` ([#810](https://github.com/antdv-next/antdv-next/pull/810)) * feat(slider): support `ariaDescribedByForHandle` to link `aria-describedby` on slider handles * feat(docs): add a `/design.md` page and static file as the single source of design guidance for AI agents **🐞 Fixes** * fix(modal): keep calling `onCancel` when `cancelButtonProps.onClick` is provided; both handlers now run (#59255) * fix(modal, drawer): stop writing `closable` back into a user-provided `mask` object, so dialogs sharing one config object no longer affect each other ([#826](https://github.com/antdv-next/antdv-next/pull/826), #59233) * fix(form): prevent `Form.Item` controls from shrinking in vertical layout (#59263) * fix(table): vertically center cell content in virtual tables (#59260); support empty-string values in tree filters ([#809](https://github.com/antdv-next/antdv-next/pull/809), #59141) * fix(tabs): apply `styles.popup.root` to the "more" dropdown (#59221) * fix(segmented): switch the selected item's text color in sync with the thumb motion instead of lagging behind (#59046, via `@v-c/segmented` 1.0.5) * fix(descriptions): preserve item state after reordering when an item's `key` is `0` (#59064) * fix(tree): DirectoryTree syncs its internal expanded state when `expandedKeys` is not provided, so Shift range selection no longer uses stale state (#59076) * fix(watermark): skip drawing when the clip size is `0` to avoid zero-sized canvas errors (#59077) * fix(menu): the horizontal item underline no longer intercepts the pointer, so moving along the bottom edge into a submenu does not close it (#59088) * fix(drawer): render the header when only `extra` is provided, and treat `0` as a valid `title` / `extra` (#59089) * fix(alert, empty, statistic): render titles, descriptions, actions, prefixes and suffixes whose content is the number `0` (#59094, #59101) * fix(skeleton, steps): hide the Skeleton image placeholder SVG from assistive technology; mark the Steps progress icon as a `progressbar` ([#851](https://github.com/antdv-next/antdv-next/pull/851), [#819](https://github.com/antdv-next/antdv-next/pull/819), #59107, #59073) * fix(config-provider): nested and isolated theme configs inherit `zeroRuntime` ([#844](https://github.com/antdv-next/antdv-next/pull/844), #59250) * fix(input): Search keeps custom `enterButton` `onMousedown` / `onClick` handlers and no longer fires them twice ([#832](https://github.com/antdv-next/antdv-next/pull/832), #59180); Password respects a controlled `visibilityToggle.visible` ([#808](https://github.com/antdv-next/antdv-next/pull/808), #59168); Password and Tag ignore key-repeat activations ([#802](https://github.com/antdv-next/antdv-next/pull/802), [#803](https://github.com/antdv-next/antdv-next/pull/803), #59135, #59134) * fix(tag): CheckableTag.Group clears the selection when the controlled `value` is `null` * fix(float-button): add an invisible hover bridge between the trigger and the popup so hover-triggered menus no longer flicker while the pointer moves ([#836](https://github.com/antdv-next/antdv-next/pull/836)) * fix(breadcrumb): stop mutating the user-provided `menu` config object ([#842](https://github.com/antdv-next/antdv-next/pull/842)) * fix(anchor): align the `click` event signature and parameter names to `(e, link: { title, href })` ([#843](https://github.com/antdv-next/antdv-next/pull/843)) * fix(radio): semantic `classes` / `styles` callbacks receive the correct `checked` and `disabled` state ([#815](https://github.com/antdv-next/antdv-next/pull/815)) * fix(dropdown, select, cascader, tree-select, auto-complete): `popupRender` may return strings, arrays and other non-element nodes; the type is widened to any `VueNode` ([#817](https://github.com/antdv-next/antdv-next/pull/817), #59207) * fix(date-picker, locale): use `DD.MM.YYYY` field formats for German ([#831](https://github.com/antdv-next/antdv-next/pull/831), #59151); fill in year / quarter / month / week placeholders for 32 locales ([#822](https://github.com/antdv-next/antdv-next/pull/822), #59219); add localized Carousel prev / next labels to 45 locales ([#823](https://github.com/antdv-next/antdv-next/pull/823), #59218); correct Traditional Chinese picker and gradient terms (#59129) **📖 Documentation** * docs: align zh-CN and en-US structure and API tables across all components, fix parity issues on Cascader, Collapse, Icon, Input and Layout, and repair broken heading anchors ([#853](https://github.com/antdv-next/antdv-next/pull/853), [#850](https://github.com/antdv-next/antdv-next/pull/850), [#846](https://github.com/antdv-next/antdv-next/pull/846), [#852](https://github.com/antdv-next/antdv-next/pull/852), [#821](https://github.com/antdv-next/antdv-next/pull/821)) * docs: unify `openChange` parameter names ([#827](https://github.com/antdv-next/antdv-next/pull/827), #59236); document the `listy` ConfigProvider config ([#812](https://github.com/antdv-next/antdv-next/pull/812), #59202); add es_US and sq_AL to the i18n docs ([#816](https://github.com/antdv-next/antdv-next/pull/816)); correct the Table filter icon default ([#818](https://github.com/antdv-next/antdv-next/pull/818)), Grid / Splitter API metadata ([#828](https://github.com/antdv-next/antdv-next/pull/828)), the Breadcrumb `itemRender` slot signature ([#841](https://github.com/antdv-next/antdv-next/pull/841)), Rate `defaultValue` ([#837](https://github.com/antdv-next/antdv-next/pull/837)), Badge `count` ([#820](https://github.com/antdv-next/antdv-next/pull/820)), the Alert page ([#830](https://github.com/antdv-next/antdv-next/pull/830)) and Statistic milliseconds wording (#59102) * docs: add FAQ entries on SVG icon alignment and Vue renderable-content behavior ([#829](https://github.com/antdv-next/antdv-next/pull/829), [#807](https://github.com/antdv-next/antdv-next/pull/807)); align the getting-started guides ([#825](https://github.com/antdv-next/antdv-next/pull/825)); categorize brand icon variants correctly on the Icons page ([#811](https://github.com/antdv-next/antdv-next/pull/811)) * docs(site): move to the shared `@antdv-next/docs-plugins` package and CodeDemo component ([#797](https://github.com/antdv-next/antdv-next/pull/797), [#824](https://github.com/antdv-next/antdv-next/pull/824)); stop sponsor popovers when payment buttons are disabled, fix the pro-components link and awesome page ([#848](https://github.com/antdv-next/antdv-next/pull/848), [#847](https://github.com/antdv-next/antdv-next/pull/847)); add a 404 catch-all route **🧰 Infrastructure & Dependencies** * chore(sync): advance ant-design upstream tracking to **6.6.3** at `5d20a26a2b`, porting the fixes applicable to the Vue implementation in this release * chore(deps): upgrade the foundation packages, including `@v-c/util` 1.2.0, `@v-c/dropdown` 1.1.0, `@v-c/picker` 1.4.0, `@v-c/input-number` 1.1.0, `@v-c/upload` 1.1.0, `@v-c/listy` 1.1.0, `@v-c/menu` 1.4.0, `@v-c/table` 1.3.0, `@v-c/tabs` 1.3.1, `@v-c/tree` 1.2.2, `@v-c/notification` 2.0.4 and `@v-c/select` 1.2.6; Dropdown now uses `open` / `onOpenChange` and DatePicker passes `suffix` internally, with no public API change * chore(test): move the test toolchain to Vitest 5.0.0 (with `@vitest/ui` and `@vitest/coverage-v8`), Vite 8.3 and `@vue/test-utils` 2.5 * ci: add a package size report workflow with fork PR support and exclude locale bundles from the size check ([#801](https://github.com/antdv-next/antdv-next/pull/801), [#838](https://github.com/antdv-next/antdv-next/pull/838), [#855](https://github.com/antdv-next/antdv-next/pull/855)) ## V1.5.3 Release Date: 2026-08-29 This release advances ant-design upstream tracking to **6.6.2** (`621b63dff5`) and brings in a focused round of stability, typing and accessibility fixes. Component work covers numeric `0` content being mistaken for empty, stale responsive Grid alignment classes, Checkbox disabled-state precedence, Select / AutoComplete popup event forwarding, GIF preview resource cleanup in Upload, Menu collapse transitions and RTL navigation in Image. The documentation site also gains CLI, MCP and AI-agent integration guides and now generates contributor data during the build. **🐞 Fixes** * fix: render numeric `0` correctly in Breadcrumb separators, Card titles/extras/covers and Meta, FloatButton content, Segmented labels and Tag content; Form labels no longer treat `0` as empty either ([#789](https://github.com/antdv-next/antdv-next/pull/789), [#784](https://github.com/antdv-next/antdv-next/pull/784), #59117, #59079) * fix(grid): remove stale alignment classes when responsive `align` / `justify` moves to an unmatched breakpoint or is cleared, instead of retaining an outdated layout state ([#781](https://github.com/antdv-next/antdv-next/pull/781), #59066) * fix(checkbox): resolve `disabled` from Checkbox itself before Checkbox.Group and then the ConfigProvider global context, allowing local settings to override their parent correctly ([#788](https://github.com/antdv-next/antdv-next/pull/788), #59109) * fix(table): preserve custom `keydown` handlers supplied through `onHeaderCell` on sortable headers while retaining built-in keyboard sorting ([#783](https://github.com/antdv-next/antdv-next/pull/783), #59078) * fix(transfer): disable select-all when every visible search result is disabled, avoiding an actionable-looking control that cannot select anything ([#790](https://github.com/antdv-next/antdv-next/pull/790), #59121) * fix(upload): release the temporary canvas after generating a GIF thumbnail so repeated previews do not accumulate unused canvas resources ([#791](https://github.com/antdv-next/antdv-next/pull/791), #59137) * fix(select, auto-complete): stop exposing or forwarding the internal `onPopupVisibleChange` callback through DOM attrs; AutoComplete now emits `openChange` or the compatible `dropdownVisibleChange` according to the listener actually provided ([#792](https://github.com/antdv-next/antdv-next/pull/792), #59142) * fix(tag): give CheckableTag.Group's component-level `classes` / `styles` priority over inherited ConfigProvider semantic config, so local customization is not overwritten globally ([#785](https://github.com/antdv-next/antdv-next/pull/785), #59087) * fix(dropdown, menu): when a hover-triggered Dropdown contains a SubMenu, its root popup now closes normally after the pointer leaves the submenu popup directly for empty page space; also scope the inline-collapse padding-transition override to root menu items so other Menu modes retain their existing animation ([#793](https://github.com/antdv-next/antdv-next/issues/793), [#795](https://github.com/antdv-next/antdv-next/pull/795), #59085) * fix(image): pass direction-aware icons into PreviewGroup's merged config so RTL navigation uses a right arrow for previous and a left arrow for next ([#796](https://github.com/antdv-next/antdv-next/pull/796), #59145) * fix(steps): mark Steps panel arrows as decorative and hide them from assistive technology, preventing meaningless screen-reader announcements ([#787](https://github.com/antdv-next/antdv-next/pull/787), #59105) * fix(alert): narrow ConfigProvider's global Alert `closable` option to the type actually supported at runtime, removing properties that were declared but ineffective ([#786](https://github.com/antdv-next/antdv-next/pull/786), #59100) **📖 Documentation** * docs: add bilingual guides for the CLI, MCP integration and using the component library with AI agents, together with the corresponding documentation navigation * docs(site): generate static contributor JSON from the GitHub API during the documentation build for a more accurate and stable contributor list ([#779](https://github.com/antdv-next/antdv-next/pull/779)) * fix(docs): repair the broken interaction in the Listy drag-sorting demo and add regression coverage ([#770](https://github.com/antdv-next/antdv-next/pull/770)) * docs: remove nonexistent `update:open` event entries from the FloatButton, Modal and Tooltip documentation **🧰 Infrastructure & Dependencies** * chore(sync): advance ant-design upstream tracking to **6.6.2** at `621b63dff5`, porting the fixes applicable to the Vue implementation in this release * chore(deps): upgrade `@v-c/menu` to 1.3.1 and `@v-c/trigger` to 1.1.1 to fix hover-triggered menu collapse behavior * test(transfer): add regression coverage ensuring pagination remains on a valid page after the result set becomes empty ([#782](https://github.com/antdv-next/antdv-next/pull/782), #59074) ## V1.5.2 Release Date: 2026-08-21 This release advances the ant-design upstream sync through **6.6.1** and onward to `e216c46b1e`. It focuses on stability and accessibility: Form fixes rapid-validation layout shifts, vertical-layout offsets and conditional children being remounted; Table, Transfer, Anchor and Radio correct duplicate callbacks or interaction semantics; and Carousel, Modal, Notification and Upload gain localized accessible labels. Published packages now also include design-token metadata for direct consumption by theming tools. **✨ Features** * feat(build): ship `token.json` and `token-meta.json` under `dist/version`, with `antdv-next/version/token.json` and `antdv-next/version/token-meta.json` export paths for theme editors and design tools * feat(carousel): localize the default previous/next arrow `aria-label` values through ConfigProvider locale instead of hard-coding English `prev` / `next` (#59014) **🐞 Fixes** * fix(form): retain the compensated bottom margin while validation errors switch rapidly, preventing form height fluctuation (#59008); preserve Form's `labelCol.offset` in vertical layout (#58981) * fix(form): keep the FormItem child array shape stable so conditionally rendering a sibling no longer remounts form controls or loses their input and internal state ([#764](https://github.com/antdv-next/antdv-next/pull/764)) * fix(form, locale): correct placeholders in the number, string and array `min` validation messages (#58965) * fix(table): avoid duplicate callbacks when a filter menu closes; preserve caller-controlled close and confirm semantics for custom `filterDropdown`; restore first-row radii when the header is hidden (#59023, #57035) * fix(transfer): honor component-level `locale.remove` for one-way removal buttons; emit `onSearch` only once when clearing the search input (#58955, #59016) * fix(upload): preserve files added while an asynchronous removal is pending; use localized `title` and `aria-label` values for preview, download and remove actions ([#724](https://github.com/antdv-next/antdv-next/pull/724), #58953) * fix(radio): fire an option's own `onChange` before the group-level `change` when Radio.Group renders from `options` ([#716](https://github.com/antdv-next/antdv-next/pull/716)) * fix(anchor): avoid duplicate `change` emissions when `getCurrentAnchor` is provided while retaining reactive tracking inside the function (#58834) * fix(menu): prevent Tooltip flashes when an inline menu collapses while hovered, remove icon jitter during collapse, and resolve the conflicting `SubMenuProps.title` type (#58865, #59018, [#759](https://github.com/antdv-next/antdv-next/pull/759)) * fix(color-picker): keep color selection draggable after clearing; apply trigger description text styling from `styles.description` instead of mistakenly reading `classes.description` (#58995) * fix(float-button): keep the BackTop scroll-progress ring visible whenever the button is shown (#58982) * fix(notification, modal): localize close-button names and pass the global locale to the static Notification API; restore the default `24px` bottom offset instead of mistakenly using the `4.5`-second default duration ([#756](https://github.com/antdv-next/antdv-next/pull/756), #58957) * fix(collapse, date-picker): hide decorative collapse arrows and range separators from screen readers to prevent duplicate announcements ([#741](https://github.com/antdv-next/antdv-next/pull/741), [#740](https://github.com/antdv-next/antdv-next/pull/740)) * fix(tree): handle a node key of `0` correctly in DirectoryTree range selection ([#757](https://github.com/antdv-next/antdv-next/pull/757)) * fix(select): keep customized inputs aligned while hovering the clear button ([#727](https://github.com/antdv-next/antdv-next/pull/727)) **💄 Styles** * fix(listy): improve virtual scrollbar track hover feedback (#58964) **📖 Documentation** * docs(listy): add a drag-sorting demo; add a Select multiple-fields search demo ([#768](https://github.com/antdv-next/antdv-next/pull/768)) * fix(docs): prevent demo edits from being reverted after lazy HTTP loading and isolate each demo's TypeScript / JavaScript toggle state ([#765](https://github.com/antdv-next/antdv-next/pull/765), [#766](https://github.com/antdv-next/antdv-next/pull/766)) * docs: sync upstream API tables and heading anchors, clarify Form label association, Alert accessibility and the Transfer locale default, and add a Qixi festival easter-egg page **🧰 Infrastructure & Dependencies** * chore(sync): sync ant-design **6.6.1** and subsequent changes through `e216c46b1e` * chore(deps): upgrade `@v-c/select` to 1.2.4 and `@v-c/pagination` to 1.1.1 * build: generate the docs site's `antd.css` at build time instead of committing the generated asset; update tsdown external-dependency configuration for the newer API ## V1.5.1 Release Date: 2026-08-14 This release advances the ant-design upstream sync to **6.6.0** (`a5bbbf962d`, [#703](https://github.com/antdv-next/antdv-next/pull/703), [#710](https://github.com/antdv-next/antdv-next/pull/710)). Two main threads: the full 6.6.0 sync — `nativeElement` refs across ~20 components, Tree `scrollTo` auto-expand, Table expandable `forceRender`, a BackTop scroll-progress ring, global tooltip delays and input variant config via ConfigProvider — and a focused round of **Form fixes and enhancements**: rule resolution and duplicate-validation fixes, aria attributes, and render-function validation messages — `message` now accepts a render function, so displayed errors update reactively on locale switch without re-validating. **✨ Features** * feat: expose `nativeElement` refs on ~20 components — Avatar.Group, Badge.Ribbon, Breadcrumb, Calendar, Card.Grid, Card.Meta, Carousel, Descriptions, Divider, Empty, FloatButton.Group, QRCode, Result, Skeleton, Space.Compact, Spin, Splitter, Transfer and Watermark — with the ref types exported from the entry (#58627~#58667) * feat(form): rule `message` accepts a render function `() => VueNode`; it is kept as-is through validation and only invoked while rendering the error, so any reactive state it reads (locale, i18n, ...) updates the displayed message without re-running validators; works with form-level and computed `rules` as well ([#714](https://github.com/antdv-next/antdv-next/pull/714)) * feat(tree): `scrollTo` supports `autoExpand`, add `Tree.useTree` and export `TreeInstance` / `UseTreeConfig` (#58841) * feat(table): support `forceRender` for expandable rows (#58860) * feat(float-button): BackTop gains `showProgress`, rendering scroll progress as a ring (#58894) * feat(pagination): add `components.sizeChanger` to customize the size changer (#58831) * feat(mentions): support `popupRender` to customize the dropdown (#58582) * feat(input): ConfigProvider variant config supports the `inputSearch` / `inputPassword` / `otp` subcomponents, each resolving its own config first (#58784) * feat(tooltip, popover, popconfirm): `mouseEnterDelay` / `mouseLeaveDelay` configurable globally via ConfigProvider (#58892) * feat(theme): add the `focusOutline` seed token for shared focus styles, honored by Input, Select, Rate, Splitter and Steps; Alert gains a `borderRadius` component token (#58647, #58708, #57765) * feat(image): preview supports `wheel` to control mouse-wheel zoom (`@v-c/image@1.1.0`, #58728) * feat(border-beam): add `count` to configure the number of beams, evenly distributed (#58691) * feat(locale): add Albanian `sq_AL`; refine Traditional Chinese terminology and use Taiwan week wording in DatePicker (#58618, #58947, #58951) **🐞 Fixes** * fix(form): rules combining `required` and `type` no longer run type validation twice; FormItem `required` no longer derives a validation rule and only drives the required mark, aligning with antd * fix(form): function rules resolve with the form instance as argument and are re-resolved on every validation, so they can read the latest external state * fix(form): form controls now carry `aria-required` and link help and error text via `aria-describedby` * fix(table): an explicitly placed `Table.EXPAND_COLUMN` no longer loses its identity through `ref()` / `reactive()` proxies, removing the phantom empty column (`@v-c/table@1.2.0`) * fix(tree-select): preserve the selection state of disabled child nodes (`@v-c/tree-select@1.1.2`) * fix(select): the clear icon is reachable by keyboard (`@v-c/select@1.2.1`) * fix(virtual-list): `scrollTo({ key })` resolves against the latest data and retries after a data update (`@v-c/virtual-list@1.1.1`) * fix(carousel): keep the current slide when children are added instead of resetting to the first (#58845) * fix(drawer): support a disabled close button (#58853) * fix: correct semantic style priority — ConfigProvider's root `style` now sits between context styles and component styles across 20+ components including Badge, Calendar, ColorPicker, DatePicker, Drawer, Dropdown and Modal; also fixes Divider spreading the whole semantic styles object onto its root, Masonry dropping component-level `styles.root`, and the message Holder merge order (#58550, #58564) * fix(config-provider): the `inputSearch` component config previously never reached the context and was silently dead; it now applies * fix(typography): restore the interactive ellipsis tooltip — hovering the popup no longer dismisses it (#58661, #58722) * fix(button): align loading icon styles, dropping the redundant centering and block declarations (#58712) * fix(types): export the missing `UploadRef`, `StatisticRef` and `SliderRef` types (#58700, #58798) * fix(site): harden mainland China detection for the docs site switch **💄 Styles** * fix(select, table, tree): virtual scrollbars gain `cursor: pointer` and hover feedback (#58658, #58679) **📖 Documentation** * docs: add the design system documentation ([#707](https://github.com/antdv-next/antdv-next/pull/707)) and refresh the getting-started guide * feat(docs): support multi-file demo tabs in the code panel * docs: add demos for Avatar `overflowInFinal`, reactive Form validation messages and Tabs `more.popupRender`; document the Image preview `wheel` prop **🧰 Dependencies** * chore(sync): sync ant-design **6.6.0** upstream changes ([#703](https://github.com/antdv-next/antdv-next/pull/703), [#710](https://github.com/antdv-next/antdv-next/pull/710)) * chore(deps): upgrade `@v-c/virtual-list@1.1.1`, `@v-c/tree@1.2.0`, `@v-c/select@1.2.1`, `@v-c/tree-select@1.1.2`, `@v-c/table@1.2.0`, `@v-c/image@1.1.0` * refactor: Button's delayed loading, Slider's tooltip toggle, Upload's progress reveal and Typography's copy feedback all move onto the shared `useDelayState` (#58690) ## V1.5.0 Release Date: 2026-08-07 This release advances the ant-design upstream sync to **6.5.4** (`5ade9944d6`) and introduces the experimental **Listy** virtual-list component. Listy targets long and grouped lists with virtual scrolling, sticky group headers, semantic styling and imperative scrolling, while BorderBeam gains controls for animation duration, beam width and beam size. It also fixes Layout Sider custom triggers, controlled Segmented values, invalid Checkbox options, reduced-motion behavior in BackTop and more. **✨ Features** * feat(listy): add the experimental Listy component with standard and virtual lists, grouped data and sticky headers, infinite-loading scenarios, semantic `classes` / `styles`, and a `scrollTo` API for scrolling to a position, item or group ([#670](https://github.com/antdv-next/antdv-next/pull/670)) * feat(border-beam): add `duration`, `lineWidth` and `size` to control animation duration, beam width and beam size respectively; add demos for these options and custom containers **🐞 Fixes** * fix(layout): support both a `trigger` prop and slot on Layout Sider; restore the default trigger when neither is supplied, and allow an explicit `null` to hide it * fix(segmented): in controlled mode, keep the selected item on the controlled value when the consumer does not update `value` after `change`, instead of incorrectly switching to the clicked item; upgrade the primitive to `@v-c/segmented@1.0.4` * fix(alert): an object-valued `closable` now enables closing even when it does not provide `closeIcon` * fix(checkbox): Checkbox Group ignores `null` / `undefined` options and options without a valid `value`, avoiding invalid checkbox items * fix(float-button): BackTop jumps to the top without animation when the user enables `prefers-reduced-motion`; the shared `scrollTo` utility now also supports zero-duration scrolling and cancellation of unfinished animations * fix(app): with CSS variables and `component={false}`, only warn when root classes or styles would actually be dropped (#58876) * fix(border-beam): fall back to default border information when `getComputedStyle` throws on the host element, preventing BorderBeam from breaking the component tree * fix(types): correct the DatePicker semantic return value and Tour `actionsRender` declarations to match the actual component-level APIs **📖 Documentation** * docs(listy): add Chinese and English component docs with demos for basic usage, virtual scrolling, grouping, imperative scrolling, rich content, infinite loading and semantic styling * perf(docs): load component demo source only when the code panel is expanded, so the browser no longer parses every demo's source and highlighted output during page initialization; development HMR remains supported and loaded source is reused across collapse and re-expand **🧰 Dependencies** * chore(sync): sync upstream changes from ant-design **6.5.4** * chore(deps): add `@v-c/listy@1.0.2` and upgrade `@v-c/picker` to 1.3.2 ([#684](https://github.com/antdv-next/antdv-next/pull/684)), `@v-c/segmented` to 1.0.4 and `@v-c/table` to 1.1.9 ## V1.4.6 Release Date: 2026-08-03 This release advances the ant-design sync from **6.5.1** all the way past **6.5.3** (`49c4a03cc9`) and upgrades all twelve `@v-c/*` primitives ([#668](https://github.com/antdv-next/antdv-next/pull/668), [#678](https://github.com/antdv-next/antdv-next/pull/678), [#681](https://github.com/antdv-next/antdv-next/pull/681)). Two threads are worth calling out. The first is the **RangePicker interaction refactor**: upstream fixed "an unconfirmed range must not be submitted on blur" inside `@rc-component/picker`, so we rewrote the whole interaction state machine in `@v-c/picker@1.3.0`, which lands here with the dependency bump. The second is the chain of adjustments that followed **turning the clear affordance from a `` into a `