Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. U...
设计与多媒体
Slidev Antd Dashboard
试用Build dashboard and admin-UI slides in Slidev using ant-design-vue (the Vue 3 implementation of Ant Design). Use when creating Slidev presentations that need dashboards
它能做什么
Build dashboard and admin-UI slides in Slidev using ant-design-vue (the Vue 3 implementation of Ant Design). Use when creating Slidev presentations that need dashboards, admin layouts, side menus, data tables, KPI/stat cards, charts, forms, or any Ant Design components. Covers full setup, every ant-design-vue component, composition rules, menu/navigation design specs, and ready-to-paste example slides.
技能文档
Slidev + Ant Design Dashboards
Build polished dashboard / admin-console mockups inside Slidev slides using ant-design-vue.
Read this first (critical context)
- Slidev is Vue 3. Use
ant-design-vue, NOT Reactantd. The canonicalantdpackage is React-only and cannot be dropped into Slidev.ant-design-vueis the official Ant Design implementation for Vue 3 — same design language, same component set, near-identical API. Every example here uses it. - Globally-registered components use the
a-prefix. Afterapp.use(Antd), you write,,,,, etc. — not. - ant-design-vue v4 uses CSS-in-JS. Component styles auto-inject; you do not need (and should avoid) globally importing
ant-design-vue/dist/reset.css, because its global preflight overrides Slidev's slide typography. Theme via `` instead. - Ant Design ships no charts. Use ECharts (
vue-echarts) — see setup.md.@ant-design/chartsis React-only; do not suggest it for Slidev. - A slide is a fixed canvas (default 980×552 px). Real dashboards are designed for ~1440 px. Render at desktop density and let Slidev scale the slide down — set
canvasWidthhigher and/or usecomponentSize. See dashboard-rules.md.
Quickstart
# in a Slidev project (npm init slidev@latest)
npm i ant-design-vue@^4.2.6 @ant-design/icons-vue
npm i echarts vue-echarts # charts (recommended)
- Copy
assets/main.ts→setup/main.ts(registers antd, all icons, and `` globally). - Copy
assets/AntdThemeProvider.vue.md→components/AntdThemeProvider.vue.md(ConfigProvider + dark-mode sync + sane tokens). - In
slides.mdheadmatter, bump the canvas so dashboards aren't cramped:--- canvasWidth: 1280 --- - Wrap any dashboard slide content in `` and use a
fulllayout. Paste an example fromexamples/to start.
Full, annotated instructions: references/setup.md.
The 5 golden rules (details in dashboard-rules.md)
- One Layout shell per dashboard:
a-layout→a-layout-sider(nav) +a-layout-header(top bar) +a-layout-content(work area). Don't hand-roll flexbox for the frame. - Everything sits on the 24-column grid (
a-row/a-colwith:gutter). KPI cards = 4–6 across; never free-position. - 8 px spacing rhythm — gutters and margins in multiples of 8 (8/16/24). Use
a-spaceinstead of margin hacks. - Color is semantic, not decorative — primary for the one main action per view; green/red/gold via
a-tag/a-badge/Statistic only to encode meaning. ≤1 primary button per region. - Show structure, not lorem — realistic labels and numbers; use
a-skeleton/a-emptyfor loading/empty states in mockups.
What's in this skill
| File | Use it for |
|---|---|
| references/setup.md | Install, setup/main.ts, theming, dark mode, scaling, charts, the React-antd→ant-design-vue translation table, pitfalls. |
| references/components.md | Every ant-design-vue component, grouped, with key props + "use-in-dashboard" guidance and the a- tag name. |
| references/dashboard-rules.md | Composition rules: layout, grid, spacing, color, density, KPI cards, tables, fitting onto a slide, do/don't. |
| references/navigation.md | Menu & navigation design spec: sider vs top nav, IA depth, Menu/Breadcrumb/Tabs/Steps patterns, responsive, do/don't. |
| assets/ | Drop-in main.ts, AntdThemeProvider.vue.md, styles.css. |
| examples/ | 4 complete copy-paste dashboard slides: admin shell, analytics overview, data-table page, detail+form page. |
Workflow when asked to "make a dashboard slide"
- Confirm the project is a Slidev project and the setup in
setup.mdis in place (or add it). - Pick the closest example in
examples/as a skeleton. - Choose the navigation pattern from
navigation.md(sider menu is the default for admin dashboards). - Lay out content on the grid per
dashboard-rules.md; pick components fromcomponents.md. - Wrap in ``, set the slide
layout: full, verify it fits the canvas (npm run dev).
相关技能
Build large-screen data-visualization dashboards (大屏 / 数据大屏 / 可视化大屏) as Slidev presentations using the datav-vue3 (DataV) component library. Use when the user wants a data dashboard
Learn and look up how to use any ant-design-vue (Vue 3) component — its variants, runnable examples, Vue 3 SFC code, and key props/events/slots. Use when the user asks how to use an ant-design-vue
Query project-specific Arco Design usage patterns and generate Vue 3 admin page prototypes with mock data, scaffold files, and route snippets. Use when Codex...
A design-language assistant for Ant Design (antd). Use when the user wants to learn, apply, critique, or theme UIs according to Ant Design's design language — its four design values
Apply VueUse composables where appropriate to build concise, maintainable Vue.js / Nuxt features. Use when writing Vue/Nuxt code and need reactive utilities.