Skip to main content
TypeScript

Naive UI

Naive UI is a Vue 3 component library with a rich component set and strong TypeScript support.

Features

  • 🎨 customizable theme:complete theme system
  • 📦 Tree Shaking:load on demand,small size
  • 🔧 TypeScript:complete type definitions
  • 🌙 Dark Mode: built-in dark theme support
  • 🎯 No extra UI dependencies: no third-party UI framework dependency
  • 📱 Responsive: mobile-friendly layout support

Installation

Usage

global full import

Auto Import

Use unplugin-auto-import and unplugin-vue-components:

Config Provider

Theme Configuration

Custom Theme

Dark Mode

Common Components

Button Button

Input Input

Select Select

Table Table

Card Card

Form Form

Global Notifications

Message Message

Dialog Dialog

Notification Notification

Loading Bar Loading Bar

Layout Components

Layout

Space Space

Grid Grid

Icons

Naive UI recommends using xicons:

Best Practices

  1. Use on-demand import with auto-import plugins.
  2. Keep the theme consistent across the app.
  3. Use global configuration through ConfigProvider.
  4. Take advantage of TypeScript support.
  5. Use the grid system for responsive design.
  6. Configure locale settings for internationalization.

References

Last modified on April 17, 2026