A Vue 3 monorepo providing unstyled components, composables, and utilities as low-level primitives for building modern web applications and design systems.
This monorepo contains two primary packages:
Core foundational components and composables:
Components:
Atom
- Base element wrapper with renderless capabilitiesBreakpoints
- Responsive breakpoint utilitiesContext
- Context injection/provision systemHydration
- Client-side hydration utilitiesPopover
- CSS anchor-positioned popup componentsTheme
- Theme management and CSS variable injection
Composables:
Foundation:
createContext
- Type-safe context management for dependency injectioncreatePlugin
- Vue plugin creation with standardized patternscreateTrinity
- Context provider/consumer pattern utilities
Registration:
useRegistry
- Foundation for registration-based systemsuseProxyRegistry
- Proxy-based registry with automatic reactivityuseTimeline
- Bounded undo/redo system with fixed-size historyuseTokens
- Design token management with alias resolution
Selection:
useSelection
- General selection state managementuseSingle
- Single-selection specializationuseGroup
- Multi-selection with array-based operationsuseStep
- Navigation through items (first/last/next/prev)useFilter
- Reactive array filtering with multiple modes
Forms:
useForm
- Form state management and validationuseProxyModel
- Proxy model utilities for reactive data binding
System:
useEventListener
- DOM event handling with automatic cleanupuseIntersectionObserver
- Visibility detection via Intersection Observer APIuseKeydown
- Keyboard event handling with automatic cleanupuseMutationObserver
- DOM change detection via Mutation Observer APIuseResizeObserver
- Element size change detection via Resize Observer API
Plugins:
useBreakpoints
- Responsive breakpoint detectionuseFeatures
- Feature flags and A/B testing managementuseHydration
- SSR hydration process managementuseLocale
- Internationalization systemuseLogger
- Logging system with multiple adaptersusePermissions
- Role-based access control and permissionsuseStorage
- Reactive browser storage interfaceuseTheme
- Theme management with CSS custom properties
Transformers:
toArray
- Convert any value to array with null/undefined handlingtoReactive
- Convert MaybeRef objects to reactive proxies
Styling and layout primitives:
Components:
V0Paper
- Base layout component with comprehensive styling props
Composables:
useBorder
- Border styling utilitiesuseColor
- Color system managementuseContrast
- Color contrast calculationsuseDimensions
- Size and spacing utilitiesuseElevation
- Shadow and elevation effectsuseRounded
- Border radius utilitiesuseSpacing
- Margin and padding utilities
- Headless First: Components provide logic and accessibility without imposed styling
- Slot-Driven: Maximum flexibility through comprehensive slot APIs
- CSS Variables: All styling configurable via CSS custom properties
- TypeScript Native: Full type safety with excellent DX
- Minimal Dependencies: Lightweight with only essential dependencies
- Framework Agnostic: Core logic usable beyond Vue with adapters
Components in vuetify0 should be:
- Single-layer: Not composed of multiple component layers
- Logic-focused: Minimal styling, maximum behavioral functionality
- Prop-driven: Configurable primarily through props and CSS variables
- Slot-heavy: Extensive slot usage for customization
- CSS Variable-based: All styling via
--v0-*
custom properties - Framework-minimal: No global state dependencies
- Interface-based: External dependencies through clean interfaces
For LLMs and developers navigating this codebase, here are the key directories:
-
packages/0/src/composables/
- All composable functions, the heart of v0's functionality- Each composable in its own directory with
index.ts
,index.test.ts
, and optionalindex.bench.ts
- Foundation layer:
createContext/
,createTrinity/
,createPlugin/
- Registry system:
useRegistry/
,useProxyRegistry/
,useTokens/
,useTimeline/
- Selection system:
useSelection/
,useSingle/
,useGroup/
,useStep/
,useFilter/
- Forms:
useForm/
,useProxyModel/
- System utilities:
useEventListener/
,useIntersectionObserver/
,useKeydown/
, etc. - Plugins:
useTheme/
,useBreakpoints/
,useFeatures/
,useLocale/
, etc. - Transformers:
toArray/
,toReactive/
- Each composable in its own directory with
-
packages/0/src/components/
- Vue components (Atom, Theme, Breakpoints, etc.) -
packages/0/src/types/
- Shared TypeScript types and interfaces -
packages/0/src/utilities/
- Helper functions and utility modules -
packages/0/src/constants/
- Global constants (IN_BROWSER, htmlElements, etc.)
packages/paper/src/
- Styling and layout primitives- Depends on
@vuetify/v0
for core functionality
- Depends on
apps/docs/src/pages/
- Documentation markdown filesapps/storybook/
- Component stories and visual testingplayground/
- Development playground for rapid prototyping
- Root
vitest.config.ts
- Test configuration - Root
package.json
- Monorepo scripts and workspace configuration pnpm-workspace.yaml
- PNPM workspace definitions
packages/0/src/index.ts
- Main export for@vuetify/v0
packages/paper/src/index.ts
- Main export for@vuetify/paper
#v0/
βpackages/0/src/
- Used throughout the codebase for clean imports
pnpm add @vuetify/v0 @vuetify/paper
<script setup>
import { Avatar, createThemePlugin } from '@vuetify/v0'
import { V0Paper } from '@vuetify/paper'
// Install theme plugin
app.use(createThemePlugin({
default: 'light',
themes: {
light: {
primary: '#1976d2',
background: '#ffffff'
}
}
}))
</script>
<template>
<V0Paper class="p-4">
<Avatar.Root>
<Avatar.Image src="/avatar.jpg" alt="User" />
<Avatar.Fallback>JD</Avatar.Fallback>
</Avatar.Root>
</V0Paper>
</template>
pnpm install
pnpm dev # Start playground
pnpm dev:docs # Start documentation
pnpm storybook # Start Storybook
pnpm build # Build packages
pnpm build:docs # Build documentation
pnpm test # Run tests
pnpm test:ui # Run tests with UI
pnpm coverage # Generate coverage report
pnpm lint # Lint codebase
pnpm type-check # Type checking
- Playground: Interactive component testing environment
- Storybook: Component documentation and examples
- Documentation: Comprehensive guides and API references
Perfect for:
- Design system foundations
- Component library base layers
- Headless UI implementations
- Custom styling frameworks
- Accessibility-first applications
- Bundle Size: Minimal footprint with tree-shaking
- Runtime: Optimized Vue 3 composition patterns
- SSR: Full server-side rendering support
- Hydration: Seamless client-side hydration
Built with β€οΈ for the Vue ecosystem. Part of the Vuetify family.