A modern, feature-rich documentation UI component library built with Vue 3. Create beautiful documentation websites with YAML configuration and Markdown rendering - ready to use out of the box.
- ๐จ Modern Design: Grid-based responsive layout with beautiful UI
- ๐ฑ Mobile Optimized: Perfect mobile experience with touch-friendly navigation
- ๐ Multi-Theme System: 6 beautiful preset themes (Default, Vue, GitHub, Purple, Orange, Emerald)
- ๐ Smart Theme Mode: Light/dark mode with auto system preference detection
- ๐ Markdown Rendering: Complete Markdown support with syntax highlighting
- ๐ Auto Navigation: Automatic table of contents generation
- โ๏ธ YAML Configuration: Configuration-driven approach with YAML files
- ๐ Zero Setup: Get started with just 3 lines of code
- ๐ TypeScript: Full TypeScript support with type definitions
- ๐ฏ Vue 3: Built for Vue 3 with Composition API
- ๐ง Highly Customizable: Flexible theming and component customization
# Create a new documentation project with one command
npm create vue-docs-ui my-docs
cd my-docs
npm install
npm run dev
npm install vue-docs-ui
# or
yarn add vue-docs-ui
# or
pnpm add vue-docs-ui
// main.ts
import createDocsApp from 'vue-docs-ui'
import 'vue-docs-ui/dist/style.css'
createDocsApp()
Create public/config/site.yaml
:
# Basic site configuration
site:
title: "My Documentation"
description: "Built with Vue Docs UI"
logo: "๐" # Supports emoji, images, or URLs
author: "Your Name"
# Navigation
navbar:
items:
- title: "Home"
link: "/"
- title: "Guide"
link: "/guide"
- title: "GitHub"
link: "https://github.com/your-repo"
external: true
# Sidebar
sidebar:
sections:
- title: "Getting Started"
path: "/guide"
children:
- title: "Quick Start"
path: "/guide/quick-start"
- title: "Configuration"
path: "/guide/configuration"
# Theme (NEW: Multi-theme support!)
theme:
# Theme selection: default | vue | github | purple | orange | emerald
theme: "vue"
# Default mode: light | dark | auto
defaultMode: "auto"
# Allow users to toggle theme
allowToggle: true
# Show theme switcher component
showThemeSwitcher: true
# Table of Contents
toc:
maxLevel: 2
enabled: true
title: "Contents"
Create your markdown files in public/docs/
:
public/
โโโ config/
โ โโโ site.yaml
โโโ docs/
โโโ guide/
โ โโโ quick-start.md
โ โโโ configuration.md
โโโ advanced/
โโโ customization.md
That's it! ๐ Run npm run dev
and your documentation site is ready.
- DocsLayout: Main layout component with responsive design
- HeaderNav: Top navigation with theme toggle and mobile menu
- SidebarNav: Collapsible sidebar navigation
- TableOfContents: Auto-generated table of contents
- MarkdownRenderer: Markdown rendering with syntax highlighting
- DefaultHome: Beautiful homepage component
- DefaultArticle: Article page with breadcrumbs and navigation
Vue Docs UI supports multiple logo formats:
site:
# Emoji (simplest)
logo: "๐ค"
# Local image
logo: "/images/logo.png"
# Online image
logo: "https://example.com/logo.svg"
# Relative path
logo: "./assets/logo.svg"
Logo Requirements:
- Recommended formats: PNG, SVG (vector graphics preferred)
- Recommended size: 32-64px height, auto width
- File size: < 100KB recommended
- Supported formats: PNG, SVG, JPG, GIF, WebP, ICO
Vue Docs UI now supports 6 beautiful preset themes with complete configuration control:
Theme | Description | Best for |
---|---|---|
default |
Modern blue theme | General documentation |
vue |
Vue.js official green theme | Vue projects |
github |
GitHub-style monochrome | Open source projects |
purple |
Elegant purple theme | Design systems |
orange |
Warm orange theme | Marketing sites |
emerald |
Fresh green theme | Eco-friendly projects |
theme:
# Select theme: default | vue | github | purple | orange | emerald
theme: "vue"
# Default mode: light | dark | auto
defaultMode: "auto"
# Allow users to toggle theme/mode
allowToggle: true
# Show theme switcher component
showThemeSwitcher: true
"light"
: Force light mode"dark"
: Force dark mode"auto"
: Auto-detect system preference (recommended)
allowToggle: true
: Users can switch themes and modesallowToggle: false
: Lock theme configurationshowThemeSwitcher: true
: Show theme picker in headershowThemeSwitcher: false
: Hide theme picker
- User Selection (localStorage)
- Config File (site.yaml)
- System Preference (for auto mode)
- Default Values
Fixed Theme Mode:
theme:
theme: "github"
defaultMode: "light"
allowToggle: false
showThemeSwitcher: false
Full User Control:
theme:
theme: "default"
defaultMode: "auto"
allowToggle: true
showThemeSwitcher: true
Brand Specific:
theme:
theme: "vue" # Vue theme for Vue projects
defaultMode: "auto"
allowToggle: true
showThemeSwitcher: true
import createDocsApp from 'vue-docs-ui'
import 'vue-docs-ui/dist/style.css'
import MyCustomHome from './MyCustomHome.vue'
import MyCustomArticle from './MyCustomArticle.vue'
createDocsApp({
configPath: '/config/site.yaml',
el: '#app',
customComponents: {
home: MyCustomHome,
article: MyCustomArticle
}
})
import { createApp } from 'vue'
import { DocsLayout, loadConfig } from 'vue-docs-ui'
import 'vue-docs-ui/dist/style.css'
const config = await loadConfig('/config/site.yaml')
const app = createApp(DocsLayout, { config })
app.mount('#app')
import {
DocsLayout,
HeaderNav,
SidebarNav,
TableOfContents,
MarkdownRenderer,
DefaultHome,
DefaultArticle,
createDocsApp,
loadConfig
} from 'vue-docs-ui'
Vue Docs UI is fully responsive:
- Desktop: Full sidebar + content + table of contents
- Tablet: Sidebar + content (TOC hidden)
- Mobile: Overlay sidebar with smooth animations
- โ Standard Markdown syntax
- โ Syntax highlighting for code blocks
- โ Auto-generated table of contents
- โ Responsive tables and images
- โ Custom heading anchors
- โ Math equations support (coming soon)
my-docs-project/
โโโ public/
โ โโโ config/
โ โ โโโ site.yaml # Site configuration
โ โโโ docs/ # Markdown content
โ โโโ guide/
โ โ โโโ quick-start.md
โ โ โโโ configuration.md
โ โโโ advanced/
โ โโโ customization.md
โโโ src/
โ โโโ main.ts # Just 3 lines of code
โโโ index.html
โโโ package.json
โโโ vite.config.js
# VitePress config.js equivalent in YAML
site:
title: "My Docs"
description: "Documentation site"
navbar:
items:
- title: "Guide"
link: "/guide/"
sidebar:
sections:
- title: "Getting Started"
children:
- title: "Introduction"
path: "/guide/introduction"
Vue Docs UI provides a simpler, Vue-focused alternative with zero configuration complexity.
Feature | Vue Docs UI | VitePress | Docusaurus |
---|---|---|---|
Setup Complexity | โญ 3 lines | โญโญ Config needed | โญโญโญ Complex setup |
Vue 3 Support | โ Native | โ Yes | โ React only |
Zero Config | โ Out of box | โญโญ Needs config | โญโญ Needs config |
TypeScript | โ Full support | โ Yes | โ Yes |
Customization | โญโญโญ Highly flexible | โญโญ Medium | โญโญโญ Highly flexible |
Performance | โญโญโญ Excellent | โญโญโญ Excellent | โญโญ Good |
- Node.js 16+
- npm/yarn/pnpm
# Clone the repository
git clone https://github.com/vue-docs-ui/vue-docs-ui.git
cd vue-docs-ui
# Install dependencies
npm install
# Start development server
npm run dev
# Build library
npm run build:lib
# Run example
cd example && npm run dev
npm run build:lib # Build library for production
npm run build # Build example site
npm run type-check # TypeScript type checking
npm run preview # Preview built site
This package is ready for NPM publication:
# Dry run (test without publishing)
npm run publish:dry
# Version bump
npm run version:patch # 1.0.0 โ 1.0.1
npm run version:minor # 1.0.0 โ 1.1.0
npm run version:major # 1.0.0 โ 2.0.0
# Publish to NPM
npm publish
The package includes:
- โ TypeScript declarations
- โ ES and UMD builds
- โ CSS bundle
- โ Proper exports configuration
- โ Tree-shaking support
- Chrome >= 87
- Firefox >= 78
- Safari >= 14
- Edge >= 88
MIT License - see LICENSE file for details.
We welcome contributions! Please see our Contributing Guide for details.
๐ Documentation in multiple languages:
- ๐บ๐ธ English Contributing Guide
- ๐จ๐ณ ไธญๆ่ดก็ฎๆๅ
- ๐ Report bugs
- ๐ก Request features
- ๐ Improve documentation
- ๐ฌ Join discussions
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- ๐ Documentation
- ๐ Issue Tracker
- ๐ฌ Discussions
- ๐ง Email Support
Made with โค๏ธ by the Vue Docs UI Team