Configs2026年7月3日·1 分钟阅读

Varlet — Material Design Vue 3 Component Library

A Vue 3 component library implementing Material Design 2 and 3, supporting both mobile and desktop interfaces with 60+ components.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Varlet
直接安装命令
npx -y tokrepo@latest install 2a60d4e1-7696-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Varlet is a Vue 3 component library that follows Material Design specifications. It was originally built for mobile interfaces but has expanded to support desktop layouts, providing components for forms, navigation, feedback, and data display.

What Varlet Does

  • Provides 60+ Vue 3 components following Material Design 2 and 3 guidelines
  • Supports both mobile-first and desktop-responsive layouts
  • Offers on-demand component importing for optimized bundle sizes
  • Includes dark mode with runtime theme switching via CSS variables
  • Ships with internationalization support for 20+ languages

Architecture Overview

Varlet components are built with the Vue 3 Composition API and TypeScript. The styling system uses CSS custom properties organized into design tokens for colors, spacing, and elevation. Components support on-demand loading through a Vite or Webpack plugin that rewrites imports to include only the CSS and JS for components actually used. A CLI tool helps scaffold projects and generate component documentation.

Self-Hosting & Configuration

  • Install from npm and register globally or import individual components
  • Use the unplugin-vue-components plugin for automatic on-demand importing
  • Customize the theme by overriding CSS variables on the :root selector
  • Configure dark mode via the StyleProvider component or the Themes.dark utility
  • Supports Vite, Webpack, and Nuxt build environments

Key Features

  • Material Design 3 support with dynamic color theming
  • Touch gestures and mobile interactions built into relevant components
  • On-demand tree shaking to minimize production bundle size
  • CLI for project scaffolding and component documentation generation
  • TypeScript type definitions for all components and APIs

Comparison with Similar Tools

  • Vuetify — established Material Design library for Vue; Varlet offers a lighter alternative with MD3 support
  • Quasar — full framework with build tools; Varlet is a component library you add to existing projects
  • Element Plus — enterprise-focused with its own design language; Varlet follows Material Design
  • Ant Design Vue — Ant Design for Vue; Varlet targets Material Design aesthetics
  • Vant — mobile-focused Vue library by Youzan; Varlet adds desktop support and MD3

FAQ

Q: Does Varlet support Vue 2? A: No. Varlet is built exclusively for Vue 3 and the Composition API.

Q: Can I use Varlet for desktop web applications? A: Yes. Varlet supports responsive layouts and includes desktop-optimized component variants.

Q: How do I enable dark mode? A: Use the StyleProvider component or call Themes.dark to apply dark theme CSS variables at runtime.

Q: Is Varlet actively maintained? A: Yes. The project has regular releases and an active contributor community.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产